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:- Provide your MCP server URL during setup or via
/configure - The system automatically discovers available tools from the MCP server
- Function schemas are generated from the tool definitions
Option 2: Local Schema File
Provide a local file containing your function definitions:| Format | Extension | Description |
|---|---|---|
| JSON | .json | Array of function objects |
| JSONL | .jsonl | One function definition per line |
| YAML | .yaml, .yml | YAML-serialized function definitions |
Schema Format
Function schemas follow the OpenAI-style JSON Schema format with four basic fields:Schema Fields
| Field | Type | Description |
|---|---|---|
name | string | Function identifier (e.g., “create_reminder”, “delete_task”) |
description | string | Human-readable explanation of what the function does |
parameters | object | JSON Schema object defining input parameters |
returns | object | JSON Schema object describing the function’s return value |
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:
| Field | Description |
|---|---|
tool | Function identifier (replaces name) |
input_schema | Object defining parameters with type, required, description, and example |
output_schema | Flattened object with field names as keys and type signatures as values |
Best Practices
- Write clear descriptions - Each function and parameter should have a description that explains its purpose and expected values.
-
Use specific types - Use the most specific JSON Schema type for each parameter (
string,integer,number,boolean,array,object). - Mark required fields - Always specify which parameters are required to help generate valid function calls.
- Include examples in descriptions - Add example values in parameter descriptions (e.g., “Email address such as ‘user@example.com’”).
-
Define return values - Always include a
returnsfield to document what the function returns. This helps generate realistic tool responses in conversational data. -
Use
parameters.examples- Provide example parameter objects to demonstrate valid inputs. This improves the quality of generated function calls.