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

    Type Alias ToolCallContent

    ToolCallContent:
        | {
            content: | {
                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";
            };
            type: "content";
        }
        | { newText: string; oldText?: string
        | null; path: string; type: "diff" }
        | { terminalId: string; type: "terminal" }

    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

    Type Declaration

    • {
          content:
              | { 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";
              };
          type: "content";
      }
      • content:
            | { 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

      • type: "content"
    • { newText: string; oldText?: string | null; path: string; type: "diff" }
      • newText: string

        The new content after modification.

      • OptionaloldText?: string | null

        The original content (None for new files).

      • path: string

        The file path being modified.

      • type: "diff"
    • { terminalId: string; type: "terminal" }