From 49f3ec7f355e3374995d16b73acc086044099f60 Mon Sep 17 00:00:00 2001 From: Jonathan LEI Date: Mon, 26 May 2025 16:29:45 +0800 Subject: [PATCH] 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. --- crates/context_server/src/types.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/context_server/src/types.rs b/crates/context_server/src/types.rs index a2877591259d853df59db73a588052da25d78ca2..83f08218f3b6fd8750366732c87b6a64200e6826 100644 --- a/crates/context_server/src/types.rs +++ b/crates/context_server/src/types.rs @@ -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 },