rust-sdk/crates/rmcp/tests/test_message_schema
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Brice Fernandes 0a95c3b608
fix(rmcp): add Audio variant to PromptMessageContent (#865)
The spec's prompt-message ContentBlock union is
`text | image | audio | resource_link | resource`, but
PromptMessageContent omitted `Audio`. Because the enum is
`#[serde(tag = "type")]` with no catch-all, a spec-conformant
`{"type":"audio",...}` content block failed to deserialize with
"unknown variant `audio`", breaking prompts/get for any server that
returns audio prompt content (the audio analogue of #842 / #843).

The supporting AudioContent type already existed, and Audio was
already a variant of the general RawContent enum (tool results,
sampling) -- only PromptMessageContent lacked it.

Add the flattened Audio variant (mirroring Image), a
PromptMessage::new_audio constructor (mirroring new_image), and
serialization + deserialization regression tests.

Fixes #864.

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-23 16:35:40 -04:00
..
client_json_rpc_message_schema.json feat: deprecate roots, sampling, and logging (SEP-2577) (#884) 2026-06-04 08:43:39 -04:00
client_json_rpc_message_schema_current.json feat: deprecate roots, sampling, and logging (SEP-2577) (#884) 2026-06-04 08:43:39 -04:00
server_json_rpc_message_schema.json fix(rmcp): add Audio variant to PromptMessageContent (#865) 2026-06-23 16:35:40 -04:00
server_json_rpc_message_schema_current.json fix(rmcp): add Audio variant to PromptMessageContent (#865) 2026-06-23 16:35:40 -04:00