Agent Client Protocol - v0.5.1
    Preparing search index...

    Type Alias ToolCallContent

    ToolCallContent:
        | {
            content: | {
                _meta?: { [k: string]: unknown };
                annotations?: Annotations | null;
                text: string;
                type: "text";
            }
            | {
                _meta?: { [k: string]: unknown };
                annotations?: Annotations | null;
                data: string;
                mimeType: string;
                type: "image";
                uri?: string | null;
            }
            | {
                _meta?: { [k: string]: unknown };
                annotations?: Annotations | null;
                data: string;
                mimeType: string;
                type: "audio";
            }
            | {
                _meta?: { [k: string]: unknown };
                annotations?: Annotations | null;
                description?: string | null;
                mimeType?: string | null;
                name: string;
                size?: number | null;
                title?: string | null;
                type: "resource_link";
                uri: string;
            }
            | {
                _meta?: { [k: string]: unknown };
                annotations?: Annotations | null;
                resource: EmbeddedResourceResource;
                type: "resource";
            };
            type: "content";
        }
        | {
            _meta?: { [k: string]: unknown };
            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:
              | {
                  _meta?: { [k: string]: unknown };
                  annotations?: Annotations | null;
                  text: string;
                  type: "text";
              }
              | {
                  _meta?: { [k: string]: unknown };
                  annotations?: Annotations | null;
                  data: string;
                  mimeType: string;
                  type: "image";
                  uri?: string | null;
              }
              | {
                  _meta?: { [k: string]: unknown };
                  annotations?: Annotations | null;
                  data: string;
                  mimeType: string;
                  type: "audio";
              }
              | {
                  _meta?: { [k: string]: unknown };
                  annotations?: Annotations | null;
                  description?: string | null;
                  mimeType?: string | null;
                  name: string;
                  size?: number | null;
                  title?: string | null;
                  type: "resource_link";
                  uri: string;
              }
              | {
                  _meta?: { [k: string]: unknown };
                  annotations?: Annotations | null;
                  resource: EmbeddedResourceResource;
                  type: "resource";
              };
          type: "content";
      }
      • content:
            | {
                _meta?: { [k: string]: unknown };
                annotations?: Annotations | null;
                text: string;
                type: "text";
            }
            | {
                _meta?: { [k: string]: unknown };
                annotations?: Annotations | null;
                data: string;
                mimeType: string;
                type: "image";
                uri?: string | null;
            }
            | {
                _meta?: { [k: string]: unknown };
                annotations?: Annotations | null;
                data: string;
                mimeType: string;
                type: "audio";
            }
            | {
                _meta?: { [k: string]: unknown };
                annotations?: Annotations | null;
                description?: string | null;
                mimeType?: string | null;
                name: string;
                size?: number | null;
                title?: string | null;
                type: "resource_link";
                uri: string;
            }
            | {
                _meta?: { [k: string]: unknown };
                annotations?: Annotations | null;
                resource: EmbeddedResourceResource;
                type: "resource";
            }

        The actual content block.

      • type: "content"
    • {
          _meta?: { [k: string]: unknown };
          newText: string;
          oldText?: string | null;
          path: string;
          type: "diff";
      }
      • Optional_meta?: { [k: string]: unknown }

        Extension point for implementations

      • 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" }