rust-sdk/crates
Dale Seo c8c0c0cffc
fix: prevent CallToolResult and GetTaskPayloadResult from shadowing CustomResult in untagged enums (#771)
The `#[serde(default)]` on `CallToolResult.content` (added in #752) made
all fields optional, causing `CallToolResult` to greedily match any JSON
object during `#[serde(untagged)]` deserialization of `ServerResult`.
Similarly, `GetTaskPayloadResult(Value)` matched everything before
`CustomResult(Value)` could be reached.

Fix by replacing derived `Deserialize` impls with custom ones:
- `CallToolResult`: require at least one known field to be present
- `GetTaskPayloadResult`: always fail (indistinguishable from
  `CustomResult` in JSON; construct programmatically via `::new()`)
2026-03-23 15:20:55 -04:00
..
rmcp fix: prevent CallToolResult and GetTaskPayloadResult from shadowing CustomResult in untagged enums (#771) 2026-03-23 15:20:55 -04:00
rmcp-macros feat: add local feature for !Send tool handler support (#740) 2026-03-11 17:22:56 -04:00