Agent Client Protocol - v0.2.0-alpha.8
    Preparing search index...

    Type Alias ContentBlock

    ContentBlock:
        | { annotations?: Annotations
        | null; text: string; type: "text" }
        | {
            annotations?: Annotations | null;
            data: string;
            mimeType: string;
            type: "image";
            uri?: string | null;
        }
        | {
            annotations?: Annotations
            | null;
            data: string;
            mimeType: string;
            type: "audio";
        }
        | {
            annotations?: Annotations
            | null;
            description?: string | null;
            mimeType?: string | null;
            name: string;
            size?: number | null;
            title?: string | null;
            type: "resource_link";
            uri: string;
        }
        | {
            annotations?: Annotations
            | null;
            resource: EmbeddedResourceResource;
            type: "resource";
        }

    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:

    • User prompts sent via session/prompt
    • Language model output streamed through session/update notifications
    • Progress updates and results from tool calls

    This 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