A task-augmented tools/call can't return a CreateTaskResult on a 2025-11-25 session
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 66/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- node.js, typescript
調査の方向性
Start by reading the server's tools/call request handler and result validation, then compare it with the 1.32.1 behavior described in the issue. Reproduce the case with params.task and the supplied handler result. Done means the task request accepts and returns a valid CreateTaskResult on the 2025-11-25 path while ordinary tool calls continue to validate as CallToolResult.
索引モデルが issue の本文から書いたものです。
説明
Package: @modelcontextprotocol/server 2.4.0
Compared with: @modelcontextprotocol/sdk 1.32.1
Runtime: Node.js 24.22.1
Summary
In the 2025-11-25 revision, a tools/call whose params carry task is answered with a CreateTaskResult ({ task: { taskId, status, … } }). Server wraps every tools/call handler and validates its result as a CallToolResult, whatever the request carried, so a server that implements 2025-11-25 tasks itself gets -32602 Invalid tools/call result instead of its task result. 1.32.1 validated the result against CreateTaskResultSchema when params.task was set.
This is the 2025-11-25 core tasks path (params.task on tools/call), not the 2026-07-28 tasks extension covered by #2637.
Reproduction
const { Server, InMemoryTransport } = require('@modelcontextprotocol/server');
const { Client } = require('@modelcontextprotocol/client');
(async () => {
const server = new Server({ name: 'repro', version: '1.0.0' }, { capabilities: { tools: {} } });
const now = new Date().toISOString();
server.setRequestHandler('tools/call', async () => ({
task: { taskId: 't-1', status: 'working', ttl: 60000, createdAt: now, lastUpdatedAt: now },
}));
const [clientTransport, serverTransport] = InMemoryTransport.createLinkedPair();
await server.connect(serverTransport);
const client = new Client({ name: 'c', version: '1' });
await client.connect(clientTransport);
const passThrough = { '~standard': { version: 1, vendor: 'repro', validate: (value) => ({ value }) } };
const result = await client
.request({ method: 'tools/call', params: { name: 'slow', arguments: {}, task: { ttl: 60000 } } }, passThrough)
.catch((error) => error.message);
console.log(result);
})();
Expected
The CreateTaskResult the handler returned.
Actual
Invalid tools/call result: [ { "code": "custom",
"message": "content is required when the body carries 'task' — another result family cannot default into an empty tools/call success", … } ]
Suggestion
When the request carries params.task on a 2025-era session, validate the result as a CreateTaskResult (as 1.x did), even without a built-in tasks runtime, so servers that keep their own task store can serve 2025-11-25 tasks.
- 主要言語
- TypeScript
- スター
- 13.8k
- フォーク
- 2.5k
- 平均マージ
- 6日 23時間
- マージ済み PR(30日)
- 2
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
modelcontextprotocol/typescript-sdk のほかの issue
-
v2
難易度 1/5 1時間未満 初心者へのやさしさ 72/100
modelcontextprotocol/typescript-sdk#3270 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
`callTool` with `allowInputRequired: true` throws on an `input_required` result when the tool declares an `outputSchema`対応中かも @mgoldsborough が 6 日前に担当しました。 オープンv2
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
modelcontextprotocol/typescript-sdk#3249 ·
メンテナーはふだん 1 日以内に返信
-
v2
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
modelcontextprotocol/typescript-sdk#3243 · コメント 3 件 ·
メンテナーはふだん 1 日以内に返信
-
TypeScript client accepts an unknown `resultType` in the first `server/discover` reply対応中かも @Tidehyc が 8 日前に担当しました。 オープンv2
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
modelcontextprotocol/typescript-sdk#3235 · コメント 3 件 ·
メンテナーはふだん 1 日以内に返信
-
UriTemplate.match() throws a TypeError on an empty expression it accepts対応中かも @yunusemrejs が 12 日前に担当しました。 オープンv1 v2
難易度 2/5 1〜3時間 初心者へのやさしさ 80/100
modelcontextprotocol/typescript-sdk#3221 · コメント 3 件 ·
メンテナーはふだん 1 日以内に返信
modelcontextprotocol/typescript-sdk の issue をすべて見る
似ている issue
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
Vessel9817/onion-site-template#512 ·
メンテナーはふだん 1 日以内に返信
-
nightly-tests
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
BlackBeltTechnology/pi-agent-dashboard#1256 ·
メンテナーはふだん 1 日以内に返信
-
approved
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
fritzprix/libr-agent#3266 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
better-auth/better-auth#13101 · コメント 1 件 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信