feat: server instructions, title and description - #60
Merged
Merged
Conversation
The initialize result now carries instructions on how the tools fit together (rate limit and the server-side paging tools, lookup by number, voucherlist row -> document/PDF, date formats, drafts that cannot be fixed after creation, the upload-ticket flow). They are built from the enabled tiers, and a test checks every tool they name is registered for that tier. serverInfo gains title, description and websiteUrl.
marselsel
changed the base branch from
feat/tool-titles-destructive-hints
to
main
September 22, 2026 21:56
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part 2 of 8 in the MCP best-practices stack. Stacked on #59, so merge in order.
Why
The server sent only
nameandversion. The MCPinstructionsfield is the place to explain how the tools fit together, which no single tool description can do. Anthropic's MCP server guidance calls it the highest-leverage addition. Claude's review treats instructions that command the model as prompt injection, so this text states facts instead.Changes
src/instructions.ts: builds the instructions from the enabled capability tiers, so they never mention a tool the server didn't register. They cover:summarize-vouchers,get-vouchers)voucherNumberfilter)get-document,get-document-file)serverInfo: gainstitle,descriptionandwebsiteUrl. Clients receive the instructions in the initialize result, or viaserver/discoveron the 2026-07-28 protocol.Verification
tests/instructions.test.tscovers every tier (read-only, default, finalize): each tool the text names must be registered in that tier, a read-only server says it is read-only, and the finalize line appears only when that tier is on.initializereturned the newserverInfofields and the instructions.npm testpasses all 467 tests.