Skip to content

Tools say what is documented, for clients that drop the instructions - #40

Merged
sdrahn merged 1 commit into
mainfrom
claude/happy-fermat-5ciyuc
Nov 20, 2026
Merged

sdrahn merged 1 commit into
mainfrom
claude/happy-fermat-5ciyuc

Conversation

@sdrahn

@sdrahn sdrahn commented Nov 20, 2026

Copy link
Copy Markdown
Owner

Why

Kit (0.143) does not give its model the server's instructions: it keeps the initialize result only to see whether the server offers tasks. The instructions are where mcp-docs named its collections, so Kit's model saw tools that read "documentation" without knowing which. Under Kit's own coding-assistant prompt it answered questions about SUSE products from memory or with its shell, and guessed collection names (suse-16.1: "no such collection").

What

  • find_sections' description opens with what is documented: "The documentation on this system: SUSE Linux Enterprise Server 16.1; SUSE Rancher Prime: RKE2; …", by the collections' titles (names where they have none), at most 600 bytes, then "and N more". Without find_sections (--tools), search says it.
  • find_sections' and search's collection parameter lists the names as an enum, so a model picks one there is. list_docs does not repeat them: called without a collection, it lists them.
  • TestToolsNameTheCollections covers both, the fallback to search and the cap. TestFixedTextIsStable still holds: the list follows the collections' order.
  • docs/architecture.md §17.8 and CHANGELOG.md (Unreleased).

What it costs

Every session, cached or not: 101 bytes with one collection, 875 bytes (~220 tokens) with the thirteen SUSE collections, against a tool list of 5.1 KB. TestSessionCost's budget for the tool definitions is 5.25 KiB, from 5 KiB; that is the feature's price, not slack.

Not verified

Not tried against Kit with a live model; the behaviour of Kit described above is from its source.


Generated by Claude Code

Kit gives its model the tools but not the server's instructions, where
the collections were named: its model saw tools that read
"documentation" without knowing which, answered questions about SUSE
products from memory or its shell, and guessed collection names.

find_sections' description now opens with the collections' titles (at
most 600 bytes, then "and N more"; search says it without
find_sections), and find_sections' and search's collection parameter
lists the names as an enum. About 220 tokens more per session with the
thirteen SUSE collections; TestSessionCost's budget for the tool
definitions is 5.25 KiB, from 5 KiB (docs/architecture.md §17.8).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NWLUBP1bFcMfsbUeenRe2W
@sdrahn
sdrahn merged commit 8f86848 into main Nov 20, 2026
8 checks passed
@sdrahn sdrahn mentioned this pull request Nov 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants