Skip to main content
Definable generates a JSON Schema for each tool from its Python type hints. The model uses this schema to understand what arguments to pass.

Type Hints

Standard Python type hints are supported:
This generates the following JSON Schema for the model:

Supported Types

Descriptions from Docstrings

Parameter descriptions are extracted from your docstring. Both Google and NumPy styles are supported:

Pydantic Models as Parameters

For complex inputs, use Pydantic models:

Enum Parameters

Use Literal or Enum to restrict values:

Default Values

Parameters with default values are optional in the schema:
Only url is required. The model can omit timeout and retries.

Validation

When validate_tool_args=True in AgentConfig (the default), arguments are validated against the schema before execution. Invalid arguments result in an error message sent back to the model, which can then correct its call.