Update McpErrorCode XML docs and fix error code usage to align with MCP spec#1291
Update McpErrorCode XML docs and fix error code usage to align with MCP spec#1291stephentoub merged 5 commits intomainfrom
Conversation
Co-authored-by: stephentoub <2642209+stephentoub@users.noreply.github.com>
|
@copilot, do all uses of error codes in the repo conform to this guidance? If not, fix them |
Co-authored-by: stephentoub <2642209+stephentoub@users.noreply.github.com>
Reviewed all uses of error codes in the repository and fixed them to conform to the updated guidance. Key changes in commit 5b3348f:
All builds pass and tests validate the correct error codes are now being used. Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
|
@copilot for the Terminal task cancellation change, doesn't that introduce a race condition? Is that acknowledged in the spec? |
You're absolutely correct - there is a race condition. Between the The task store's I need to verify what the MCP spec actually requires here. The XML docs I added mention "attempting to cancel a task already in a terminal status" as an InvalidParams case, but this conflicts with idempotency principles. If the spec doesn't explicitly mandate the error, I should revert to the idempotent behavior and update the documentation accordingly. Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
…havior Co-authored-by: stephentoub <2642209+stephentoub@users.noreply.github.com>
Co-authored-by: stephentoub <2642209+stephentoub@users.noreply.github.com>
|
@copilot Capture brief notes for why this is a behavioral breaking change. |
Behavioral Breaking Change
|
Update XML documentation for McpErrorCode enum members
MethodNotFounddocumentation to clarify undeclared capabilities in both directionsInvalidParamsdocumentation to include complete list (Tasks, Elicitation, Sampling)MethodNotFoundandInvalidParamsin codebaseMethodNotFoundfor task support validation (should beInvalidParams)Add validation for canceling tasks in terminal status(reverted - breaks idempotency)Summary of changes:
MethodNotFoundtoInvalidParams(tools with forbidden/required task support)Added validation to prevent canceling tasks in terminal statusREVERTED - MCP spec requires cancel operations to be idempotentOriginal prompt
This pull request was created from Copilot chat.
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.