Skip to main content
A function schema is a structured JSON specification that defines a callable function or tool available in your system. EigenData-CLI uses function schemas to understand what tools are available and how to invoke them when generating conversational data.

Providing Function Schema

You can provide function schemas to EigenData-CLI in two ways:

Option 1: MCP Server

If you have a Model Context Protocol (MCP) server, EigenData-CLI can automatically discover available tools:
  1. Provide your MCP server URL during setup or via /configure
  2. The system automatically discovers available tools from the MCP server
  3. Function schemas are generated from the tool definitions
This approach is ideal when your tools are already defined in an MCP-compatible server.

Option 2: Local Schema File

Provide a local file containing your function definitions:
Supported file formats:

Schema Format

Function schemas follow the OpenAI-style JSON Schema format with four basic fields:

Schema Fields

Schema File Examples

Format 1: Standard Array (JSON)

The most common format—an array of function objects:

Format 2: YAML with functions Wrapper

YAML format with an explicit functions key:

Format 3: Extended Format with tool and input_schema

This format uses tool as the function identifier and input_schema as an object defining parameters with inline metadata:

Best Practices

  1. Write clear descriptions - Each function and parameter should have a description that explains its purpose and expected values.
  2. Use specific types - Use the most specific JSON Schema type for each parameter (string, integer, number, boolean, array, object).
  3. Mark required fields - Always specify which parameters are required to help generate valid function calls.
  4. Include examples in descriptions - Add example values in parameter descriptions (e.g., “Email address such as ‘user@example.com’”).
  5. Define return values - Always include a returns field to document what the function returns. This helps generate realistic tool responses in conversational data.
  6. Use parameters.examples - Provide example parameter objects to demonstrate valid inputs. This improves the quality of generated function calls.