Schema validation catches broken custom tools at import time, before they confuse the LLM at runtime.Documentation Index
Fetch the complete documentation index at: https://docs.praison.ai/llms.txt
Use this file to discover all available pages before exploring further.
Quick Start
How It Works
| Phase | What Happens |
|---|---|
| @tool decoration | Validates schema structure and JSON compatibility |
| Agent creation | Checks for duplicate names across tool list |
| LLM interaction | Clean, validated schemas prevent runtime errors |
What Gets Checked
| Check | What it catches |
|---|---|
parameters.type present | Missing schema scaffold |
parameters.properties present | Most common OpenAI-incompatible bug |
get_schema() returns {type: "function", function: {...}} | Wrong top-level shape |
function.parameters is a dict with properties | Inner shape broken |
| JSON round-trip preserves structure | Non-serializable values (functions, sets, etc.) |
required is a list when present | Common typo (string instead of list) |
| Unique names across a list | Duplicate registration |
Common Errors & Fixes
Missing 'properties' field
Missing 'properties' field
Error: Fix:
'parameters' must have a 'properties' field for OpenAI compatibilityBroken Code:Bad get_schema() return shape
Bad get_schema() return shape
Error: Fix:
get_schema() must return schema with type='function'Broken Code:Non-JSON-serializable default values
Non-JSON-serializable default values
Error: Fix:
Schema round-trip validation failedBroken Code:Duplicate tool names
Duplicate tool names
Error: Fix:
Duplicate tool name 'search' found in tool listBroken Code:Behavior of @tool Validation Failures
Related
Custom Tools
Learn to create custom BaseTool and @tool implementations
Tool Reliability
Runtime error handling and tool safety patterns

