Appendices
Tool and MCP server design checklist
The checks that make a tool easy for a model to use and hard for an attacker to abuse
Inside the chapter
- 1How to use this checklist
- 21. Shape and granularity
- 32. Names and descriptions
- 43. Parameters
- 54. Return values
- 65. Errors
- 76. Side effects and safety
- 87. MCP transport, auth and state
- 98. Operations
- 109. Evals
Go further: free on this site
Questions readers asked about this chapter, a 5-question self-check with explanations, and every source it cites.
Questions readers ask (5)
5 questions. Open one to read the answer.
Do I have to migrate my 2025-11-25 server to the 2026-07-28 revision right away?
No, but plan it now. The changelog removes sessions, Mcp-Session-Id and the initialize handshake, and requires server/discover, so serving the new revision is a breaking change. Serve the previous revision until your main clients support 2026-07-28; Claude support was still rolling out in late 2026. Deprecated features (Sampling, Roots, Logging, Dynamic Client Registration) keep working through a deprecation window of at least twelve months.
Do clients actually honor readOnlyHint and destructiveHint?
Some do, unevenly. ChatGPT treats any tool without readOnlyHint as a write needing confirmation. The MCP maintainers' post on annotations says clients must treat hints as untrusted, that the defaults assume the worst, and that no client then showed annotations in approval prompts. Set them explicitly and honestly, and enforce scopes on the server anyway.
How many tools is too many for one server?
The checklist sets no number; it asks for a few high-impact, task-shaped tools with no confusable near-duplicates. The warning sign is the anti-pattern in the appendix: a server generated from a 120-endpoint OpenAPI spec gives the model 120 tools, wrong picks and flooded context. If you need a large catalog anyway, split it by task, and give each agent an allowlist of only the tools it needs (Appendix A, section 2).
How do I diff tool descriptions on update in practice?
Snapshot the server's tools/list output (names, descriptions, schemas, annotations) into your repository when you pin a version. On every upgrade, fetch it again and fail CI if the snapshot changed without review. Description changes are prompt changes: a changed description is how a rug pull reaches the model. Deterministic tools/list ordering, which the 2026-07-28 spec asks for, keeps the diff readable and helps prompt caching.
Should I ship a local stdio server or a remote Streamable HTTP server?
Remote for anything shared between users or holding credentials: HTTPS, OAuth with audience-bound tokens and minimal scopes, one place to patch. Local stdio for single-user developer tools, run sandboxed with filesystem and network allowlists. Treat the configured command as code execution: in 2026 OX Security showed MCP SDKs run configured STDIO commands without sanitization (Chapter 20), so keep that config managed and out of the model's reach.
Self-check (5)
Score: 0 / 5 (0 answered)
Question 1 of 5
A tool has no annotations. How should a client treat it?
Show the answer
Answer: B.
The annotation defaults assume the worst. That is why Appendix B asks for every hint to be set explicitly.
Question 2 of 5
A tool call fails schema validation. How should the server return it?
Show the answer
Answer: B.
Validation failures return as tool execution errors so the model can self-correct (SEP-1303). A 500 is never success.
Question 3 of 5
Which of these did the 2026-07-28 revision remove rather than deprecate?
Show the answer
Answer: B.
Sessions and the header are removed; state moves to server-minted handles. Sampling, Roots and Dynamic Client Registration are deprecated and still work during the window.
Question 4 of 5
Your server keeps state in a handle passed as a tool argument. What must also be true?
Show the answer
Answer: B.
The security best practices warn that possession of a handle is not authentication. Check the caller owns it.
Question 5 of 5
A server generated from a 120-endpoint OpenAPI spec exposes 120 tools. What does the checklist recommend?
Show the answer
Answer: B.
The CRUD wrapper causes wrong picks, extra calls and flooded context. Fewer, task-shaped tools fix it more cheaply than a model change.
Sources
Sources cited
- Model Context Protocol, Key Changes (2026-07-28 specification changelog), July 2026. modelcontextprotocol.io
- Anthropic, Writing effective tools for agents, with agents, September 2025. anthropic.com
- Model Context Protocol, Key Changes (2025-11-25 specification changelog), November 2025. modelcontextprotocol.io
- Model Context Protocol, Tools (2026-07-28 specification), July 2026. modelcontextprotocol.io
- Model Context Protocol Blog, Tool Annotations as Risk Vocabulary: What Hints Can and Can't Do, March 2026. blog.modelcontextprotocol.io
- Model Context Protocol, Security Best Practices (2026-07-28 specification), July 2026. modelcontextprotocol.io
- Model Context Protocol, Authorization (2026-07-28 specification), July 2026. modelcontextprotocol.io
- Anthropic, Bringing MCP 2026-07-28 to Claude, July 2026. claude.com
Further reading
- Simon Willison, Model Context Protocol has prompt injection security problems, April 2025. simonwillison.net
- Invariant Labs, MCP Security Notification: Tool Poisoning Attacks, April 2025. invariantlabs.ai
- Anthropic, Code execution with MCP: Building more efficient agents, November 2025. anthropic.com
- Agent Skills, Specification. agentskills.io
- OpenAI, Add custom MCP server (OpenAI API docs), accessed November 2026. developers.openai.com