CLI: method-specific flags given to another method are silently ignored (--cursor / --tool-arg on tools/list, …)
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 62/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- nodejs, typescript
- Lĩnh vực
- cli
Hướng nghiên cứu
Các cờ được phân tích trong phần xử lý đối số CLI của chế độ --cli của inspector, nơi --load-scenario và --advertise-apps đã từ chối các cờ không tương thích bằng lỗi sử dụng. Hãy bắt đầu từ đó và tìm phần kiểm tra ánh xạ giữa phương thức và cờ đang có. Thêm một kiểm tra tương tự để --cursor, --tool-arg và các cờ riêng cho phương thức khác thất bại kèm thông báo nêu tên các phương thức mà chúng áp dụng. Hoàn thành khi tools/list --cursor abc thoát với mã khác không kèm thông báo đó, và các tổ hợp hợp lệ vẫn chạy được.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Which version line?
v2 — current (@modelcontextprotocol/inspector@latest)
Which client?
CLI
Inspector version
2.17.0 (main @ 2069a1a, built from source)
Node version
v22.23.5
Operating system (and browser, for the web client)
Linux
Transport
stdio
MCP server under inspection
Minimal echo server (probe-echo.mjs), SDK 2.4.0:
import * as z from "zod/v4";
import { McpServer } from "@modelcontextprotocol/server";
import { StdioServerTransport } from "@modelcontextprotocol/server/stdio";
const server = new McpServer({ name: "probe-echo", version: "1.0.0" });
server.registerTool("echo_raw", { description: "Echo raw arguments", inputSchema: z.object({}).passthrough() },
async (args) => ({ content: [{ type: "text", text: JSON.stringify(args) }] }));
server.registerPrompt("echo_prompt", { description: "Echo", argsSchema: { a: z.string().optional(), b: z.string().optional() } },
async (args) => ({ messages: [{ role: "user", content: { type: "text", text: JSON.stringify(args) } }] }));
await server.connect(new StdioServerTransport());
Steps to reproduce
mcp-inspector --cli node probe-echo.mjs --method tools/list --cursor abc # exit 0, full list
mcp-inspector --cli node probe-echo.mjs --method tools/list --tool-arg a=1 # exit 0
Expected behavior
A usage error naming the methods the flag applies to. The CLI already follows this rule elsewhere: --advertise-apps and --strict are rejected where they would be ignored (the code comment: an invocation "cannot accept the flag and ignore it"), and --load-scenario rejects --tool-name / --tool-arg because they "would be silently overridden".
Actual behavior
Exit 0; the flag has no effect. This matters most for --cursor: tools/list, resources/list and prompts/list take a cursor in MCP, so a script paging with --cursor appears to work but gets the same page every time.
Logs, errors, or screenshots
Suggested fix: a table from each method-specific flag (--tool-name, --tool-arg, --tool-args-json, --tool-metadata, --prompt-name, --prompt-args, --uri, --cursor, --event-name, --event-arg, --log-level) to the methods that use it, rejecting any other combination. Alternatively, support --cursor on the */list methods.
Already prototyped a fix?
No response
Before you submit
- I searched existing issues and this is not a duplicate.
- This is not a security vulnerability report (those go through the private advisory process).
- Ngôn ngữ chính
- TypeScript
- Star
- 11.3k
- Fork
- 1.6k
- Merge trung bình
- 2 giờ 28 phút
- Pull request đã merge (30 ngày)
- 111
Chuẩn bị môi trường
- Có Dockerfile hoặc tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của modelcontextprotocol/inspector
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
modelcontextprotocol/inspector#3072 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
CLI/mcpdo: a timeout above 2147483647 ms fires after 1 ms, and the error says to raise it furtherĐang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
modelcontextprotocol/inspector#3071 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
modelcontextprotocol/inspector#3069 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
CLI --tool-args-json silently sends 1e400 as null (round-trip guard missing; mcpdo rejects it)Đang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
modelcontextprotocol/inspector#3067 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
modelcontextprotocol/inspector#3066 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của modelcontextprotocol/inspector
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
MetaMask/eth-phishing-detect#317371 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
android:player ios:player
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Maintainer thường phản hồi trong vòng 1 ngày
-
free_port can hand one port to two callers, so the fixed-port http tests fail in parallel runsĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 92/100
erkamyaman/rust-anything#963 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
ZdruzenieSTROM/webstrom-frontend#934 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug(worker): detector run is marked failed and never retried when span download failsCó thể đã có người làm @jagrutgarg đã nhận hôm nay. Đang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
traceroot-ai/traceroot#3434 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày