Skip to content

[Docs] Use ToolCallException in the first tool example and add builder defaults - #554

Merged
chr-hertel merged 2 commits into
modelcontextprotocol:mainfrom
chr-hertel:docs-tools-builder
Oct 8, 2026
Merged

chr-hertel merged 2 commits into
modelcontextprotocol:mainfrom
chr-hertel:docs-tools-builder

Conversation

@chr-hertel

Copy link
Copy Markdown
Member
  • First tool example threw \InvalidArgumentException, which reaches the client only as "Error while executing tool" - now ToolCallException, like the error handling section recommends
  • Modern-era builder options get their defaults and limits as code comments: 32 byte minimum for the request state key, 8 rounds / 600s for the input-required shim, 30s subscription lifetime

@chr-hertel
chr-hertel requested a balanced review from Copilot October 7, 2026 23:12
@chr-hertel chr-hertel added bug Something isn't working documentation Improvements or additions to documentation labels Oct 7, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

Only a minor, non-blocking documentation wording correction remains.

1 open finding
What changed in this PR

Updates server documentation to demonstrate client-visible tool errors and explain builder defaults and limits.

Changes:

  • Uses ToolCallException in the calculator example.
  • Adds comments covering request-state keys, shim limits, and subscription lifetime.
File Description
docs/​servers/​tools.md Updates example exception handling.
docs/​run/​server-builder.md Documents configuration defaults and limits.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread docs/run/server-builder.md Outdated
@chr-hertel
chr-hertel merged commit 2b90f24 into modelcontextprotocol:main Oct 8, 2026
28 checks passed
@chr-hertel
chr-hertel deleted the docs-tools-builder branch October 8, 2026 00:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants