Fix Content::Image#to_h to return mimeType (camelCase) per MCP spec

This is a fix for a similar bug that remained, as in #235.

`Content::Image#to_h` returned `mime_type` (snake_case), but the MCP spec
requires `mimeType` (camelCase) for the MIME type field in image content.
This commit is contained in:
Koichi ITO 2026-02-27 12:39:16 +09:00
commit 37563e59bd

View file

@ -25,7 +25,7 @@ module MCP
end
def to_h
{ data: data, mime_type: mime_type, annotations: annotations, type: "image" }.compact
{ data: data, mimeType: mime_type, annotations: annotations, type: "image" }.compact
end
end
end