tools-call-simple-text passes when the tool does not exist
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 65/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- javascript, nodejs, typescript
調査の方向性
Look at the conformance test scenario 'tools-call-simple-text' in the test suite. The bug is that it incorrectly accepts an error response as a success. Examine the test logic that checks the result, likely in a file handling MCP tool call scenarios. Understand how the test validates 'isError' and the content text. Run the provided minimal server to reproduce the issue, then modify the test to fail when 'isError' is true or when the tool is not found.
索引モデルが issue の本文から書いたものです。
説明
tools-call-simple-text reports SUCCESS against a server that has no test_simple_text tool. The server's "not found" error result is accepted as "returns simple text content".
Reproduced on 0.1.16 and 0.2.0-alpha.11.
Server: a minimal Streamable HTTP server on the official TypeScript SDK with one tool, get_forecast (full source below).
npx @modelcontextprotocol/conformance server --url http://127.0.0.1:3932/mcp --scenario tools-call-simple-text
# Passed: 1/1 (0.1.16), Passed: 2/2 (0.2.0-alpha.11)
checks.json records the evidence for the pass:
{"id":"tools-call-simple-text","status":"SUCCESS",
"details":{"result":{"content":[{"type":"text","text":"MCP error -32602: Tool test_simple_text not found"}],"isError":true}}}
Expected: FAILURE (or not-applicable) when the result has isError: true, and ideally a check that the text is the fixture's expected text. As it stands, any server that answers an unknown tool with an isError text result passes. That is every server built on the TypeScript SDK.
This looks like the same class of bug as #505, where a scenario accepts tool-error results in place of the success it is meant to verify. The other tools-call-* scenarios may be worth auditing for the same thing.
minimal.mjs
import express from "express";
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
import { StreamableHTTPServerTransport } from "@modelcontextprotocol/sdk/server/streamableHttp.js";
import { z } from "zod";
function build() {
const s = new McpServer({ name: "weather", version: "1.0.0" });
s.tool("get_forecast", "Get the forecast for a city.", { city: z.string() },
{ readOnlyHint: true }, async ({ city }) => ({ content: [{ type: "text", text: `Sunny in ${city}` }] }));
return s;
}
const app = express();
app.use(express.json());
app.post("/mcp", async (req, res) => {
const server = build();
const transport = new StreamableHTTPServerTransport({ sessionIdGenerator: undefined });
res.on("close", () => { transport.close(); server.close(); });
await server.connect(transport);
await transport.handleRequest(req, res, req.body);
});
app.get("/mcp", (req, res) => res.status(405).end());
app.listen(Number(process.env.PORT), "127.0.0.1");
- 主要言語
- TypeScript
- スター
- 127
- フォーク
- 101
- 平均マージ
- 4日 7時間
- マージ済み PR(30日)
- 6
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
modelcontextprotocol/conformance のほかの issue
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
modelcontextprotocol/conformance#315 · コメント 1 件 ·
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
modelcontextprotocol/conformance#312 · コメント 1 件 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 55/100
-
難易度 4/5 3〜5日 初心者へのやさしさ 40/100
-
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
modelcontextprotocol/conformance の issue をすべて見る
似ている issue
-
VerificationGate: ATTRIBUTION quote guard never matches a normal quotation (\b around the quote) オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
danielmiessler/LifeOS#2234 ·
-
T: Bug
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
-
難易度 1/5 1時間未満 初心者へのやさしさ 85/100
-
Mend: dependency security vulnerability untriaged
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100