rust-sdk/crates/rmcp/src/model
Repository files (latest commit first)
Filename Latest commit message Latest commit date
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
..
annotated.rs chore: add #[non_exhaustive] and mutation methods to improve compatibility (#715) 2026-03-03 10:38:01 -05:00
capabilities.rs chore: add #[non_exhaustive] and mutation methods to improve compatibility (#715) 2026-03-03 10:38:01 -05:00
content.rs chore: add #[non_exhaustive] and mutation methods to improve compatibility (#715) 2026-03-03 10:38:01 -05:00
elicitation_schema.rs chore: add #[non_exhaustive] and mutation methods to improve compatibility (#715) 2026-03-03 10:38:01 -05:00
extension.rs feat: provide more context information (#236) 2025-05-29 11:52:54 +08:00
meta.rs feat(elicitation): add support URL elicitation. SEP-1036 (#605) 2026-02-07 21:39:30 -05:00
prompt.rs fix: api ergonomics follow-up (#720) 2026-03-03 12:05:32 -05:00
resource.rs chore: add #[non_exhaustive] and mutation methods to improve compatibility (#715) 2026-03-03 10:38:01 -05:00
serde_impl.rs fix: allow deserializing notifications without params field (#729) 2026-03-09 15:56:27 -04:00
task.rs fix: prevent CallToolResult and GetTaskPayloadResult from shadowing CustomResult in untagged enums (#771) 2026-03-23 15:20:55 -04:00
tool.rs fix: api ergonomics follow-up (#720) 2026-03-03 12:05:32 -05:00