Trim per-tool-name list from MCP-connect system reminders

Resolved 💬 1 comment Opened May 3, 2026 by timncox Closed Jun 2, 2026

Problem

When an MCP server connects mid-session, Claude Code injects a <system-reminder> listing every deferred tool name. The reminder lives in the conversation transcript and is rescanned on every cache miss after that turn, so the cost compounds.

Concrete numbers from a recent agent-triggered session:

  • charmera-mcp connecting (14 tools): ~280 tokens
  • A session that fanned across squarespace, Vercel toolbar, Canva, Figma, Wix, MailerLite cumulatively spent ~3,500 tokens on tool-name lists alone
  • Disconnect reminders ("the following deferred tools are no longer available") have the same shape and add to the total

The names are recoverable on demand via ToolSearch (keyword or select:<name>), so keeping the full list resident isn't strictly necessary.

Current behavior

<system-reminder>
The following deferred tools are now available via ToolSearch. Their schemas
are NOT loaded — calling them directly will fail with InputValidationError.
Use ToolSearch with query "select:<name>[,<name>...]" to load tool schemas
before calling them:
mcp__charmera__auth_status
mcp__charmera__commit_curated_files
mcp__charmera__detect_camera
... (11 more)
</system-reminder>

Proposed behavior

<system-reminder>
MCP server "charmera" connected — 14 deferred tools available.
Use ToolSearch with the server name as a keyword to discover them.
</system-reminder>

Optionally include a 3–5 tool sample if telemetry shows the model finds tools faster with one, but cap the count.

Use case

Agent-triggered curated imports where a menu-bar app launches claude "<prompt>" and the conversation is short (a handful of tool calls). The reminder cost is a meaningful fraction of total tokens in those sessions.

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗