Claude Code Lazy-Loads Tool Schemas via ToolSearch to Save Tokens

A Reddit analysis of Claude Code's system prompt reveals that tools are lazy-loaded to reduce token consumption. Instead of sending every tool's full schema with every request, Claude Code sends a list of tool names in a <system-reminder> tag and instructs the model to call ToolSearch first to load the schema for each tool.
How It Works
The system prompt includes an instruction like this:
<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:AskUserQuestion CronCreate CronDelete CronList EnterPlanMode EnterWorktree ExitPlanMode ExitWorktree Monitor NotebookEdit PushNotification RemoteTrigger TaskOutput TaskStop TodoWrite WebFetch WebSearch
[+ ~130 MCP tools (Slack, Notion, Gmail...)] </system-reminder>
The <system-reminder> is injected only in the first user message of the conversation. A similar block lists skills with single-line descriptions.
Token Impact
According to the post, the system instructions plus reminders alone consumed 38k tokens on a simple "hi" test message. Loading every tool's full schema upfront would drastically increase that burn — hence the lazy-loading approach.
Practical Implications
If you're building on Claude Code or similar agent-based systems, this pattern is worth adopting:
- Defer schemas for rarely-used tools until needed.
- Use a
ToolSearch-like command to explicitly request schemas. - Keep reminders within the first message to avoid repeating context.
This also means that if you're writing custom tools for Claude Code, you must ensure the model can discover them via ToolSearch — otherwise they'll be invisible or cause validation errors.
📖 Read the full source: r/ClaudeAI
👀 See Also

Building syntaqlite: A SQLite DevTools Project Created with AI Assistance
Lalit Maganti built syntaqlite, a set of developer tools for SQLite, over three months using AI coding agents after wanting it for eight years. The project required parsing SQL exactly like SQLite, which involves adapting SQLite's dense C codebase with over 400 grammar rules.

Claude Code Template Repository for Spring Boot Applications
A GitHub repository provides a Claude Code template for generating Spring Boot applications with best practices for database integration, Kubernetes deployment, and integration testing using Testcontainers.

Open Source Skill for Parallel AI Coding Agents with Human Gate
A markdown skill definition for running parallel Claude Code agents in separate git worktrees, with integration branch validation, smoke tests, and a hard human gate before production merge.

devopsiphai: Open-source Claude Code skill audits operational health across 6 phases
devopsiphai is an open-source Claude Code skill that audits production project operability using a 6-phase process and ARC framework, outputting letter grades and a structured TODO.md with effort-estimated tasks.