context_server: Fix casing of mimeType in tool responses (#30703)

Closes #30243

Release Notes:

- Fixed wrong casing for the `mimeType` field when parsing MCP server
image responses.
This commit is contained in:
Jonathan LEI 2025-05-26 16:29:45 +08:00 committed by GitHub
parent 748840519c
commit 49f3ec7f35
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -604,7 +604,7 @@ pub struct CallToolResponse {
pub enum ToolResponseContent {
#[serde(rename = "text")]
Text { text: String },
#[serde(rename = "image")]
#[serde(rename = "image", rename_all = "camelCase")]
Image { data: String, mime_type: String },
#[serde(rename = "resource")]
Resource { resource: ResourceContents },