CLI: an unsupported --method plus a method-specific flag reports the flag error, not "Unsupported method"

オープン 初心者向け
#3,133 コメント 2 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
67/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
typescript
領域
cli

調査の方向性

Issue では、ワンショット CLI のメソッド検証とメソッドごとのフラグチェックが示されていますが、ファイルやテストは挙げられていません。まず、--method のサポートがどこでチェックされ、--uri や --event-name などのフラグがどこで検証されるかを追跡し、次に関連する CLI テストを見つけてください。サポートされていないメソッドが、メソッド固有のフラグエラーより先にサポート対象外として報告され、既存の終了動作が維持されれば完了です。

索引モデルが issue の本文から書いたものです。

説明

bug v2

Found during the v2.18.0 release smoke (#3127), driving #3073 / PR #3081.

Problem

PR #3081 says events/stream and resources/subscribe, which the one-shot CLI does not support, "are rejected as unsupported first". That holds only when no method-specific flag is passed. Given one, the flag's error wins, and it reads as if the method existed:

$ mcp-inspector --cli node srv.mjs --method resources/subscribe --uri file:///x
--uri applies only to --method resources/read, --method resources/directory/read or --method skills/get; it has no effect with --method resources/subscribe.

$ mcp-inspector --cli … --method events/stream --event-name x
--event-name applies only to --method events/poll; it has no effect with --method events/stream.

Without the flag, the CLI correctly prints Unsupported method: resources/subscribe. Supported --cli methods: …. Every case exits 1, so scripts are unaffected; only the message misleads.

Expected

An unsupported --method is reported as unsupported before the per-method flag checks run.

主要言語
TypeScript
スター
11.4k
フォーク
1.6k
平均マージ
2時間 27分
マージ済み PR(30日)
121

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

modelcontextprotocol/inspector のほかの issue

modelcontextprotocol/inspector の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。