iTranslated by AI

The content below is an AI-generated translation. This is an experimental feature, and may contain errors. View original article
😽

Reduce System Prompts by Disabling Built-in Claude Code Tools

に公開
2025/12/12

TLDR: Denying unnecessary tools can also reduce your system prompt.

If you include tool names in .permissions.deny within ~/.claude/settings.json, the system prompt instructions for using those tools will no longer be included.

{
  "permissions": {
    "deny": [
      "NotebookEdit"
    ]
  },
}

before

> /context
  ⎿
      Context Usage
     ⛁ ⛀ ⛁ ⛁ ⛁ ⛁ ⛁ ⛁ ⛁ ⛁   claude-haiku-4-5-20251001 · 22k/200k tokens (11%)
     ⛀ ⛀ ⛀ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶
     ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶   ⛁ System prompt: 3.1k tokens (1.6%)
     ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶   ⛁ System tools: 16.0k tokens (8.0%)
     ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶   ⛁ Custom agents: 1.4k tokens (0.7%)
     ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶   ⛁ Memory files: 1.0k tokens (0.5%)
     ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶   ⛁ Messages: 8 tokens (0.0%)
     ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶   ⛶ Free space: 178k (89.2%)
     ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶
     ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶

after (I have disabled several others as well)

> /context
  ⎿
      Context Usage
     ⛁ ⛁ ⛁ ⛁ ⛁ ⛁ ⛀ ⛀ ⛀ ⛶   claude-haiku-4-5-20251001 · 13k/200k tokens (6%)
     ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶
     ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶   ⛁ System prompt: 2.4k tokens (1.2%)
     ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶   ⛁ System tools: 9.8k tokens (4.9%)
     ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶   ⛁ Custom agents: 73 tokens (0.0%)
     ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶   ⛁ Memory files: 242 tokens (0.1%)
     ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶   ⛁ Messages: 8 tokens (0.0%)
     ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶   ⛶ Free space: 187k (93.7%)
     ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶
     ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶ ⛶

You can verify the list of built-in tool names here:

https://code.claude.com/docs/en/settings#tools-available-to-claude

(Updated 12/12)
The Japanese documentation might be slightly outdated, so it is worth comparing it with the English version. NotebookRead has been removed.
https://code.claude.com/docs/en/settings#tools-available-to-claude
While you shouldn't trust it blindly, I recommend using "$schema": "https://json.schemastore.org/claude-code-settings.json".

Technical Explanation: Claude Code is Almost Entirely MCP

All of Claude Code's built-in tools are implemented as MCP servers.
You can actually launch them as an MCP server with the following command:

npx @modelcontextprotocol/inspector claude mcp serve

NotebookEdit includes the following MCP InitializerResult Instructions as a description:

Completely replaces the contents of a specific cell in a Jupyter notebook (.ipynb file) with new source. Jupyter notebooks are interactive documents that combine code, text, and visualizations, commonly used for data analysis and scientific computing. The notebook_path parameter must be an absolute path, not a relative path. The cell_number is 0-indexed. Use edit_mode=insert to add a new cell at the index specified by cell_number. Use edit_mode=delete to delete the cell at the index specified by cell_number.

These are configured to be passed to the system prompt during the initialize call, and Claude Code seems to use these instructions to add information about the MCP server to the system prompt.

https://modelcontextprotocol.io/specification/2025-11-25/schema#initializeresult-instructions

As anyone who has done context reduction knows, since a fair amount of explanation is added to get the model to use tools, even reducing just one tool can lead to significant savings.

Application Example: serena-mcp

When using serena, it might be beneficial to disable everything since there is overlap with the built-in tools.

{
  "permissions": {
    "deny": [
      "Edit",
      "Glob",
      "Grep",
      "Read",
      "Write",
    ]
  },
}

Discussion