Why this matters
Tools are the action layer of Claude Code. They let the model leave plain text and ask the runtime to do something real.
Big picture first
This subtree is easiest to learn in five passes:
- define what a tool is
- learn the shared data structures that keep reappearing
- decide which tools exist in the current session
- decide whether a specific call is allowed
- show one concrete tool implementation end to end
How one tool call reaches the outside world
- The model emits a tool name and JSON input.
- Claude Code looks up that tool in the assembled pool.
- Permission code decides allow, deny, or ask.
- The concrete tool implementation runs and returns a structured result.
How this part breaks down
tool-core-contract-and-data-modelsStart here. It explains the shared contract every tool follows inTool.ts.tool-and-permission-data-structuresRead this appendix early. It introduces the recurring objects before later pages depend on them.tool-registry-and-assemblyLearn how Claude Code builds the active tool pool for a run.tool-permission-flowSee howallow,deny, andaskbecome user-visible behavior.bash-tool-as-a-case-studyUseBashToolto connect the abstract model to one real tool.tool-search-and-deferred-loadingLearn how deferred tools stay discoverable without being fully loaded up front.agent-tool-and-subagent-lifecycleSee how one tool can launch other agents and manage their lifecycle.skill-tool-and-command-bridgeLearn how prompt commands become Skill tool calls and forked work.mcp-tool-wrapper-and-client-bridgeSee how Claude Code turns generic MCP wrappers into real server tools.
Takeaways
- The root page is a map of the subtree, not a file dump.
- You should learn the shared tool contract and shared data structures before individual tools.
- Permissions sit between the model decision and the actual tool call.