中文 | English
How does Claude Code define tools, register them, and dispatch model tool calls into local execution?
python examples/l3_tool_system.pyTool.tstools.tstools/BashTool/tools/FileReadTool/
buildToolgetToolsinputSchemacall
- why the model only sees schema and description
- why the implementation stays hidden from the model
- why registration and filtering live in their own layer
The demo keeps only a few tools and simplified permission logic. The real repo adds richer tool context, UI components, error handling, and filtering.
- Why is the “schema plus function” boundary so important?
- If you change implementation but not schema, does the model’s calling strategy change?
- Why is a tool registry better than scattering tool logic everywhere?