modelcontextprotocol / modelcontextprotocol/python-sdk
Specific ToolNotFoundError for easier handling than ToolError in multi-tenant environments
オープン
まだ誰も着手していません。
enhancement
needs decision
P3
- 主要言語
- Python
- スター
- 24.3k
- フォーク
- 4k
- 平均マージ
- 1日 1時間
- マージ済み PR(30日)
- 31
説明
Description
We are running a remote MCP server and we are seeing errors like:
mcp.server.fastmcp.exceptions.ToolError: Unknown tool: <unknown-tool-name>
I'm unsure why our users are trying to call our remote MCP server with the name of a tool that we don't manage. Regardless, we would like to handle these errors separately from a generic ToolError. For instance:
ToolNotFoundError: user error that shouldn't alert us.ToolError: an error that could indicate an actual issue with our system that we should alert on and fix.
References
I couldn't find any issues related to this.
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
mcp.server.fastmcp.exceptions.ToolError から始めて、“Unknown tool.” を出力するリモートサーバーの経路を追跡してください。不明なツールとその他のツール失敗を区別するものを定義し、そのうえで呼び出し元がこの2つのケースを別々に処理できることを確認してください。issue ではテストファイルが指定されていないため、動作を変更する前に、関連する例外またはサーバーのテストを見つけてください。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- python
- 領域
- api, backend
- issue の種類
- 機能追加
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 静か
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 50/100