{
  "$defs": {
    "AgentCapabilities": {
      "description": "Capabilities supported by the agent.\n\nAdvertised during initialization to inform the client about\navailable features and content types.\n\nSee protocol docs: [Agent Capabilities](https://agentclientprotocol.com/protocol/initialization#agent-capabilities)",
      "properties": {
        "_meta": {
          "description": "Extension point for implementations"
        },
        "loadSession": {
          "default": false,
          "description": "Whether the agent supports `session/load`.",
          "type": "boolean"
        },
        "mcpCapabilities": {
          "$ref": "#/$defs/McpCapabilities",
          "default": {
            "http": false,
            "sse": false
          },
          "description": "MCP capabilities supported by the agent."
        },
        "promptCapabilities": {
          "$ref": "#/$defs/PromptCapabilities",
          "default": {
            "audio": false,
            "embeddedContext": false,
            "image": false
          },
          "description": "Prompt capabilities supported by the agent."
        }
      },
      "type": "object"
    },
    "AgentNotification": {
      "anyOf": [
        {
          "$ref": "#/$defs/SessionNotification",
          "title": "SessionNotification"
        },
        {
          "title": "ExtNotification"
        }
      ],
      "description": "All possible notifications that an agent can send to a client.\n\nThis enum is used internally for routing RPC notifications. You typically won't need\nto use this directly - use the notification methods on the [`Client`] trait instead.\n\nNotifications do not expect a response.",
      "x-docs-ignore": true
    },
    "AgentRequest": {
      "anyOf": [
        {
          "$ref": "#/$defs/WriteTextFileRequest",
          "title": "WriteTextFileRequest"
        },
        {
          "$ref": "#/$defs/ReadTextFileRequest",
          "title": "ReadTextFileRequest"
        },
        {
          "$ref": "#/$defs/RequestPermissionRequest",
          "title": "RequestPermissionRequest"
        },
        {
          "$ref": "#/$defs/CreateTerminalRequest",
          "title": "CreateTerminalRequest"
        },
        {
          "$ref": "#/$defs/TerminalOutputRequest",
          "title": "TerminalOutputRequest"
        },
        {
          "$ref": "#/$defs/ReleaseTerminalRequest",
          "title": "ReleaseTerminalRequest"
        },
        {
          "$ref": "#/$defs/WaitForTerminalExitRequest",
          "title": "WaitForTerminalExitRequest"
        },
        {
          "$ref": "#/$defs/KillTerminalCommandRequest",
          "title": "KillTerminalCommandRequest"
        },
        {
          "title": "ExtMethodRequest"
        }
      ],
      "description": "All possible requests that an agent can send to a client.\n\nThis enum is used internally for routing RPC requests. You typically won't need\nto use this directly - instead, use the methods on the [`Client`] trait.\n\nThis enum encompasses all method calls from agent to client.",
      "x-docs-ignore": true
    },
    "AgentResponse": {
      "anyOf": [
        {
          "$ref": "#/$defs/InitializeResponse",
          "title": "InitializeResponse"
        },
        {
          "$ref": "#/$defs/AuthenticateResponse",
          "title": "AuthenticateResponse"
        },
        {
          "$ref": "#/$defs/NewSessionResponse",
          "title": "NewSessionResponse"
        },
        {
          "$ref": "#/$defs/LoadSessionResponse",
          "title": "LoadSessionResponse"
        },
        {
          "$ref": "#/$defs/SetSessionModeResponse",
          "title": "SetSessionModeResponse"
        },
        {
          "$ref": "#/$defs/PromptResponse",
          "title": "PromptResponse"
        },
        {
          "$ref": "#/$defs/SetSessionModelResponse",
          "title": "SetSessionModelResponse"
        },
        {
          "title": "ExtMethodResponse"
        }
      ],
      "description": "All possible responses that an agent can send to a client.\n\nThis enum is used internally for routing RPC responses. You typically won't need\nto use this directly - the responses are handled automatically by the connection.\n\nThese are responses to the corresponding `ClientRequest` variants.",
      "x-docs-ignore": true
    },
    "Annotations": {
      "description": "Optional annotations for the client. The client can use annotations to inform how objects are used or displayed",
      "properties": {
        "_meta": {
          "description": "Extension point for implementations"
        },
        "audience": {
          "items": {
            "$ref": "#/$defs/Role"
          },
          "type": ["array", "null"]
        },
        "lastModified": {
          "type": ["string", "null"]
        },
        "priority": {
          "format": "double",
          "type": ["number", "null"]
        }
      },
      "type": "object"
    },
    "AudioContent": {
      "description": "Audio provided to or from an LLM.",
      "properties": {
        "_meta": {
          "description": "Extension point for implementations"
        },
        "annotations": {
          "anyOf": [
            {
              "$ref": "#/$defs/Annotations"
            },
            {
              "type": "null"
            }
          ]
        },
        "data": {
          "type": "string"
        },
        "mimeType": {
          "type": "string"
        }
      },
      "required": ["data", "mimeType"],
      "type": "object"
    },
    "AuthMethod": {
      "description": "Describes an available authentication method.",
      "properties": {
        "_meta": {
          "description": "Extension point for implementations"
        },
        "description": {
          "description": "Optional description providing more details about this authentication method.",
          "type": ["string", "null"]
        },
        "id": {
          "$ref": "#/$defs/AuthMethodId",
          "description": "Unique identifier for this authentication method."
        },
        "name": {
          "description": "Human-readable name of the authentication method.",
          "type": "string"
        }
      },
      "required": ["id", "name"],
      "type": "object"
    },
    "AuthMethodId": {
      "description": "Unique identifier for an authentication method.",
      "type": "string"
    },
    "AuthenticateRequest": {
      "description": "Request parameters for the authenticate method.\n\nSpecifies which authentication method to use.",
      "properties": {
        "_meta": {
          "description": "Extension point for implementations"
        },
        "methodId": {
          "$ref": "#/$defs/AuthMethodId",
          "description": "The ID of the authentication method to use.\nMust be one of the methods advertised in the initialize response."
        }
      },
      "required": ["methodId"],
      "type": "object",
      "x-method": "authenticate",
      "x-side": "agent"
    },
    "AuthenticateResponse": {
      "description": "Response to authenticate method",
      "properties": {
        "_meta": {
          "description": "Extension point for implementations"
        }
      },
      "type": "object",
      "x-method": "authenticate",
      "x-side": "agent"
    },
    "AvailableCommand": {
      "description": "Information about a command.",
      "properties": {
        "_meta": {
          "description": "Extension point for implementations"
        },
        "description": {
          "description": "Human-readable description of what the command does.",
          "type": "string"
        },
        "input": {
          "anyOf": [
            {
              "$ref": "#/$defs/AvailableCommandInput"
            },
            {
              "type": "null"
            }
          ],
          "description": "Input for the command if required"
        },
        "name": {
          "description": "Command name (e.g., `create_plan`, `research_codebase`).",
          "type": "string"
        }
      },
      "required": ["name", "description"],
      "type": "object"
    },
    "AvailableCommandInput": {
      "anyOf": [
        {
          "description": "All text that was typed after the command name is provided as input.",
          "properties": {
            "hint": {
              "description": "A hint to display when the input hasn't been provided yet",
              "type": "string"
            }
          },
          "required": ["hint"],
          "title": "UnstructuredCommandInput",
          "type": "object"
        }
      ],
      "description": "The input specification for a command."
    },
    "BlobResourceContents": {
      "description": "Binary resource contents.",
      "properties": {
        "_meta": {
          "description": "Extension point for implementations"
        },
        "blob": {
          "type": "string"
        },
        "mimeType": {
          "type": ["string", "null"]
        },
        "uri": {
          "type": "string"
        }
      },
      "required": ["blob", "uri"],
      "type": "object"
    },
    "CancelNotification": {
      "description": "Notification to cancel ongoing operations for a session.\n\nSee protocol docs: [Cancellation](https://agentclientprotocol.com/protocol/prompt-turn#cancellation)",
      "properties": {
        "_meta": {
          "description": "Extension point for implementations"
        },
        "sessionId": {
          "$ref": "#/$defs/SessionId",
          "description": "The ID of the session to cancel operations for."
        }
      },
      "required": ["sessionId"],
      "type": "object",
      "x-method": "session/cancel",
      "x-side": "agent"
    },
    "ClientCapabilities": {
      "description": "Capabilities supported by the client.\n\nAdvertised during initialization to inform the agent about\navailable features and methods.\n\nSee protocol docs: [Client Capabilities](https://agentclientprotocol.com/protocol/initialization#client-capabilities)",
      "properties": {
        "_meta": {
          "description": "Extension point for implementations"
        },
        "fs": {
          "$ref": "#/$defs/FileSystemCapability",
          "default": {
            "readTextFile": false,
            "writeTextFile": false
          },
          "description": "File system capabilities supported by the client.\nDetermines which file operations the agent can request."
        },
        "terminal": {
          "default": false,
          "description": "Whether the Client support all `terminal/*` methods.",
          "type": "boolean"
        }
      },
      "type": "object"
    },
    "ClientNotification": {
      "anyOf": [
        {
          "$ref": "#/$defs/CancelNotification",
          "title": "CancelNotification"
        },
        {
          "title": "ExtNotification"
        }
      ],
      "description": "All possible notifications that a client can send to an agent.\n\nThis enum is used internally for routing RPC notifications. You typically won't need\nto use this directly - use the notification methods on the [`Agent`] trait instead.\n\nNotifications do not expect a response.",
      "x-docs-ignore": true
    },
    "ClientRequest": {
      "anyOf": [
        {
          "$ref": "#/$defs/InitializeRequest",
          "title": "InitializeRequest"
        },
        {
          "$ref": "#/$defs/AuthenticateRequest",
          "title": "AuthenticateRequest"
        },
        {
          "$ref": "#/$defs/NewSessionRequest",
          "title": "NewSessionRequest"
        },
        {
          "$ref": "#/$defs/LoadSessionRequest",
          "title": "LoadSessionRequest"
        },
        {
          "$ref": "#/$defs/SetSessionModeRequest",
          "title": "SetSessionModeRequest"
        },
        {
          "$ref": "#/$defs/PromptRequest",
          "title": "PromptRequest"
        },
        {
          "$ref": "#/$defs/SetSessionModelRequest",
          "title": "SetSessionModelRequest"
        },
        {
          "title": "ExtMethodRequest"
        }
      ],
      "description": "All possible requests that a client can send to an agent.\n\nThis enum is used internally for routing RPC requests. You typically won't need\nto use this directly - instead, use the methods on the [`Agent`] trait.\n\nThis enum encompasses all method calls from client to agent.",
      "x-docs-ignore": true
    },
    "ClientResponse": {
      "anyOf": [
        {
          "$ref": "#/$defs/WriteTextFileResponse",
          "title": "WriteTextFileResponse"
        },
        {
          "$ref": "#/$defs/ReadTextFileResponse",
          "title": "ReadTextFileResponse"
        },
        {
          "$ref": "#/$defs/RequestPermissionResponse",
          "title": "RequestPermissionResponse"
        },
        {
          "$ref": "#/$defs/CreateTerminalResponse",
          "title": "CreateTerminalResponse"
        },
        {
          "$ref": "#/$defs/TerminalOutputResponse",
          "title": "TerminalOutputResponse"
        },
        {
          "$ref": "#/$defs/ReleaseTerminalResponse",
          "title": "ReleaseTerminalResponse"
        },
        {
          "$ref": "#/$defs/WaitForTerminalExitResponse",
          "title": "WaitForTerminalExitResponse"
        },
        {
          "$ref": "#/$defs/KillTerminalCommandResponse",
          "title": "KillTerminalResponse"
        },
        {
          "title": "ExtMethodResponse"
        }
      ],
      "description": "All possible responses that a client can send to an agent.\n\nThis enum is used internally for routing RPC responses. You typically won't need\nto use this directly - the responses are handled automatically by the connection.\n\nThese are responses to the corresponding `AgentRequest` variants.",
      "x-docs-ignore": true
    },
    "ContentBlock": {
      "description": "Content blocks represent displayable information in the Agent Client Protocol.\n\nThey provide a structured way to handle various types of user-facing content—whether\nit's text from language models, images for analysis, or embedded resources for context.\n\nContent blocks appear in:\n- User prompts sent via `session/prompt`\n- Language model output streamed through `session/update` notifications\n- Progress updates and results from tool calls\n\nThis structure is compatible with the Model Context Protocol (MCP), enabling\nagents to seamlessly forward content from MCP tool outputs without transformation.\n\nSee protocol docs: [Content](https://agentclientprotocol.com/protocol/content)",
      "oneOf": [
        {
          "description": "Plain text content\n\nAll agents MUST support text content blocks in prompts.",
          "properties": {
            "_meta": {
              "description": "Extension point for implementations"
            },
            "annotations": {
              "anyOf": [
                {
                  "$ref": "#/$defs/Annotations"
                },
                {
                  "type": "null"
                }
              ]
            },
            "text": {
              "type": "string"
            },
            "type": {
              "const": "text",
              "type": "string"
            }
          },
          "required": ["type", "text"],
          "type": "object"
        },
        {
          "description": "Images for visual context or analysis.\n\nRequires the `image` prompt capability when included in prompts.",
          "properties": {
            "_meta": {
              "description": "Extension point for implementations"
            },
            "annotations": {
              "anyOf": [
                {
                  "$ref": "#/$defs/Annotations"
                },
                {
                  "type": "null"
                }
              ]
            },
            "data": {
              "type": "string"
            },
            "mimeType": {
              "type": "string"
            },
            "type": {
              "const": "image",
              "type": "string"
            },
            "uri": {
              "type": ["string", "null"]
            }
          },
          "required": ["type", "data", "mimeType"],
          "type": "object"
        },
        {
          "description": "Audio data for transcription or analysis.\n\nRequires the `audio` prompt capability when included in prompts.",
          "properties": {
            "_meta": {
              "description": "Extension point for implementations"
            },
            "annotations": {
              "anyOf": [
                {
                  "$ref": "#/$defs/Annotations"
                },
                {
                  "type": "null"
                }
              ]
            },
            "data": {
              "type": "string"
            },
            "mimeType": {
              "type": "string"
            },
            "type": {
              "const": "audio",
              "type": "string"
            }
          },
          "required": ["type", "data", "mimeType"],
          "type": "object"
        },
        {
          "description": "References to resources that the agent can access.\n\nAll agents MUST support resource links in prompts.",
          "properties": {
            "_meta": {
              "description": "Extension point for implementations"
            },
            "annotations": {
              "anyOf": [
                {
                  "$ref": "#/$defs/Annotations"
                },
                {
                  "type": "null"
                }
              ]
            },
            "description": {
              "type": ["string", "null"]
            },
            "mimeType": {
              "type": ["string", "null"]
            },
            "name": {
              "type": "string"
            },
            "size": {
              "format": "int64",
              "type": ["integer", "null"]
            },
            "title": {
              "type": ["string", "null"]
            },
            "type": {
              "const": "resource_link",
              "type": "string"
            },
            "uri": {
              "type": "string"
            }
          },
          "required": ["type", "name", "uri"],
          "type": "object"
        },
        {
          "description": "Complete resource contents embedded directly in the message.\n\nPreferred for including context as it avoids extra round-trips.\n\nRequires the `embeddedContext` prompt capability when included in prompts.",
          "properties": {
            "_meta": {
              "description": "Extension point for implementations"
            },
            "annotations": {
              "anyOf": [
                {
                  "$ref": "#/$defs/Annotations"
                },
                {
                  "type": "null"
                }
              ]
            },
            "resource": {
              "$ref": "#/$defs/EmbeddedResourceResource"
            },
            "type": {
              "const": "resource",
              "type": "string"
            }
          },
          "required": ["type", "resource"],
          "type": "object"
        }
      ]
    },
    "CreateTerminalRequest": {
      "description": "Request to create a new terminal and execute a command.",
      "properties": {
        "_meta": {
          "description": "Extension point for implementations"
        },
        "args": {
          "description": "Array of command arguments.",
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "command": {
          "description": "The command to execute.",
          "type": "string"
        },
        "cwd": {
          "description": "Working directory for the command (absolute path).",
          "type": ["string", "null"]
        },
        "env": {
          "description": "Environment variables for the command.",
          "items": {
            "$ref": "#/$defs/EnvVariable"
          },
          "type": "array"
        },
        "outputByteLimit": {
          "description": "Maximum number of output bytes to retain.\n\nWhen the limit is exceeded, the Client truncates from the beginning of the output\nto stay within the limit.\n\nThe Client MUST ensure truncation happens at a character boundary to maintain valid\nstring output, even if this means the retained output is slightly less than the\nspecified limit.",
          "format": "uint64",
          "minimum": 0,
          "type": ["integer", "null"]
        },
        "sessionId": {
          "$ref": "#/$defs/SessionId",
          "description": "The session ID for this request."
        }
      },
      "required": ["sessionId", "command"],
      "type": "object",
      "x-method": "terminal/create",
      "x-side": "client"
    },
    "CreateTerminalResponse": {
      "description": "Response containing the ID of the created terminal.",
      "properties": {
        "_meta": {
          "description": "Extension point for implementations"
        },
        "terminalId": {
          "description": "The unique identifier for the created terminal.",
          "type": "string"
        }
      },
      "required": ["terminalId"],
      "type": "object",
      "x-method": "terminal/create",
      "x-side": "client"
    },
    "EmbeddedResource": {
      "description": "The contents of a resource, embedded into a prompt or tool call result.",
      "properties": {
        "_meta": {
          "description": "Extension point for implementations"
        },
        "annotations": {
          "anyOf": [
            {
              "$ref": "#/$defs/Annotations"
            },
            {
              "type": "null"
            }
          ]
        },
        "resource": {
          "$ref": "#/$defs/EmbeddedResourceResource"
        }
      },
      "required": ["resource"],
      "type": "object"
    },
    "EmbeddedResourceResource": {
      "anyOf": [
        {
          "$ref": "#/$defs/TextResourceContents",
          "title": "TextResourceContents"
        },
        {
          "$ref": "#/$defs/BlobResourceContents",
          "title": "BlobResourceContents"
        }
      ],
      "description": "Resource content that can be embedded in a message."
    },
    "EnvVariable": {
      "description": "An environment variable to set when launching an MCP server.",
      "properties": {
        "_meta": {
          "description": "Extension point for implementations"
        },
        "name": {
          "description": "The name of the environment variable.",
          "type": "string"
        },
        "value": {
          "description": "The value to set for the environment variable.",
          "type": "string"
        }
      },
      "required": ["name", "value"],
      "type": "object"
    },
    "FileSystemCapability": {
      "description": "File system capabilities that a client may support.\n\nSee protocol docs: [FileSystem](https://agentclientprotocol.com/protocol/initialization#filesystem)",
      "properties": {
        "_meta": {
          "description": "Extension point for implementations"
        },
        "readTextFile": {
          "default": false,
          "description": "Whether the Client supports `fs/read_text_file` requests.",
          "type": "boolean"
        },
        "writeTextFile": {
          "default": false,
          "description": "Whether the Client supports `fs/write_text_file` requests.",
          "type": "boolean"
        }
      },
      "type": "object"
    },
    "HttpHeader": {
      "description": "An HTTP header to set when making requests to the MCP server.",
      "properties": {
        "_meta": {
          "description": "Extension point for implementations"
        },
        "name": {
          "description": "The name of the HTTP header.",
          "type": "string"
        },
        "value": {
          "description": "The value to set for the HTTP header.",
          "type": "string"
        }
      },
      "required": ["name", "value"],
      "type": "object"
    },
    "ImageContent": {
      "description": "An image provided to or from an LLM.",
      "properties": {
        "_meta": {
          "description": "Extension point for implementations"
        },
        "annotations": {
          "anyOf": [
            {
              "$ref": "#/$defs/Annotations"
            },
            {
              "type": "null"
            }
          ]
        },
        "data": {
          "type": "string"
        },
        "mimeType": {
          "type": "string"
        },
        "uri": {
          "type": ["string", "null"]
        }
      },
      "required": ["data", "mimeType"],
      "type": "object"
    },
    "InitializeRequest": {
      "description": "Request parameters for the initialize method.\n\nSent by the client to establish connection and negotiate capabilities.\n\nSee protocol docs: [Initialization](https://agentclientprotocol.com/protocol/initialization)",
      "properties": {
        "_meta": {
          "description": "Extension point for implementations"
        },
        "clientCapabilities": {
          "$ref": "#/$defs/ClientCapabilities",
          "default": {
            "fs": {
              "readTextFile": false,
              "writeTextFile": false
            },
            "terminal": false
          },
          "description": "Capabilities supported by the client."
        },
        "protocolVersion": {
          "$ref": "#/$defs/ProtocolVersion",
          "description": "The latest protocol version supported by the client."
        }
      },
      "required": ["protocolVersion"],
      "type": "object",
      "x-method": "initialize",
      "x-side": "agent"
    },
    "InitializeResponse": {
      "description": "Response from the initialize method.\n\nContains the negotiated protocol version and agent capabilities.\n\nSee protocol docs: [Initialization](https://agentclientprotocol.com/protocol/initialization)",
      "properties": {
        "_meta": {
          "description": "Extension point for implementations"
        },
        "agentCapabilities": {
          "$ref": "#/$defs/AgentCapabilities",
          "default": {
            "loadSession": false,
            "mcpCapabilities": {
              "http": false,
              "sse": false
            },
            "promptCapabilities": {
              "audio": false,
              "embeddedContext": false,
              "image": false
            }
          },
          "description": "Capabilities supported by the agent."
        },
        "authMethods": {
          "default": [],
          "description": "Authentication methods supported by the agent.",
          "items": {
            "$ref": "#/$defs/AuthMethod"
          },
          "type": "array"
        },
        "protocolVersion": {
          "$ref": "#/$defs/ProtocolVersion",
          "description": "The protocol version the client specified if supported by the agent,\nor the latest protocol version supported by the agent.\n\nThe client should disconnect, if it doesn't support this version."
        }
      },
      "required": ["protocolVersion"],
      "type": "object",
      "x-method": "initialize",
      "x-side": "agent"
    },
    "KillTerminalCommandRequest": {
      "description": "Request to kill a terminal command without releasing the terminal.",
      "properties": {
        "_meta": {
          "description": "Extension point for implementations"
        },
        "sessionId": {
          "$ref": "#/$defs/SessionId",
          "description": "The session ID for this request."
        },
        "terminalId": {
          "description": "The ID of the terminal to kill.",
          "type": "string"
        }
      },
      "required": ["sessionId", "terminalId"],
      "type": "object",
      "x-method": "terminal/kill",
      "x-side": "client"
    },
    "KillTerminalCommandResponse": {
      "description": "Response to terminal/kill command method",
      "properties": {
        "_meta": {
          "description": "Extension point for implementations"
        }
      },
      "type": "object",
      "x-method": "terminal/kill",
      "x-side": "client"
    },
    "LoadSessionRequest": {
      "description": "Request parameters for loading an existing session.\n\nOnly available if the Agent supports the `loadSession` capability.\n\nSee protocol docs: [Loading Sessions](https://agentclientprotocol.com/protocol/session-setup#loading-sessions)",
      "properties": {
        "_meta": {
          "description": "Extension point for implementations"
        },
        "cwd": {
          "description": "The working directory for this session.",
          "type": "string"
        },
        "mcpServers": {
          "description": "List of MCP servers to connect to for this session.",
          "items": {
            "$ref": "#/$defs/McpServer"
          },
          "type": "array"
        },
        "sessionId": {
          "$ref": "#/$defs/SessionId",
          "description": "The ID of the session to load."
        }
      },
      "required": ["mcpServers", "cwd", "sessionId"],
      "type": "object",
      "x-method": "session/load",
      "x-side": "agent"
    },
    "LoadSessionResponse": {
      "description": "Response from loading an existing session.",
      "properties": {
        "_meta": {
          "description": "Extension point for implementations"
        },
        "models": {
          "anyOf": [
            {
              "$ref": "#/$defs/SessionModelState"
            },
            {
              "type": "null"
            }
          ],
          "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nInitial model state if supported by the Agent"
        },
        "modes": {
          "anyOf": [
            {
              "$ref": "#/$defs/SessionModeState"
            },
            {
              "type": "null"
            }
          ],
          "description": "Initial mode state if supported by the Agent\n\nSee protocol docs: [Session Modes](https://agentclientprotocol.com/protocol/session-modes)"
        }
      },
      "type": "object",
      "x-method": "session/load",
      "x-side": "agent"
    },
    "McpCapabilities": {
      "description": "MCP capabilities supported by the agent",
      "properties": {
        "_meta": {
          "description": "Extension point for implementations"
        },
        "http": {
          "default": false,
          "description": "Agent supports [`McpServer::Http`].",
          "type": "boolean"
        },
        "sse": {
          "default": false,
          "description": "Agent supports [`McpServer::Sse`].",
          "type": "boolean"
        }
      },
      "type": "object"
    },
    "McpServer": {
      "anyOf": [
        {
          "description": "HTTP transport configuration\n\nOnly available when the Agent capabilities indicate `mcp_capabilities.http` is `true`.",
          "properties": {
            "headers": {
              "description": "HTTP headers to set when making requests to the MCP server.",
              "items": {
                "$ref": "#/$defs/HttpHeader"
              },
              "type": "array"
            },
            "name": {
              "description": "Human-readable name identifying this MCP server.",
              "type": "string"
            },
            "type": {
              "const": "http",
              "type": "string"
            },
            "url": {
              "description": "URL to the MCP server.",
              "type": "string"
            }
          },
          "required": ["type", "name", "url", "headers"],
          "type": "object"
        },
        {
          "description": "SSE transport configuration\n\nOnly available when the Agent capabilities indicate `mcp_capabilities.sse` is `true`.",
          "properties": {
            "headers": {
              "description": "HTTP headers to set when making requests to the MCP server.",
              "items": {
                "$ref": "#/$defs/HttpHeader"
              },
              "type": "array"
            },
            "name": {
              "description": "Human-readable name identifying this MCP server.",
              "type": "string"
            },
            "type": {
              "const": "sse",
              "type": "string"
            },
            "url": {
              "description": "URL to the MCP server.",
              "type": "string"
            }
          },
          "required": ["type", "name", "url", "headers"],
          "type": "object"
        },
        {
          "description": "Stdio transport configuration\n\nAll Agents MUST support this transport.",
          "properties": {
            "args": {
              "description": "Command-line arguments to pass to the MCP server.",
              "items": {
                "type": "string"
              },
              "type": "array"
            },
            "command": {
              "description": "Path to the MCP server executable.",
              "type": "string"
            },
            "env": {
              "description": "Environment variables to set when launching the MCP server.",
              "items": {
                "$ref": "#/$defs/EnvVariable"
              },
              "type": "array"
            },
            "name": {
              "description": "Human-readable name identifying this MCP server.",
              "type": "string"
            }
          },
          "required": ["name", "command", "args", "env"],
          "title": "stdio",
          "type": "object"
        }
      ],
      "description": "Configuration for connecting to an MCP (Model Context Protocol) server.\n\nMCP servers provide tools and context that the agent can use when\nprocessing prompts.\n\nSee protocol docs: [MCP Servers](https://agentclientprotocol.com/protocol/session-setup#mcp-servers)"
    },
    "ModelId": {
      "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nA unique identifier for a model.",
      "type": "string"
    },
    "ModelInfo": {
      "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nInformation about a selectable model.",
      "properties": {
        "_meta": {
          "description": "Extension point for implementations"
        },
        "description": {
          "description": "Optional description of the model.",
          "type": ["string", "null"]
        },
        "modelId": {
          "$ref": "#/$defs/ModelId",
          "description": "Unique identifier for the model."
        },
        "name": {
          "description": "Human-readable name of the model.",
          "type": "string"
        }
      },
      "required": ["modelId", "name"],
      "type": "object"
    },
    "NewSessionRequest": {
      "description": "Request parameters for creating a new session.\n\nSee protocol docs: [Creating a Session](https://agentclientprotocol.com/protocol/session-setup#creating-a-session)",
      "properties": {
        "_meta": {
          "description": "Extension point for implementations"
        },
        "cwd": {
          "description": "The working directory for this session. Must be an absolute path.",
          "type": "string"
        },
        "mcpServers": {
          "description": "List of MCP (Model Context Protocol) servers the agent should connect to.",
          "items": {
            "$ref": "#/$defs/McpServer"
          },
          "type": "array"
        }
      },
      "required": ["cwd", "mcpServers"],
      "type": "object",
      "x-method": "session/new",
      "x-side": "agent"
    },
    "NewSessionResponse": {
      "description": "Response from creating a new session.\n\nSee protocol docs: [Creating a Session](https://agentclientprotocol.com/protocol/session-setup#creating-a-session)",
      "properties": {
        "_meta": {
          "description": "Extension point for implementations"
        },
        "models": {
          "anyOf": [
            {
              "$ref": "#/$defs/SessionModelState"
            },
            {
              "type": "null"
            }
          ],
          "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nInitial model state if supported by the Agent"
        },
        "modes": {
          "anyOf": [
            {
              "$ref": "#/$defs/SessionModeState"
            },
            {
              "type": "null"
            }
          ],
          "description": "Initial mode state if supported by the Agent\n\nSee protocol docs: [Session Modes](https://agentclientprotocol.com/protocol/session-modes)"
        },
        "sessionId": {
          "$ref": "#/$defs/SessionId",
          "description": "Unique identifier for the created session.\n\nUsed in all subsequent requests for this conversation."
        }
      },
      "required": ["sessionId"],
      "type": "object",
      "x-method": "session/new",
      "x-side": "agent"
    },
    "PermissionOption": {
      "description": "An option presented to the user when requesting permission.",
      "properties": {
        "_meta": {
          "description": "Extension point for implementations"
        },
        "kind": {
          "$ref": "#/$defs/PermissionOptionKind",
          "description": "Hint about the nature of this permission option."
        },
        "name": {
          "description": "Human-readable label to display to the user.",
          "type": "string"
        },
        "optionId": {
          "$ref": "#/$defs/PermissionOptionId",
          "description": "Unique identifier for this permission option."
        }
      },
      "required": ["optionId", "name", "kind"],
      "type": "object"
    },
    "PermissionOptionId": {
      "description": "Unique identifier for a permission option.",
      "type": "string"
    },
    "PermissionOptionKind": {
      "description": "The type of permission option being presented to the user.\n\nHelps clients choose appropriate icons and UI treatment.",
      "oneOf": [
        {
          "const": "allow_once",
          "description": "Allow this operation only this time.",
          "type": "string"
        },
        {
          "const": "allow_always",
          "description": "Allow this operation and remember the choice.",
          "type": "string"
        },
        {
          "const": "reject_once",
          "description": "Reject this operation only this time.",
          "type": "string"
        },
        {
          "const": "reject_always",
          "description": "Reject this operation and remember the choice.",
          "type": "string"
        }
      ]
    },
    "Plan": {
      "description": "An execution plan for accomplishing complex tasks.\n\nPlans consist of multiple entries representing individual tasks or goals.\nAgents report plans to clients to provide visibility into their execution strategy.\nPlans can evolve during execution as the agent discovers new requirements or completes tasks.\n\nSee protocol docs: [Agent Plan](https://agentclientprotocol.com/protocol/agent-plan)",
      "properties": {
        "_meta": {
          "description": "Extension point for implementations"
        },
        "entries": {
          "description": "The list of tasks to be accomplished.\n\nWhen updating a plan, the agent must send a complete list of all entries\nwith their current status. The client replaces the entire plan with each update.",
          "items": {
            "$ref": "#/$defs/PlanEntry"
          },
          "type": "array"
        }
      },
      "required": ["entries"],
      "type": "object"
    },
    "PlanEntry": {
      "description": "A single entry in the execution plan.\n\nRepresents a task or goal that the assistant intends to accomplish\nas part of fulfilling the user's request.\nSee protocol docs: [Plan Entries](https://agentclientprotocol.com/protocol/agent-plan#plan-entries)",
      "properties": {
        "_meta": {
          "description": "Extension point for implementations"
        },
        "content": {
          "description": "Human-readable description of what this task aims to accomplish.",
          "type": "string"
        },
        "priority": {
          "$ref": "#/$defs/PlanEntryPriority",
          "description": "The relative importance of this task.\nUsed to indicate which tasks are most critical to the overall goal."
        },
        "status": {
          "$ref": "#/$defs/PlanEntryStatus",
          "description": "Current execution status of this task."
        }
      },
      "required": ["content", "priority", "status"],
      "type": "object"
    },
    "PlanEntryPriority": {
      "description": "Priority levels for plan entries.\n\nUsed to indicate the relative importance or urgency of different\ntasks in the execution plan.\nSee protocol docs: [Plan Entries](https://agentclientprotocol.com/protocol/agent-plan#plan-entries)",
      "oneOf": [
        {
          "const": "high",
          "description": "High priority task - critical to the overall goal.",
          "type": "string"
        },
        {
          "const": "medium",
          "description": "Medium priority task - important but not critical.",
          "type": "string"
        },
        {
          "const": "low",
          "description": "Low priority task - nice to have but not essential.",
          "type": "string"
        }
      ]
    },
    "PlanEntryStatus": {
      "description": "Status of a plan entry in the execution flow.\n\nTracks the lifecycle of each task from planning through completion.\nSee protocol docs: [Plan Entries](https://agentclientprotocol.com/protocol/agent-plan#plan-entries)",
      "oneOf": [
        {
          "const": "pending",
          "description": "The task has not started yet.",
          "type": "string"
        },
        {
          "const": "in_progress",
          "description": "The task is currently being worked on.",
          "type": "string"
        },
        {
          "const": "completed",
          "description": "The task has been successfully completed.",
          "type": "string"
        }
      ]
    },
    "PromptCapabilities": {
      "description": "Prompt capabilities supported by the agent in `session/prompt` requests.\n\nBaseline agent functionality requires support for [`ContentBlock::Text`]\nand [`ContentBlock::ResourceLink`] in prompt requests.\n\nOther variants must be explicitly opted in to.\nCapabilities for different types of content in prompt requests.\n\nIndicates which content types beyond the baseline (text and resource links)\nthe agent can process.\n\nSee protocol docs: [Prompt Capabilities](https://agentclientprotocol.com/protocol/initialization#prompt-capabilities)",
      "properties": {
        "_meta": {
          "description": "Extension point for implementations"
        },
        "audio": {
          "default": false,
          "description": "Agent supports [`ContentBlock::Audio`].",
          "type": "boolean"
        },
        "embeddedContext": {
          "default": false,
          "description": "Agent supports embedded context in `session/prompt` requests.\n\nWhen enabled, the Client is allowed to include [`ContentBlock::Resource`]\nin prompt requests for pieces of context that are referenced in the message.",
          "type": "boolean"
        },
        "image": {
          "default": false,
          "description": "Agent supports [`ContentBlock::Image`].",
          "type": "boolean"
        }
      },
      "type": "object"
    },
    "PromptRequest": {
      "description": "Request parameters for sending a user prompt to the agent.\n\nContains the user's message and any additional context.\n\nSee protocol docs: [User Message](https://agentclientprotocol.com/protocol/prompt-turn#1-user-message)",
      "properties": {
        "_meta": {
          "description": "Extension point for implementations"
        },
        "prompt": {
          "description": "The blocks of content that compose the user's message.\n\nAs a baseline, the Agent MUST support [`ContentBlock::Text`] and [`ContentBlock::ResourceLink`],\nwhile other variants are optionally enabled via [`PromptCapabilities`].\n\nThe Client MUST adapt its interface according to [`PromptCapabilities`].\n\nThe client MAY include referenced pieces of context as either\n[`ContentBlock::Resource`] or [`ContentBlock::ResourceLink`].\n\nWhen available, [`ContentBlock::Resource`] is preferred\nas it avoids extra round-trips and allows the message to include\npieces of context from sources the agent may not have access to.",
          "items": {
            "$ref": "#/$defs/ContentBlock"
          },
          "type": "array"
        },
        "sessionId": {
          "$ref": "#/$defs/SessionId",
          "description": "The ID of the session to send this user message to"
        }
      },
      "required": ["sessionId", "prompt"],
      "type": "object",
      "x-method": "session/prompt",
      "x-side": "agent"
    },
    "PromptResponse": {
      "description": "Response from processing a user prompt.\n\nSee protocol docs: [Check for Completion](https://agentclientprotocol.com/protocol/prompt-turn#4-check-for-completion)",
      "properties": {
        "_meta": {
          "description": "Extension point for implementations"
        },
        "stopReason": {
          "$ref": "#/$defs/StopReason",
          "description": "Indicates why the agent stopped processing the turn."
        }
      },
      "required": ["stopReason"],
      "type": "object",
      "x-method": "session/prompt",
      "x-side": "agent"
    },
    "ProtocolVersion": {
      "description": "Protocol version identifier.\n\nThis version is only bumped for breaking changes.\nNon-breaking changes should be introduced via capabilities.",
      "format": "uint16",
      "maximum": 65535,
      "minimum": 0,
      "type": "integer"
    },
    "ReadTextFileRequest": {
      "description": "Request to read content from a text file.\n\nOnly available if the client supports the `fs.readTextFile` capability.",
      "properties": {
        "_meta": {
          "description": "Extension point for implementations"
        },
        "limit": {
          "description": "Maximum number of lines to read.",
          "format": "uint32",
          "minimum": 0,
          "type": ["integer", "null"]
        },
        "line": {
          "description": "Line number to start reading from (1-based).",
          "format": "uint32",
          "minimum": 0,
          "type": ["integer", "null"]
        },
        "path": {
          "description": "Absolute path to the file to read.",
          "type": "string"
        },
        "sessionId": {
          "$ref": "#/$defs/SessionId",
          "description": "The session ID for this request."
        }
      },
      "required": ["sessionId", "path"],
      "type": "object",
      "x-method": "fs/read_text_file",
      "x-side": "client"
    },
    "ReadTextFileResponse": {
      "description": "Response containing the contents of a text file.",
      "properties": {
        "_meta": {
          "description": "Extension point for implementations"
        },
        "content": {
          "type": "string"
        }
      },
      "required": ["content"],
      "type": "object",
      "x-method": "fs/read_text_file",
      "x-side": "client"
    },
    "ReleaseTerminalRequest": {
      "description": "Request to release a terminal and free its resources.",
      "properties": {
        "_meta": {
          "description": "Extension point for implementations"
        },
        "sessionId": {
          "$ref": "#/$defs/SessionId",
          "description": "The session ID for this request."
        },
        "terminalId": {
          "description": "The ID of the terminal to release.",
          "type": "string"
        }
      },
      "required": ["sessionId", "terminalId"],
      "type": "object",
      "x-method": "terminal/release",
      "x-side": "client"
    },
    "ReleaseTerminalResponse": {
      "description": "Response to terminal/release method",
      "properties": {
        "_meta": {
          "description": "Extension point for implementations"
        }
      },
      "type": "object",
      "x-method": "terminal/release",
      "x-side": "client"
    },
    "RequestPermissionOutcome": {
      "description": "The outcome of a permission request.",
      "oneOf": [
        {
          "description": "The prompt turn was cancelled before the user responded.\n\nWhen a client sends a `session/cancel` notification to cancel an ongoing\nprompt turn, it MUST respond to all pending `session/request_permission`\nrequests with this `Cancelled` outcome.\n\nSee protocol docs: [Cancellation](https://agentclientprotocol.com/protocol/prompt-turn#cancellation)",
          "properties": {
            "outcome": {
              "const": "cancelled",
              "type": "string"
            }
          },
          "required": ["outcome"],
          "type": "object"
        },
        {
          "description": "The user selected one of the provided options.",
          "properties": {
            "optionId": {
              "$ref": "#/$defs/PermissionOptionId",
              "description": "The ID of the option the user selected."
            },
            "outcome": {
              "const": "selected",
              "type": "string"
            }
          },
          "required": ["outcome", "optionId"],
          "type": "object"
        }
      ]
    },
    "RequestPermissionRequest": {
      "description": "Request for user permission to execute a tool call.\n\nSent when the agent needs authorization before performing a sensitive operation.\n\nSee protocol docs: [Requesting Permission](https://agentclientprotocol.com/protocol/tool-calls#requesting-permission)",
      "properties": {
        "_meta": {
          "description": "Extension point for implementations"
        },
        "options": {
          "description": "Available permission options for the user to choose from.",
          "items": {
            "$ref": "#/$defs/PermissionOption"
          },
          "type": "array"
        },
        "sessionId": {
          "$ref": "#/$defs/SessionId",
          "description": "The session ID for this request."
        },
        "toolCall": {
          "$ref": "#/$defs/ToolCallUpdate",
          "description": "Details about the tool call requiring permission."
        }
      },
      "required": ["sessionId", "toolCall", "options"],
      "type": "object",
      "x-method": "session/request_permission",
      "x-side": "client"
    },
    "RequestPermissionResponse": {
      "description": "Response to a permission request.",
      "properties": {
        "_meta": {
          "description": "Extension point for implementations"
        },
        "outcome": {
          "$ref": "#/$defs/RequestPermissionOutcome",
          "description": "The user's decision on the permission request."
        }
      },
      "required": ["outcome"],
      "type": "object",
      "x-method": "session/request_permission",
      "x-side": "client"
    },
    "ResourceLink": {
      "description": "A resource that the server is capable of reading, included in a prompt or tool call result.",
      "properties": {
        "_meta": {
          "description": "Extension point for implementations"
        },
        "annotations": {
          "anyOf": [
            {
              "$ref": "#/$defs/Annotations"
            },
            {
              "type": "null"
            }
          ]
        },
        "description": {
          "type": ["string", "null"]
        },
        "mimeType": {
          "type": ["string", "null"]
        },
        "name": {
          "type": "string"
        },
        "size": {
          "format": "int64",
          "type": ["integer", "null"]
        },
        "title": {
          "type": ["string", "null"]
        },
        "uri": {
          "type": "string"
        }
      },
      "required": ["name", "uri"],
      "type": "object"
    },
    "Role": {
      "description": "The sender or recipient of messages and data in a conversation.",
      "enum": ["assistant", "user"],
      "type": "string"
    },
    "SessionId": {
      "description": "A unique identifier for a conversation session between a client and agent.\n\nSessions maintain their own context, conversation history, and state,\nallowing multiple independent interactions with the same agent.\n\n# Example\n\n```\nuse agent_client_protocol::SessionId;\nuse std::sync::Arc;\n\nlet session_id = SessionId(Arc::from(\"sess_abc123def456\"));\n```\n\nSee protocol docs: [Session ID](https://agentclientprotocol.com/protocol/session-setup#session-id)",
      "type": "string"
    },
    "SessionMode": {
      "description": "A mode the agent can operate in.\n\nSee protocol docs: [Session Modes](https://agentclientprotocol.com/protocol/session-modes)",
      "properties": {
        "_meta": {
          "description": "Extension point for implementations"
        },
        "description": {
          "type": ["string", "null"]
        },
        "id": {
          "$ref": "#/$defs/SessionModeId"
        },
        "name": {
          "type": "string"
        }
      },
      "required": ["id", "name"],
      "type": "object"
    },
    "SessionModeId": {
      "description": "Unique identifier for a Session Mode.",
      "type": "string"
    },
    "SessionModeState": {
      "description": "The set of modes and the one currently active.",
      "properties": {
        "_meta": {
          "description": "Extension point for implementations"
        },
        "availableModes": {
          "description": "The set of modes that the Agent can operate in",
          "items": {
            "$ref": "#/$defs/SessionMode"
          },
          "type": "array"
        },
        "currentModeId": {
          "$ref": "#/$defs/SessionModeId",
          "description": "The current mode the Agent is in."
        }
      },
      "required": ["currentModeId", "availableModes"],
      "type": "object"
    },
    "SessionModelState": {
      "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nThe set of models and the one currently active.",
      "properties": {
        "_meta": {
          "description": "Extension point for implementations"
        },
        "availableModels": {
          "description": "The set of models that the Agent can use",
          "items": {
            "$ref": "#/$defs/ModelInfo"
          },
          "type": "array"
        },
        "currentModelId": {
          "$ref": "#/$defs/ModelId",
          "description": "The current model the Agent is in."
        }
      },
      "required": ["currentModelId", "availableModels"],
      "type": "object"
    },
    "SessionNotification": {
      "description": "Notification containing a session update from the agent.\n\nUsed to stream real-time progress and results during prompt processing.\n\nSee protocol docs: [Agent Reports Output](https://agentclientprotocol.com/protocol/prompt-turn#3-agent-reports-output)",
      "properties": {
        "_meta": {
          "description": "Extension point for implementations"
        },
        "sessionId": {
          "$ref": "#/$defs/SessionId",
          "description": "The ID of the session this update pertains to."
        },
        "update": {
          "$ref": "#/$defs/SessionUpdate",
          "description": "The actual update content."
        }
      },
      "required": ["sessionId", "update"],
      "type": "object",
      "x-method": "session/update",
      "x-side": "client"
    },
    "SessionUpdate": {
      "description": "Different types of updates that can be sent during session processing.\n\nThese updates provide real-time feedback about the agent's progress.\n\nSee protocol docs: [Agent Reports Output](https://agentclientprotocol.com/protocol/prompt-turn#3-agent-reports-output)",
      "oneOf": [
        {
          "description": "A chunk of the user's message being streamed.",
          "properties": {
            "content": {
              "$ref": "#/$defs/ContentBlock"
            },
            "sessionUpdate": {
              "const": "user_message_chunk",
              "type": "string"
            }
          },
          "required": ["sessionUpdate", "content"],
          "type": "object"
        },
        {
          "description": "A chunk of the agent's response being streamed.",
          "properties": {
            "content": {
              "$ref": "#/$defs/ContentBlock"
            },
            "sessionUpdate": {
              "const": "agent_message_chunk",
              "type": "string"
            }
          },
          "required": ["sessionUpdate", "content"],
          "type": "object"
        },
        {
          "description": "A chunk of the agent's internal reasoning being streamed.",
          "properties": {
            "content": {
              "$ref": "#/$defs/ContentBlock"
            },
            "sessionUpdate": {
              "const": "agent_thought_chunk",
              "type": "string"
            }
          },
          "required": ["sessionUpdate", "content"],
          "type": "object"
        },
        {
          "description": "Notification that a new tool call has been initiated.",
          "properties": {
            "_meta": {
              "description": "Extension point for implementations"
            },
            "content": {
              "description": "Content produced by the tool call.",
              "items": {
                "$ref": "#/$defs/ToolCallContent"
              },
              "type": "array"
            },
            "kind": {
              "$ref": "#/$defs/ToolKind",
              "description": "The category of tool being invoked.\nHelps clients choose appropriate icons and UI treatment."
            },
            "locations": {
              "description": "File locations affected by this tool call.\nEnables \"follow-along\" features in clients.",
              "items": {
                "$ref": "#/$defs/ToolCallLocation"
              },
              "type": "array"
            },
            "rawInput": {
              "description": "Raw input parameters sent to the tool."
            },
            "rawOutput": {
              "description": "Raw output returned by the tool."
            },
            "sessionUpdate": {
              "const": "tool_call",
              "type": "string"
            },
            "status": {
              "$ref": "#/$defs/ToolCallStatus",
              "description": "Current execution status of the tool call."
            },
            "title": {
              "description": "Human-readable title describing what the tool is doing.",
              "type": "string"
            },
            "toolCallId": {
              "$ref": "#/$defs/ToolCallId",
              "description": "Unique identifier for this tool call within the session."
            }
          },
          "required": ["sessionUpdate", "toolCallId", "title"],
          "type": "object"
        },
        {
          "description": "Update on the status or results of a tool call.",
          "properties": {
            "_meta": {
              "description": "Extension point for implementations"
            },
            "content": {
              "description": "Replace the content collection.",
              "items": {
                "$ref": "#/$defs/ToolCallContent"
              },
              "type": ["array", "null"]
            },
            "kind": {
              "anyOf": [
                {
                  "$ref": "#/$defs/ToolKind"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Update the tool kind."
            },
            "locations": {
              "description": "Replace the locations collection.",
              "items": {
                "$ref": "#/$defs/ToolCallLocation"
              },
              "type": ["array", "null"]
            },
            "rawInput": {
              "description": "Update the raw input."
            },
            "rawOutput": {
              "description": "Update the raw output."
            },
            "sessionUpdate": {
              "const": "tool_call_update",
              "type": "string"
            },
            "status": {
              "anyOf": [
                {
                  "$ref": "#/$defs/ToolCallStatus"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Update the execution status."
            },
            "title": {
              "description": "Update the human-readable title.",
              "type": ["string", "null"]
            },
            "toolCallId": {
              "$ref": "#/$defs/ToolCallId",
              "description": "The ID of the tool call being updated."
            }
          },
          "required": ["sessionUpdate", "toolCallId"],
          "type": "object"
        },
        {
          "description": "The agent's execution plan for complex tasks.\nSee protocol docs: [Agent Plan](https://agentclientprotocol.com/protocol/agent-plan)",
          "properties": {
            "_meta": {
              "description": "Extension point for implementations"
            },
            "entries": {
              "description": "The list of tasks to be accomplished.\n\nWhen updating a plan, the agent must send a complete list of all entries\nwith their current status. The client replaces the entire plan with each update.",
              "items": {
                "$ref": "#/$defs/PlanEntry"
              },
              "type": "array"
            },
            "sessionUpdate": {
              "const": "plan",
              "type": "string"
            }
          },
          "required": ["sessionUpdate", "entries"],
          "type": "object"
        },
        {
          "description": "Available commands are ready or have changed",
          "properties": {
            "availableCommands": {
              "items": {
                "$ref": "#/$defs/AvailableCommand"
              },
              "type": "array"
            },
            "sessionUpdate": {
              "const": "available_commands_update",
              "type": "string"
            }
          },
          "required": ["sessionUpdate", "availableCommands"],
          "type": "object"
        },
        {
          "description": "The current mode of the session has changed\n\nSee protocol docs: [Session Modes](https://agentclientprotocol.com/protocol/session-modes)",
          "properties": {
            "currentModeId": {
              "$ref": "#/$defs/SessionModeId"
            },
            "sessionUpdate": {
              "const": "current_mode_update",
              "type": "string"
            }
          },
          "required": ["sessionUpdate", "currentModeId"],
          "type": "object"
        }
      ]
    },
    "SetSessionModeRequest": {
      "description": "Request parameters for setting a session mode.",
      "properties": {
        "_meta": {
          "description": "Extension point for implementations"
        },
        "modeId": {
          "$ref": "#/$defs/SessionModeId",
          "description": "The ID of the mode to set."
        },
        "sessionId": {
          "$ref": "#/$defs/SessionId",
          "description": "The ID of the session to set the mode for."
        }
      },
      "required": ["sessionId", "modeId"],
      "type": "object",
      "x-method": "session/set_mode",
      "x-side": "agent"
    },
    "SetSessionModeResponse": {
      "description": "Response to `session/set_mode` method.",
      "properties": {
        "meta": true
      },
      "type": "object",
      "x-method": "session/set_mode",
      "x-side": "agent"
    },
    "SetSessionModelRequest": {
      "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nRequest parameters for setting a session model.",
      "properties": {
        "_meta": {
          "description": "Extension point for implementations"
        },
        "modelId": {
          "$ref": "#/$defs/ModelId",
          "description": "The ID of the model to set."
        },
        "sessionId": {
          "$ref": "#/$defs/SessionId",
          "description": "The ID of the session to set the model for."
        }
      },
      "required": ["sessionId", "modelId"],
      "type": "object",
      "x-method": "session/set_model",
      "x-side": "agent"
    },
    "SetSessionModelResponse": {
      "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nResponse to `session/set_model` method.",
      "properties": {
        "_meta": {
          "description": "Extension point for implementations"
        }
      },
      "type": "object",
      "x-method": "session/set_model",
      "x-side": "agent"
    },
    "StopReason": {
      "description": "Reasons why an agent stops processing a prompt turn.\n\nSee protocol docs: [Stop Reasons](https://agentclientprotocol.com/protocol/prompt-turn#stop-reasons)",
      "oneOf": [
        {
          "const": "end_turn",
          "description": "The turn ended successfully.",
          "type": "string"
        },
        {
          "const": "max_tokens",
          "description": "The turn ended because the agent reached the maximum number of tokens.",
          "type": "string"
        },
        {
          "const": "max_turn_requests",
          "description": "The turn ended because the agent reached the maximum number of allowed\nagent requests between user turns.",
          "type": "string"
        },
        {
          "const": "refusal",
          "description": "The turn ended because the agent refused to continue. The user prompt\nand everything that comes after it won't be included in the next\nprompt, so this should be reflected in the UI.",
          "type": "string"
        },
        {
          "const": "cancelled",
          "description": "The turn was cancelled by the client via `session/cancel`.\n\nThis stop reason MUST be returned when the client sends a `session/cancel`\nnotification, even if the cancellation causes exceptions in underlying operations.\nAgents should catch these exceptions and return this semantically meaningful\nresponse to confirm successful cancellation.",
          "type": "string"
        }
      ]
    },
    "TerminalExitStatus": {
      "description": "Exit status of a terminal command.",
      "properties": {
        "_meta": {
          "description": "Extension point for implementations"
        },
        "exitCode": {
          "description": "The process exit code (may be null if terminated by signal).",
          "format": "uint32",
          "minimum": 0,
          "type": ["integer", "null"]
        },
        "signal": {
          "description": "The signal that terminated the process (may be null if exited normally).",
          "type": ["string", "null"]
        }
      },
      "type": "object"
    },
    "TerminalOutputRequest": {
      "description": "Request to get the current output and status of a terminal.",
      "properties": {
        "_meta": {
          "description": "Extension point for implementations"
        },
        "sessionId": {
          "$ref": "#/$defs/SessionId",
          "description": "The session ID for this request."
        },
        "terminalId": {
          "description": "The ID of the terminal to get output from.",
          "type": "string"
        }
      },
      "required": ["sessionId", "terminalId"],
      "type": "object",
      "x-method": "terminal/output",
      "x-side": "client"
    },
    "TerminalOutputResponse": {
      "description": "Response containing the terminal output and exit status.",
      "properties": {
        "_meta": {
          "description": "Extension point for implementations"
        },
        "exitStatus": {
          "anyOf": [
            {
              "$ref": "#/$defs/TerminalExitStatus"
            },
            {
              "type": "null"
            }
          ],
          "description": "Exit status if the command has completed."
        },
        "output": {
          "description": "The terminal output captured so far.",
          "type": "string"
        },
        "truncated": {
          "description": "Whether the output was truncated due to byte limits.",
          "type": "boolean"
        }
      },
      "required": ["output", "truncated"],
      "type": "object",
      "x-method": "terminal/output",
      "x-side": "client"
    },
    "TextContent": {
      "description": "Text provided to or from an LLM.",
      "properties": {
        "_meta": {
          "description": "Extension point for implementations"
        },
        "annotations": {
          "anyOf": [
            {
              "$ref": "#/$defs/Annotations"
            },
            {
              "type": "null"
            }
          ]
        },
        "text": {
          "type": "string"
        }
      },
      "required": ["text"],
      "type": "object"
    },
    "TextResourceContents": {
      "description": "Text-based resource contents.",
      "properties": {
        "_meta": {
          "description": "Extension point for implementations"
        },
        "mimeType": {
          "type": ["string", "null"]
        },
        "text": {
          "type": "string"
        },
        "uri": {
          "type": "string"
        }
      },
      "required": ["text", "uri"],
      "type": "object"
    },
    "ToolCall": {
      "description": "Represents a tool call that the language model has requested.\n\nTool calls are actions that the agent executes on behalf of the language model,\nsuch as reading files, executing code, or fetching data from external sources.\n\nSee protocol docs: [Tool Calls](https://agentclientprotocol.com/protocol/tool-calls)",
      "properties": {
        "_meta": {
          "description": "Extension point for implementations"
        },
        "content": {
          "description": "Content produced by the tool call.",
          "items": {
            "$ref": "#/$defs/ToolCallContent"
          },
          "type": "array"
        },
        "kind": {
          "$ref": "#/$defs/ToolKind",
          "description": "The category of tool being invoked.\nHelps clients choose appropriate icons and UI treatment."
        },
        "locations": {
          "description": "File locations affected by this tool call.\nEnables \"follow-along\" features in clients.",
          "items": {
            "$ref": "#/$defs/ToolCallLocation"
          },
          "type": "array"
        },
        "rawInput": {
          "description": "Raw input parameters sent to the tool."
        },
        "rawOutput": {
          "description": "Raw output returned by the tool."
        },
        "status": {
          "$ref": "#/$defs/ToolCallStatus",
          "description": "Current execution status of the tool call."
        },
        "title": {
          "description": "Human-readable title describing what the tool is doing.",
          "type": "string"
        },
        "toolCallId": {
          "$ref": "#/$defs/ToolCallId",
          "description": "Unique identifier for this tool call within the session."
        }
      },
      "required": ["toolCallId", "title"],
      "type": "object"
    },
    "ToolCallContent": {
      "description": "Content produced by a tool call.\n\nTool calls can produce different types of content including\nstandard content blocks (text, images) or file diffs.\n\nSee protocol docs: [Content](https://agentclientprotocol.com/protocol/tool-calls#content)",
      "oneOf": [
        {
          "description": "Standard content block (text, images, resources).",
          "properties": {
            "content": {
              "$ref": "#/$defs/ContentBlock",
              "description": "The actual content block."
            },
            "type": {
              "const": "content",
              "type": "string"
            }
          },
          "required": ["type", "content"],
          "type": "object"
        },
        {
          "description": "File modification shown as a diff.",
          "properties": {
            "_meta": {
              "description": "Extension point for implementations"
            },
            "newText": {
              "description": "The new content after modification.",
              "type": "string"
            },
            "oldText": {
              "description": "The original content (None for new files).",
              "type": ["string", "null"]
            },
            "path": {
              "description": "The file path being modified.",
              "type": "string"
            },
            "type": {
              "const": "diff",
              "type": "string"
            }
          },
          "required": ["type", "path", "newText"],
          "type": "object"
        },
        {
          "description": "Embed a terminal created with `terminal/create` by its id.\n\nThe terminal must be added before calling `terminal/release`.\n\nSee protocol docs: [Terminal](https://agentclientprotocol.com/protocol/terminal)",
          "properties": {
            "terminalId": {
              "type": "string"
            },
            "type": {
              "const": "terminal",
              "type": "string"
            }
          },
          "required": ["type", "terminalId"],
          "type": "object"
        }
      ]
    },
    "ToolCallId": {
      "description": "Unique identifier for a tool call within a session.",
      "type": "string"
    },
    "ToolCallLocation": {
      "description": "A file location being accessed or modified by a tool.\n\nEnables clients to implement \"follow-along\" features that track\nwhich files the agent is working with in real-time.\n\nSee protocol docs: [Following the Agent](https://agentclientprotocol.com/protocol/tool-calls#following-the-agent)",
      "properties": {
        "_meta": {
          "description": "Extension point for implementations"
        },
        "line": {
          "description": "Optional line number within the file.",
          "format": "uint32",
          "minimum": 0,
          "type": ["integer", "null"]
        },
        "path": {
          "description": "The file path being accessed or modified.",
          "type": "string"
        }
      },
      "required": ["path"],
      "type": "object"
    },
    "ToolCallStatus": {
      "description": "Execution status of a tool call.\n\nTool calls progress through different statuses during their lifecycle.\n\nSee protocol docs: [Status](https://agentclientprotocol.com/protocol/tool-calls#status)",
      "oneOf": [
        {
          "const": "pending",
          "description": "The tool call hasn't started running yet because the input is either\nstreaming or we're awaiting approval.",
          "type": "string"
        },
        {
          "const": "in_progress",
          "description": "The tool call is currently running.",
          "type": "string"
        },
        {
          "const": "completed",
          "description": "The tool call completed successfully.",
          "type": "string"
        },
        {
          "const": "failed",
          "description": "The tool call failed with an error.",
          "type": "string"
        }
      ]
    },
    "ToolCallUpdate": {
      "description": "An update to an existing tool call.\n\nUsed to report progress and results as tools execute. All fields except\nthe tool call ID are optional - only changed fields need to be included.\n\nSee protocol docs: [Updating](https://agentclientprotocol.com/protocol/tool-calls#updating)",
      "properties": {
        "_meta": {
          "description": "Extension point for implementations"
        },
        "content": {
          "description": "Replace the content collection.",
          "items": {
            "$ref": "#/$defs/ToolCallContent"
          },
          "type": ["array", "null"]
        },
        "kind": {
          "anyOf": [
            {
              "$ref": "#/$defs/ToolKind"
            },
            {
              "type": "null"
            }
          ],
          "description": "Update the tool kind."
        },
        "locations": {
          "description": "Replace the locations collection.",
          "items": {
            "$ref": "#/$defs/ToolCallLocation"
          },
          "type": ["array", "null"]
        },
        "rawInput": {
          "description": "Update the raw input."
        },
        "rawOutput": {
          "description": "Update the raw output."
        },
        "status": {
          "anyOf": [
            {
              "$ref": "#/$defs/ToolCallStatus"
            },
            {
              "type": "null"
            }
          ],
          "description": "Update the execution status."
        },
        "title": {
          "description": "Update the human-readable title.",
          "type": ["string", "null"]
        },
        "toolCallId": {
          "$ref": "#/$defs/ToolCallId",
          "description": "The ID of the tool call being updated."
        }
      },
      "required": ["toolCallId"],
      "type": "object"
    },
    "ToolKind": {
      "description": "Categories of tools that can be invoked.\n\nTool kinds help clients choose appropriate icons and optimize how they\ndisplay tool execution progress.\n\nSee protocol docs: [Creating](https://agentclientprotocol.com/protocol/tool-calls#creating)",
      "oneOf": [
        {
          "const": "read",
          "description": "Reading files or data.",
          "type": "string"
        },
        {
          "const": "edit",
          "description": "Modifying files or content.",
          "type": "string"
        },
        {
          "const": "delete",
          "description": "Removing files or data.",
          "type": "string"
        },
        {
          "const": "move",
          "description": "Moving or renaming files.",
          "type": "string"
        },
        {
          "const": "search",
          "description": "Searching for information.",
          "type": "string"
        },
        {
          "const": "execute",
          "description": "Running commands or code.",
          "type": "string"
        },
        {
          "const": "think",
          "description": "Internal reasoning or planning.",
          "type": "string"
        },
        {
          "const": "fetch",
          "description": "Retrieving external data.",
          "type": "string"
        },
        {
          "const": "switch_mode",
          "description": "Switching the current session mode.",
          "type": "string"
        },
        {
          "const": "other",
          "description": "Other tool types (default).",
          "type": "string"
        }
      ]
    },
    "WaitForTerminalExitRequest": {
      "description": "Request to wait for a terminal command to exit.",
      "properties": {
        "_meta": {
          "description": "Extension point for implementations"
        },
        "sessionId": {
          "$ref": "#/$defs/SessionId",
          "description": "The session ID for this request."
        },
        "terminalId": {
          "description": "The ID of the terminal to wait for.",
          "type": "string"
        }
      },
      "required": ["sessionId", "terminalId"],
      "type": "object",
      "x-method": "terminal/wait_for_exit",
      "x-side": "client"
    },
    "WaitForTerminalExitResponse": {
      "description": "Response containing the exit status of a terminal command.",
      "properties": {
        "_meta": {
          "description": "Extension point for implementations"
        },
        "exitCode": {
          "description": "The process exit code (may be null if terminated by signal).",
          "format": "uint32",
          "minimum": 0,
          "type": ["integer", "null"]
        },
        "signal": {
          "description": "The signal that terminated the process (may be null if exited normally).",
          "type": ["string", "null"]
        }
      },
      "type": "object",
      "x-method": "terminal/wait_for_exit",
      "x-side": "client"
    },
    "WriteTextFileRequest": {
      "description": "Request to write content to a text file.\n\nOnly available if the client supports the `fs.writeTextFile` capability.",
      "properties": {
        "_meta": {
          "description": "Extension point for implementations"
        },
        "content": {
          "description": "The text content to write to the file.",
          "type": "string"
        },
        "path": {
          "description": "Absolute path to the file to write.",
          "type": "string"
        },
        "sessionId": {
          "$ref": "#/$defs/SessionId",
          "description": "The session ID for this request."
        }
      },
      "required": ["sessionId", "path", "content"],
      "type": "object",
      "x-method": "fs/write_text_file",
      "x-side": "client"
    },
    "WriteTextFileResponse": {
      "description": "Response to `fs/write_text_file`",
      "properties": {
        "_meta": {
          "description": "Extension point for implementations"
        }
      },
      "type": "object",
      "x-method": "fs/write_text_file",
      "x-side": "client"
    }
  },
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "anyOf": [
    {
      "$ref": "#/$defs/AgentRequest",
      "title": "ClientRequest"
    },
    {
      "$ref": "#/$defs/ClientResponse",
      "title": "ClientResponse"
    },
    {
      "$ref": "#/$defs/ClientNotification",
      "title": "ClientNotification"
    },
    {
      "$ref": "#/$defs/ClientRequest",
      "title": "AgentRequest"
    },
    {
      "$ref": "#/$defs/AgentResponse",
      "title": "AgentResponse"
    },
    {
      "$ref": "#/$defs/AgentNotification",
      "title": "AgentNotification"
    }
  ]
}
