More extensible CallToolRequest
還沒有人認領這個 Issue。
評估
- 難度
- 5/5
- 預估耗時
- 一週以上
- 新手友好度
- 35/100
- Issue 類型
- 功能
- 描述清晰度
- 需要釐清
- 活躍度
- 冷清
- 技術堆疊
- java
研究方向
先閱讀 McpJsonMapper.java,並追蹤 CallToolRequest 如何反序列化工具參數。在保留現有基於 map 的行為的同時,定義受支援的工具特定請求解析擴充點,然後透過相關的請求反序列化測試驗證所選擇的行為。
由索引模型根據 Issue 內容生成。
描述
Expected Behavior
We want to define our own tool-specific requests with own parsers for 'params'.
Current Behavior
The arguments for tool calls are always Maps.
Context
We develop our own MCP server that offers features like querying and we have our own set of tools to parse, validate and execute them.
The problem is that request object is always de-serialised as a map and we need to serialise it back or figure out a way to reconstruct our objects from the maps. It works most of the time, but is rather inconvenient for queries.
There is https://github.com/modelcontextprotocol/java-sdk/blob/main/mcp-core/src/main/java/io/modelcontextprotocol/json/McpJsonMapper.java, but as far as I understand, it is mainly used to decouple Jackson from the rest of the code.
We could have used that but it looks rather technical.
What I would like to have: some way to define my own request objects and make their payloads shallow or leave them unparsed so the each individual tool can later parse its payload and decide what to do. Or stick with standard map-based one if that is fine for it.
- 主要語言
- Java
- 星號
- 3.7k
- 分支
- 1.1k
- 平均合併
- 1 天 15 小時
- 30 天內合併 PR
- 9
貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
modelcontextprotocol/java-sdk 的其他 Issue
-
area/transport bug P2
難度 2/5 1-3 小時 新手友好度 88/100
modelcontextprotocol/java-sdk#1136 ·
-
area/client bug P2
難度 2/5 1-3 小時 新手友好度 84/100
modelcontextprotocol/java-sdk#1124 · 1 則留言 ·
-
ServerCapabilities.logging is added unconditionally, overriding the caller's explicit capabilities 未關閉bug P2 ready for work
難度 2/5 1-3 小時 新手友好度 68/100
modelcontextprotocol/java-sdk#1086 · 1 則留言 ·
-
enhancement good first issue P3
難度 2/5 1-3 小時 新手友好度 82/100
modelcontextprotocol/java-sdk#1067 ·
-
bug P2 ready for work
難度 2/5 1-3 小時 新手友好度 74/100
modelcontextprotocol/java-sdk#898 · 1 則留言 ·
查看 modelcontextprotocol/java-sdk 的全部 Issue
相似的 Issue
-
Bug Java Platform: Java
難度 2/5 1-3 小時 新手友好度 78/100
getsentry/sentry-java#6138 · 1 則留言 ·
-
bug needs triage p2
難度 2/5 1-3 小時 新手友好度 78/100
GoogleCloudPlatform/DataflowTemplates#4273 · 1 則留言 ·
-
[Studio][Bug] Bulk-deleting a full page of alert rules steps the page back while more rules remain 未關閉
難度 2/5 1-3 小時 新手友好度 78/100
apache/rocketmq-dashboard#4654 · 1 則留言 ·
-
難度 2/5 1-3 小時 新手友好度 78/100
-
難度 2/5 1-3 小時 新手友好度 76/100