Repository navigation
CTX7-3290: Clearer Admin MCP error messages - #3525
Merged
Merged
Conversation
- An API error leads with status, code and message (tools without third-party data), then the next step; untrusted tools keep the whole body fenced. - 404 says an id of another teamspace also answers 404. - 5xx says the failure is temporary and to retry later. - A network failure says to read the state before a write is retried.
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
ramazanoacar
approved these changes
Oct 23, 2026
ramazanoacar
left a comment
Contributor
There was a problem hiding this comment.
Thanks, these read much better for an agent. Putting the status, code and message on one line, while keeping the message inside the fence for untrusted tools, is a nice balance, and checking the code against ^[a-z0-9_]+$ is a good touch.
Suggestions (non-blocking)
- The 5xx hint says "Try again in a minute". A 502 or 504 can come back after the write was already saved, which is the same situation as the network-failure case. For write calls, maybe reuse that advice: "read the state with the matching get_ or list_ tool before you try again".
- The network-failure message adds
.afterreason, so a reason that already ends with a period becomes... You could reuse the/[.!?]$/check from the message path.
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.
Error messages an agent can act on.
The Context7 API answered HTTP 404 not_found: Rule not found. <next step>. Before, the API message came after the status line, inside JSON. Other body fields still follow as JSON.an API error body of an untrusted tool is fenced tootests). Only the status and a validated error code lead.teamspace.Tests: 30 pass (1 new).