Skip to content

[Schema] SEP-2663 Tasks: Task shape, resultType discriminator, tasks/* request/result types #345

@chr-hertel

Description

@chr-hertel

Implements the schema portion of SEP-2663 for the MCP Spec 2026-07-28 release.

Tracked by umbrella #335. Depends on SEP-2133 extensions framework.

Spec summary

Reframes Tasks as a stateless, server-directed extension. Servers may respond to any tools/call (or any future task-augmented method) with a polymorphic result discriminated by resultType: "task" — a task handle — instead of a final result. Clients then poll via tasks/get, tasks/update, and tasks/cancel.

PHP SDK changes

  • Add Task shape under src/Schema/: taskId, status enum (pending/running/input_required/completed/cancelled/failed), result, error, list of pending server-to-client requests.
  • Add resultType: "task" discriminator on CallToolResult (and any other task-augmentable result types).
  • Add TaskGetRequest/Result, TaskUpdateRequest/Result, TaskCancelRequest/Result under src/Schema/Request/ and src/Schema/Result/.
  • Add task status enum under src/Schema/Enum/.

Notes

SEP-2663 supersedes SEP-1686. Issue #139 (SEP-1686 Tasks placeholder) is being closed in favor of this milestone.

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    2026-07-28All issues and PRs related to the spec release 2026-07-28P0Broken core functionality, security issues, critical missing featureSchemaIssues & PRs related to the Schema componentenhancementRequest for a new feature that's not currently supportedimproves spec complianceImproves consistency with other SDKs such as TyepScript

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status
    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions