Documentation IndexFetch the complete documentation index at: /llms.txtUse this file to discover all available pages before exploring further.
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Python type hints and JSON schema mappings.
str
{"type": "string"}
"hello"
int
{"type": "integer"}
42
float
{"type": "number"}
3.14
bool
{"type": "boolean"}
true
list
{"type": "array"}
[1, 2, 3]
dict
{"type": "object"}
{"key": "value"}
Optional[T]
None
@tool("Get user by name") def get_user(self, name: str) -> dict: pass # JSON Schema: { "name": {"type": "string"} }
@tool("Search products") def search(self, query: str, limit: int = 10) -> dict: pass # JSON Schema: { "query": {"type": "string"}, "limit": {"type": "integer"} } # "limit" not in required array
# ✅ Good return {"result": "success", "data": {...}} # ❌ Bad return "success" # Not a dict