Cool, glad to help!
While we’re at it, perhaps it’s a good time to standardize a ContentBlock object for the models to work with?
The new 2025/06/18 MCP schema updates some core ideas, like ContentBlocks and Authentication types. Here’s the full changelog.
Here’s a json-schema summary of the section I’m talking about. (Made with o3 )
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://github.com/modelcontextprotocol/modelcontextprotocol/blob/main/schema/2025-06-18/schema.json",
"title": "MCP Content Blocks – 2025-06-18",
"description": "Discrete content objects that may appear in prompts, tool results, or messages.",
"oneOf": [
{ "$ref": "#/$defs/TextContent" },
{ "$ref": "#/$defs/ImageContent" },
{ "$ref": "#/$defs/AudioContent" },
{ "$ref": "#/$defs/ResourceLink" },
{ "$ref": "#/$defs/EmbeddedResource" }
],
"$defs": {
/* -------------------------------------------------------------------- */
/* Generic annotations placeholder – replace with your real schema */
/* -------------------------------------------------------------------- */
"Annotations": {
"type": "object",
"description": "Client-facing rendering hints (user-defined).",
"additionalProperties": {}
},
/* -------------------------------------------------------------------- */
"TextContent": {
"type": "object",
"description": "Plain text provided to or from an LLM.",
"required": ["type", "text"],
"properties": {
"type": { "const": "text", "type": "string" },
"text": { "type": "string", "description": "UTF-8 text payload." },
"annotations": {
"$ref": "#/$defs/Annotations",
"description": "Optional client annotations."
},
"_meta": {
"type": "object",
"description": "Opaque metadata (see spec general fields).",
"additionalProperties": {}
}
},
"additionalProperties": false
},
/* -------------------------------------------------------------------- */
"ImageContent": {
"type": "object",
"description": "Base64-encoded image passed to/from an LLM.",
"required": ["type", "data", "mimeType"],
"properties": {
"type": { "const": "image", "type": "string" },
"data": { "type": "string", "format": "byte", "description": "Base64 image data." },
"mimeType": { "type": "string", "description": "Image MIME type (e.g. image/png)." },
"annotations": { "$ref": "#/$defs/Annotations" },
"_meta": {
"type": "object",
"additionalProperties": {},
"description": "See spec for _meta usage."
}
},
"additionalProperties": false
},
/* -------------------------------------------------------------------- */
"AudioContent": {
"type": "object",
"description": "Base64-encoded audio passed to/from an LLM.",
"required": ["type", "data", "mimeType"],
"properties": {
"type": { "const": "audio", "type": "string" },
"data": { "type": "string", "format": "byte", "description": "Base64 audio data." },
"mimeType": { "type": "string", "description": "Audio MIME type (e.g. audio/mpeg)." },
"annotations": { "$ref": "#/$defs/Annotations" },
"_meta": {
"type": "object",
"additionalProperties": {},
"description": "See spec for _meta usage."
}
},
"additionalProperties": false
},
/* -------------------------------------------------------------------- */
"ResourceLink": {
"type": "object",
"description": "Pointer to an external resource accessible by the server.",
"required": ["type", "name", "uri"],
"properties": {
"type": { "const": "resource_link", "type": "string" },
"uri": { "type": "string", "format": "uri", "description": "Resource URI." },
"name": { "type": "string", "description": "Logical identifier." },
"title": { "type": "string", "description": "Human-readable label (UI)." },
"description": { "type": "string", "description": "LLM-facing hint / summary." },
"mimeType": { "type": "string", "description": "Resource MIME type, if known." },
"size": { "type": "integer", "description": "Raw size in bytes, if known." },
"annotations": { "$ref": "#/$defs/Annotations" },
"_meta": {
"type": "object",
"additionalProperties": {},
"description": "See spec for _meta usage."
}
},
"additionalProperties": false
},
/* -------------------------------------------------------------------- */
"EmbeddedResource": {
"type": "object",
"description": "Inlined resource content embedded in a prompt or result.",
"required": ["type", "resource"],
"properties": {
"type": { "const": "resource", "type": "string" },
"resource": {
"description": "Either TextResourceContents or BlobResourceContents.",
"anyOf": [
{ "$ref": "#/definitions/TextResourceContents" },
{ "$ref": "#/definitions/BlobResourceContents" }
]
},
"annotations": { "$ref": "#/$defs/Annotations" },
"_meta": {
"type": "object",
"additionalProperties": {},
"description": "See spec for _meta usage."
}
},
"additionalProperties": false
}
}
}
I think this is mainly additive as well, at least it seems like these definitions could slide in neatly with the existing message content object.
Any place where communication channels can be standardized across the industry with strong typing, json-schema, and protocols are greatly appreciated because of how smooth it’s making the handoffs.