Type Hints
Standard Python type hints are supported:Supported Types
| Python Type | JSON Schema Type |
|---|---|
str | string |
int | integer |
float | number |
bool | boolean |
list / List[T] | array |
dict / Dict[str, T] | object |
Optional[T] | T (not required) |
Literal["a", "b"] | string with enum |
Enum | string with enum |
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
UseLiteral or Enum to restrict values:
Default Values
Parameters with default values are optional in the schema:url is required. The model can omit timeout and retries.
Validation
Whenvalidate_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.