Skip to content

mcp-tools: no check covers tool-search / deferred tool loading — declared config and server inventory are unowned #1278

Description

@kyle-sexton

Category: coverage gap (skill scope decision) · Source: agent session, 2026-07-24 — grep-verified against plugins/mcp-tools/, mechanism verified against current official docs.

Filed by an agent session. Every claim below is either a grep result over this repo at the commit in hand, or a verbatim quote from https://code.claude.com/docs/en/mcp.

What mcp-tools:audit covers, and what it disclaims

mcp-tools:audit audits MCP tool-definition quality in source: sixteen criteria (C1–C16 in plugins/mcp-tools/skills/audit/reference/checklist.md) scoring each tool's description, parameters, name, annotations, granularity, and schema self-sufficiency. Its frontmatter draws the boundary explicitly:

Not for: MCP server configuration or connection issues.

Verified: grep -rniE "toolsearch|tool.search|ENABLE_TOOL_SEARCH|defer|token|context cost" plugins/mcp-tools/ returns zero matches (exit 1) across all 13 files in the plugin.

So deferred tool loading is unowned

Tool search is the mechanism that decides whether MCP tool schemas cost context at session start. Per the docs it is on by default — with ENABLE_TOOL_SEARCH unset, all MCP tools are deferred and loaded on demand. It is therefore not an exotic opt-in; it is the ambient behavior, and every deviation from it is a repository-visible declaration.

The plugin whose entire subject is MCP tool quality and tool-selection cost has no check for it. Meanwhile plugins/dometrain/skills/setup/SKILL.md:54 already reasons about ENABLE_TOOL_SEARCH=false ad hoc, inside a consumer plugin — evidence the concern is real and currently homeless rather than absent.

The intent half IS statically auditable

Every one of these lives in a repository file:

Surface Where Doc anchor
ENABLE_TOOL_SEARCHunset | true | auto | auto:N | false settings env field ("Or set the value in your settings.json env field") Configure tool search
CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS settings env "keeps tool search off, and ENABLE_TOOL_SEARCH can't override it"
permissions.deny: ["ToolSearch"] settings "You can also disable the ToolSearch tool specifically"
alwaysLoad: true per server .mcp.json / plugin-bundled .mcp.json (this repo ships plugins/dometrain/.mcp.json, plugins/miro/.mcp.json) "Exempt a server from deferral"
"anthropic/alwaysLoad": true in a tool's _meta the server's own tool definitions same section
Server instructions field, and the 2 KB truncation on both tool descriptions and server instructions server source "For MCP server authors"
ANTHROPIC_BASE_URL pointing at a non-first-party host settings env disables tool search by default

Two of these sit squarely inside the plugin's existing lane rather than the disclaimed config lane: _meta's "anthropic/alwaysLoad" is a tool-definition property, and the server instructions field is subject to the same 2 KB truncation that C4 already checks for descriptions — the plugin checks one side of a documented pair and not the other.

Server inventory — how many tool schemas exist to defer at all — is likewise repository data: .mcp.json plus plugin manifests.

The outcome half is not observable statically — name it, don't omit it

A static pass cannot establish that deferral actually happened:

  • Tool search requires a supporting model (docs: Claude Sonnet 4.5, Claude Haiku 4.5, Claude Opus 4.5, and later) and is disabled by default on some platforms (Google Cloud's Agent Platform) and behind non-first-party ANTHROPIC_BASE_URL.
  • Under auto / auto:N the upfront-vs-deferred split is decided at runtime: "tools load upfront if they fit within 10% of the context window, deferred otherwise" (auto:N for a custom percentage).

Intent is visible; outcome is not. A check that reports a green "tools are deferred" off config alone would be asserting something it cannot see.

Proposal

Add a check to mcp-tools scoped to declared configuration and server inventory, reporting the runtime half as explicitly unobservable rather than silently dropping it — the same honesty the checklist already practises with its SPEC-OPTIONAL / OPINION authority tags.

The decision this needs

Does it widen mcp-tools:audit's declared scope past its own "Not for: MCP server configuration" disclaimer, or land as a sibling action (mcp-tools:context-cost, or similar) so the audit skill's boundary stays intact? Both are defensible; the disclaimer was written deliberately and should be changed deliberately, not eroded by an added criterion.

Mechanism reference (cited, not recapped, so the current text governs): https://code.claude.com/docs/en/mcp#scale-with-mcp-tool-search

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs-humanHuman-in-the-loop required; autonomous sessions must not resolve items carrying this.priority: mediumReal value, no hard deadline; normal backlog flow.work-class: scopedA briefed fix or small feature; blast radius bounded by the brief, tests exist.

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions