Content blocks represent displayable information that flows through the Agent Client Protocol. They provide a structured way to handle various types of user-facing content—whether it’s text from language models, images for analysis, or embedded resources for context. Content blocks appear in:

Content Types

The Agent Client Protocol uses the same ContentBlock structure as the Model Context Protocol (MCP). This design choice enables Agents to seamlessly forward content from MCP tool outputs without transformation.

Text Content

Plain text messages form the foundation of most interactions.
{
  "type": "text",
  "text": "What's the weather like today?"
}
All Agents MUST support text content blocks when included in prompts.
text
string
required
The text content to display
annotations
Annotations
Optional metadata about how the content should be used or displayed. Learn more.

Image Content

Images can be included for visual context or analysis.
{
  "type": "image",
  "mimeType": "image/png",
  "data": "iVBORw0KGgoAAAANSUhEUgAAAAEAAAAB..."
}
Requires the image prompt capability when included in prompts.
data
string
required
Base64-encoded image data
mimeType
string
required
The MIME type of the image (e.g., “image/png”, “image/jpeg”)
uri
string
Optional URI reference for the image source
annotations
Annotations
Optional metadata about how the content should be used or displayed. Learn more.

Audio Content

Audio data for transcription or analysis.
{
  "type": "audio",
  "mimeType": "audio/wav",
  "data": "UklGRiQAAABXQVZFZm10IBAAAAABAAEAQB8AAAB..."
}
Requires the audio prompt capability when included in prompts.
data
string
required
Base64-encoded audio data
mimeType
string
required
The MIME type of the audio (e.g., “audio/wav”, “audio/mp3”)
annotations
Annotations
Optional metadata about how the content should be used or displayed. Learn more.

Embedded Resource

Complete resource contents embedded directly in the message.
{
  "type": "resource",
  "resource": {
    "uri": "file:///home/user/script.py",
    "mimeType": "text/x-python",
    "text": "def hello():\n    print('Hello, world!')"
  }
}
This is the preferred way to include context in prompts, such as when using @-mentions to reference files or other resources. By embedding the content directly in the request, Clients can include context from sources that the Agent may not have direct access to. Requires the embeddedContext prompt capability when included in prompts.
resource
EmbeddedResourceResource
required
The embedded resource contents, which can be either:
annotations
Annotations
Optional metadata about how the content should be used or displayed. Learn more.
References to resources that the Agent can access.
{
  "type": "resource_link",
  "uri": "file:///home/user/document.pdf",
  "name": "document.pdf",
  "mimeType": "application/pdf",
  "size": 1024000
}
uri
string
required
The URI of the resource
name
string
required
A human-readable name for the resource
mimeType
string
The MIME type of the resource
title
string
Optional display title for the resource
description
string
Optional description of the resource contents
size
integer
Optional size of the resource in bytes
annotations
Annotations
Optional metadata about how the content should be used or displayed. Learn more.