Support parameter deserialisation to Java Objects using the MCPJsonMapper
還沒有人認領這個 Issue。
評估
研究方向
首先追蹤呼叫 McpSchema.deserializeJsonRpcMessage(jsonMapper, string) 的傳輸,並檢查 MCPJsonMapper 是如何提供的。確定傳輸如何接受 Java 輸入型別和 schema,然後驗證請求輸入是否反序列化為 Java 物件,以及複雜輸出是否無需額外的基於 Map 的轉換即可序列化。
由索引模型根據 Issue 內容生成。
描述
Expected Behavior
Although all the transports provided with the SDK require a jsonMapper they only deserialize inputs as Java maps.
It should be possible to specifiy the Java input types along with the schema so that the transports can deserialize into real Java objects
Same applies for output serialisation. Complex Java types cannot be used directly as output.
Current Behavior
Currently transports use the static method McpSchema.deserializeJsonRpcMessage(jsonMapper, <string>); that cannot be extended and does jsonMapper.readValue(jsonText, MAP_TYPE_REF);
Context
This would greatly simplify applying each request to real java methods with matching parameters. Without that an additional jackson deserialisation is necessary, making the first deserialisation to Map redundant. It's unnecessary code that each implementor must produce.
- 主要語言
- 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
難度 2/5 1-3 小時 新手友好度 78/100
objectionary/jeo-maven-plugin#1811 ·
-
難度 2/5 1-3 小時 新手友好度 68/100
hiero-ledger/hiero-block-node#3693 ·
-
area/dependencies kind/cve severity/critical source/scan-dependencies status/triage
難度 2/5 1-3 小時 新手友好度 82/100
-
bug good first issue
難度 2/5 1-3 小時 新手友好度 84/100
-
proposal
難度 2/5 1-3 小時 新手友好度 78/100
beemdevelopment/Aegis#1840 ·