Studio Notebook

Claude Code Atlas

Tools And Permission Model

Start with the shared tool contract, then see how Claude Code assembles tools, gates each call, and runs real implementations.

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:

  1. define what a tool is
  2. learn the shared data structures that keep reappearing
  3. decide which tools exist in the current session
  4. decide whether a specific call is allowed
  5. show one concrete tool implementation end to end

How one tool call reaches the outside world

  1. The model emits a tool name and JSON input.
  2. Claude Code looks up that tool in the assembled pool.
  3. Permission code decides allow, deny, or ask.
  4. The concrete tool implementation runs and returns a structured result.

How this part breaks down

  1. tool-core-contract-and-data-models Start here. It explains the shared contract every tool follows in Tool.ts.
  2. tool-and-permission-data-structures Read this appendix early. It introduces the recurring objects before later pages depend on them.
  3. tool-registry-and-assembly Learn how Claude Code builds the active tool pool for a run.
  4. tool-permission-flow See how allow, deny, and ask become user-visible behavior.
  5. bash-tool-as-a-case-study Use BashTool to connect the abstract model to one real tool.
  6. tool-search-and-deferred-loading Learn how deferred tools stay discoverable without being fully loaded up front.
  7. agent-tool-and-subagent-lifecycle See how one tool can launch other agents and manage their lifecycle.
  8. skill-tool-and-command-bridge Learn how prompt commands become Skill tool calls and forked work.
  9. mcp-tool-wrapper-and-client-bridge See 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.