Content blocks represent displayable information in 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:
session/promptsession/update notificationsThis structure is compatible with the Model Context Protocol (MCP), enabling agents to seamlessly forward content from MCP tool outputs without transformation.
See protocol docs: Content
Optional_meta?: { [k: string]: unknown }Extension point for implementations
The new content after modification.
OptionaloldText?: string | nullThe original content (None for new files).
The file path being modified.
Content produced by a tool call.
Tool calls can produce different types of content including standard content blocks (text, images) or file diffs.
See protocol docs: Content