Skip to content

Split McpTasksCapability into ServerMcpTasksCapability and ClientMcpTasksCapability#1529

Open
jayaraman-venkatesan wants to merge 2 commits intomodelcontextprotocol:mainfrom
jayaraman-venkatesan:refactor/split-mcp-tasks-capability-server-client
Open

Split McpTasksCapability into ServerMcpTasksCapability and ClientMcpTasksCapability#1529
jayaraman-venkatesan wants to merge 2 commits intomodelcontextprotocol:mainfrom
jayaraman-venkatesan:refactor/split-mcp-tasks-capability-server-client

Conversation

@jayaraman-venkatesan
Copy link
Copy Markdown
Contributor

Split McpTasksCapability into ServerMcpTasksCapability and ClientMcpTasksCapability

Closes #1183

What changed

McpTasksCapability and RequestMcpTasksCapability were shared by both ServerCapabilities.Tasks and
ClientCapabilities.Tasks, but their valid sub-capabilities are role-specific:

  • Servers only support tasks.requests.tools.call
  • Clients only support tasks.requests.sampling.createMessage and tasks.requests.elicitation.create

The single shared type allowed setting sampling/elicitation capabilities on a server (and tools on a client)
with no compile-time error.

After this change

Type Used in Requests type
ServerMcpTasksCapability ServerCapabilities.Tasks ServerRequestMcpTasksCapabilityTools only
ClientMcpTasksCapability ClientCapabilities.Tasks ClientRequestMcpTasksCapabilitySampling + Elicitation only

Each capability file is named after its dominant type, consistent with the existing convention in the Protocol/ folder.

No behavioral changes — JSON property names and all capability check paths are identical.

Copy link
Copy Markdown
Contributor

@mikekistler mikekistler left a comment

Choose a reason for hiding this comment

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

Looks good. 👍

Just a few minor documentation issues to fix.

Comment on lines +11 to +13
/// The tasks capability enables servers to augment their requests with tasks for long-running
/// operations. Tasks are durable state machines that carry information about the underlying
/// execution state of requests.
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.

Tasks are not necessary for long-running operations.

Suggested change
/// The tasks capability enables servers to augment their requests with tasks for long-running
/// operations. Tasks are durable state machines that carry information about the underlying
/// execution state of requests.
/// The tasks capability enables servers to augment their requests with tasks to enable status
/// monitoring and persistent result retreval. Tasks are durable state machines that carry
/// information about the underlying execution state of requests.

Comment on lines 75 to 77
/// The tasks capability enables clients to augment their requests with tasks for long-running
/// operations. When present, clients can request that certain operations (like tool calls)
/// execute asynchronously, with the ability to poll for status and retrieve results later.
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.

Tasks are not necessary for long-running operations.

Suggested change
/// execute asynchronously, with the ability to poll for status and retrieve results later.
/// The tasks capability enables clients to augment their requests with tasks to enable status
/// monitoring and persistent result retreval. When present, clients can request that certain
/// operations (like tool calls) support the ability to poll for status and retrieve results later.

Comment on lines +11 to +13
/// The tasks capability enables clients to augment their requests with tasks for long-running
/// operations. Tasks are durable state machines that carry information about the underlying
/// execution state of requests.
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.

Tasks are not necessary for long-running operations.

Suggested change
/// The tasks capability enables clients to augment their requests with tasks for long-running
/// operations. Tasks are durable state machines that carry information about the underlying
/// execution state of requests.
/// The tasks capability enables clients to augment their requests with tasks to enable status
/// monitoring and persistent result retreval. Tasks are durable state machines that carry
/// information about the underlying execution state of requests.

@mikekistler mikekistler requested a review from halter73 May 8, 2026 02:31
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.

Split ElicitationMcpTasksCapability into server and client versions

3 participants