Skip to content

fix(SEP-2663): specify -32003 error for missing client capability#2756

Merged
dsp-ant merged 6 commits into
modelcontextprotocol:mainfrom
LucaButBoring:fix/tasks-capability-error
May 29, 2026
Merged

fix(SEP-2663): specify -32003 error for missing client capability#2756
dsp-ant merged 6 commits into
modelcontextprotocol:mainfrom
LucaButBoring:fix/tasks-capability-error

Conversation

@LucaButBoring

@LucaButBoring LucaButBoring commented May 20, 2026

Copy link
Copy Markdown
Contributor

Adds error-handling requirements to #2663 specify that -32003 is the correct error for servers to return when a server supports the Tasks extension and a client that does not declare the extension capability attempts to call tasks/get, tasks/update, or tasks/cancel - with an additional carveout for servers supporting both the extension and the 2025-11-25 version of tasks.

The backwards-compatibility section has been converted into a matrix for readability.

Motivation and Context

Currently, the Tasks extension specification does not declare a specific error for servers to return if a client invokes a Task-related method without supporting the extension. It does declare that servers must return -32003 (Missing Required Client Capability) if they require a client to support receiving CreateTaskResult, but this does not imply any behavior regarding other task methods, like tasks/update.

The current spec is ambiguous on this point, and both -32601 and -32003 are reasonable errors to return in this scenario, but we will require -32003 as it more accurately reflects the server's state. -32601 would imply that it does not support Tasks at all, while -32003 clarifies that the server does, but the client does not.

How Has This Been Tested?

N/A

Breaking Changes

N/A

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update

Checklist

  • I have read the MCP Documentation
  • My code follows the repository's style guidelines
  • New and existing tests pass locally
  • I have added appropriate error handling
  • I have added or updated documentation as needed

Additional context

Identified in modelcontextprotocol/conformance#262 (comment)

@LucaButBoring LucaButBoring requested review from a team as code owners May 20, 2026 21:22
@kurtisvg kurtisvg changed the title Correct SEP-2663 to specify -32003 error for missing client capability fix(SEP-32003): specify -32003 error for missing client capability May 20, 2026
@LucaButBoring LucaButBoring changed the title fix(SEP-32003): specify -32003 error for missing client capability fix(SEP-2756): specify -32003 error for missing client capability May 20, 2026
@LucaButBoring LucaButBoring changed the title fix(SEP-2756): specify -32003 error for missing client capability fix(SEP-2663): specify -32003 error for missing client capability May 20, 2026
Comment thread seps/2663-tasks-extension.md Outdated
@LucaButBoring

Copy link
Copy Markdown
Contributor Author

Converted backwards-compatibility section into a matrix and moved the note about 2025-11-25 from the error-handling section into it: https://github.com/LucaButBoring/modelcontextprotocol/blob/fix/tasks-capability-error/seps/2663-tasks-extension.md#backward-compatibility

Comment thread seps/2663-tasks-extension.md Outdated
LucaButBoring and others added 2 commits May 26, 2026 11:57
Co-authored-by: Peter Alexander <pja@anthropic.com>

@halter73 halter73 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.

This looks good to me. Our current plan for the C# SDK is to not support the experimental 2025-11-25 task extension and the 2026-06-30 task version simultaneously in the same SDK package. The idea is that new versions of the SDK will continue to support the basic 2025-11-25 protocol for some time, but not the task part.

For SDKs/servers that want to attempt supporting both versions of the task extensions, making it clear that you should use protocol version negotiation to determine which task surface to expose makes sense.

@dsp-ant dsp-ant merged commit 19cd19b into modelcontextprotocol:main May 29, 2026
5 checks passed
@LucaButBoring LucaButBoring deleted the fix/tasks-capability-error branch May 29, 2026 19:01
LucaButBoring added a commit to modelcontextprotocol/ext-tasks that referenced this pull request May 29, 2026
LucaButBoring added a commit to modelcontextprotocol/agents-wg that referenced this pull request May 29, 2026

## Backward Compatibility

The experimental tasks feature in the `2025-11-25` release is **not wire-compatible** with this extension. Specifically:

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.

I would leave this section as I think it's a good call out of what's changed.

Implementations that need to bridge legacy clients can shim at the SDK level: a server can implement both the experimental and extension surfaces in parallel, dispatching based on which capability and protocol version the client negotiated.
| Protocol Version | `tasks.*` (legacy) | `io.modelcontextprotocol/tasks` |
| ---------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `2025-11-25` | Legacy experimental tasks per the `2025-11-25` specification. The client opts into task augmentation per request via the `task` parameter on `CallToolRequest`; the server uses `tasks/result`, `tasks/get`, `tasks/cancel`, and (where supported) `tasks/list` per that specification. This extension does not apply. | This extension is not defined under the `2025-11-25` protocol version. Servers **MUST NOT** treat this capability as enabling tasks under that protocol version; requests proceed as if the client had declared no task capability at all. |

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.

This table is a little confusing, I was trying to get to something that would clearly state expected behavior and support for SDK maintainers something like..

Client Supports Server Supports Negotiated Version Expected Tasks Behavior
2025-11-25 2025-11-25 2025-11-25 Works, Experimental Tasks Feature as defined in 2025-11-25
2026-06-30 2026-06-30 2026-06-30 Tasks Extension
Both Both 2026-06-30 Highest common version wins. Full extension behavior.
Both 2026-06-30 2026-06-30 Tasks Extension
Both 2025-11-25 2025-11-25 Experimental Tasks Feature
2026-06-30 Both 2026-06-30 Tasks Extension
2025-11-25 2026-06-30 None -32602 Unsupported protocol version
2026-06-30 2025-11-25 None -32602 Unsupported protocol version

Although after writing this out, it looks a lot more like protocol negotiation.

I think the thing we are missing is what is the expected error code if an 11-25-25 client or prior version includes the tasks extension when talking to servers that support old & new versions?

Should this be an unsupported protocol version error? Should the server just ignore it as a malformed request?

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.

For Servers that want to support both versions during the transition, there is an interesting question of what the Server/discover should look like.

I think they advertise both the extension and the capability, and then Clients which support both need to know that if they pick 11-25-25 they need to use capabilities and if they pick 06-30-26 they need to use the extension, and not mix them.

Although this is such an edge case that maybe we don't worry about it. I know C# SDK is just not going to support both. Not sure what Python, Typescript and Go the other Tier1 SDKs are doing

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.

server/discover only returns what is supported for the requested protocol version (or errors if that protocol is unsupported)

So for 2026-07-28 it returns the extension and for 2025-11-25 it returns the capability.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants