Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

tasks/get examples under "Task Execution Errors" use "resultType": "task"; prose and schema require "complete"

Đang mở Phù hợp với người mới
#23 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
1/5
Thời gian dự kiến
Dưới một giờ
Mức phù hợp với người mới
95/100
Loại issue
Tài liệu
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
markdown, typescript
Lĩnh vực
documentation

Hướng nghiên cứu

Issue chỉ ra hai dòng cụ thể trong specification/2026-07-28/tasks.md và specification/draft/tasks.md nơi các ví dụ sử dụng sai "resultType": "task". Cách sửa là đổi chúng thành "resultType": "complete" như được hiển thị trong diff. Xác minh các thay đổi bằng cách kiểm tra các ví dụ xung quanh và văn bản chuẩn mực. Chạy bất kỳ tập lệnh linting hoặc xác thực tài liệu nào nếu có.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

What's wrong

Two example responses in Task Execution Errors show a tasks/get result with "resultType": "task":

  • specification/2026-07-28/tasks.md:846, in "Example: Task with JSON-RPC execution error"
  • specification/2026-07-28/tasks.md:870, in "Example: Tool call completed with tool error (isError: true)"

specification/draft/tasks.md has the same text at the same line numbers.

Both are tasks/get responses. The section says so (tasks.md:835: "The tasks/get response SHOULD include a statusMessage…"), and the text after the second example calls it "The tasks/get endpoint" (:889).

The normative text says the opposite:

  • tasks.md:338: "The resultType field MUST be set to "complete" on this object as it is the standard result shape for the tasks/get request."
  • tasks.md:102: "Servers MUST NOT set resultType to "task" on result types other than CreateTaskResult."
  • schema/2026-07-28/schema.ts:224 and schema/draft/schema.ts:224: GetTaskResult has resultType: "complete";.

The other tasks/get examples in the same file already use "complete" (:577, :610, :655, :733, :762).

Why it matters

Implementers copy examples. A client that switches on resultType and treats "task" as "this is a CreateTaskResult, start polling" would handle a terminal tasks/get response as a new task handle. A server built from these examples would break the MUST at :338.

Suggested fix (docs only)
--- a/specification/2026-07-28/tasks.md
+++ b/specification/2026-07-28/tasks.md
@@ -843,7 +843,7 @@
   "jsonrpc": "2.0",
   "id": 4,
   "result": {
-    "resultType": "task",
+    "resultType": "complete",
     "taskId": "786512e2-9e0d-44bd-8f29-789f820fe840",
     "status": "failed",
@@ -867,7 +867,7 @@
   "jsonrpc": "2.0",
   "id": 5,
   "result": {
-    "resultType": "task",
+    "resultType": "complete",
     "taskId": "786512e2-9e0d-44bd-8f29-789f820fe840",
     "status": "completed",

Apply the same two changes to specification/draft/tasks.md (same line numbers). Nothing normative changes.

Ngôn ngữ chính
TypeScript
Star
46
Fork
9
Merge trung bình
14 ngày 1 giờ
Pull request đã merge (30 ngày)
1

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của modelcontextprotocol/ext-tasks

Tất cả issue của modelcontextprotocol/ext-tasks

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.