modelcontextprotocol / modelcontextprotocol/php-sdk

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

Offen
#345 0 Kommentare 1 Reaktion 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

2026-07-28 enhancement improves spec compliance Schema
Vorherrschende Sprache
PHP
Sterne
1.6k
Forks
173
Ø Merge
2 T. 49 Min.
Gemergte PRs (30 T.)
23

Beschreibung

Schema portion of SEP-2663 (Tasks extension, io.modelcontextprotocol/tasks) for the 2026-07-28 release. Tracked by umbrella #335; sits on the SEP-2133 extensions framework (#344).

Scope

  • Mcp\Schema\Task: taskId, status, createdAt, lastUpdatedAt, ttlMs, pollIntervalMs, statusMessage, result, error, inputRequests. Flat on the wire in both places it appears (no nested task key). Enforces the status semantics: a tool that ran and reported a problem is completed with isError; failed is reserved for protocol-level errors and carries the error inlined.
  • Mcp\Schema\Enum\TaskStatus: working, input_required, completed, failed, cancelled (what the merged spec and conformance suite use — not pending/running).
  • Mcp\Schema\Enum\ResultType::Task ("task") alongside Complete and InputRequired.
  • CreateTaskResult — a result in its own right (resultType: "task" + the task envelope), returned by any task-augmentable handler instead of a discriminator bolted onto CallToolResult.
  • TaskResult for tasks/get; tasks/update and tasks/cancel answer EmptyResult.
  • TasksGetRequest, TasksUpdateRequest (taskId, inputResponses), TasksCancelRequest.
  • inputRequests reuse the multi round-trip (SEP-2322) encoding: a map of server-assigned keys to bare method/params pairs.

Notes

SEP-2663 supersedes SEP-1686 (#139, closed).

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
  3. Forke das Repository und arbeite in einem Branch.
  4. Öffne einen Pull Request, der die Issue-Nummer nennt.

Rechercherichtung

Beginne mit den bestehenden Schema- und Enum-Mustern für TaskStatus, ResultType, CallToolResult und EmptyResult und prüfe anschließend das Erweiterungs-Framework in #344 sowie den übergeordneten Umfang in #335. Implementiere die aufgeführten Task-Envelope-, Ergebnis-, Request- und Enum-Typen unter Beibehaltung der flachen Wire-Struktur und der inputRequests-Kodierung; fertig ist die Arbeit, wenn alle benannten Typen und die Statussemantik der zusammengeführten Spezifikation und den Conformance-Erwartungen entsprechen.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
php
Bereich
api, backend-api-design
Issue-Typ
Feature
Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Aktivitätsstatus
Ruhig
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
48/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.