diff --git a/Cargo.lock b/Cargo.lock index 09b3cda..1b3ba38 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -54,42 +54,42 @@ checksum = "4a5f13b858c8d314ee3e8f639011f7ccefe71f97f96e50151fb991f267928e2c" [[package]] name = "memchr" -version = "2.7.5" +version = "2.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32a282da65faaf38286cf3be983213fcf1d2e2a58700e808f83f4ea9a4804bc0" +checksum = "f52b00d39961fc5b2736ea853c9cc86238e165017a493d1d5c8eac6bdc4cc273" [[package]] name = "proc-macro2" -version = "1.0.101" +version = "1.0.103" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89ae43fd86e4158d6db51ad8e2b80f313af9cc74f5c0e03ccb87de09998732de" +checksum = "5ee95bc4ef87b8d5ba32e8b7714ccc834865276eab0aed5c9958d00ec45f49e8" dependencies = [ "unicode-ident", ] [[package]] name = "quote" -version = "1.0.40" +version = "1.0.42" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1885c039570dc00dcb4ff087a89e185fd56bae234ddc7f056a945bf36467248d" +checksum = "a338cc41d27e6cc6dce6cefc13a0729dfbb81c262b1f519331575dd80ef3067f" dependencies = [ "proc-macro2", ] [[package]] name = "ref-cast" -version = "1.0.24" +version = "1.0.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a0ae411dbe946a674d89546582cea4ba2bb8defac896622d6496f14c23ba5cf" +checksum = "f354300ae66f76f1c85c5f84693f0ce81d747e2c3f21a45fef496d89c960bf7d" dependencies = [ "ref-cast-impl", ] [[package]] name = "ref-cast-impl" -version = "1.0.24" +version = "1.0.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1165225c21bff1f3bbce98f5a1f889949bc902d3575308cc7b0de30b4f6d27c7" +checksum = "b7186006dcb21920990093f30e3dea63b7d6e977bf1256be20c3563a5db070da" dependencies = [ "proc-macro2", "quote", @@ -104,9 +104,9 @@ checksum = "28d3b2b1366ec20994f1fd18c3c594f05c5dd4bc44d8bb0c1c632c8d6829481f" [[package]] name = "schemars" -version = "1.0.4" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82d20c4491bc164fa2f6c5d44565947a52ad80b9505d8e36f8d54c27c739fcd0" +checksum = "9558e172d4e8533736ba97870c4b2cd63f84b382a3d6eb063da41b91cce17289" dependencies = [ "dyn-clone", "ref-cast", @@ -117,9 +117,9 @@ dependencies = [ [[package]] name = "schemars_derive" -version = "1.0.4" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33d020396d1d138dc19f1165df7545479dcd58d93810dc5d646a16e55abefa80" +checksum = "301858a4023d78debd2353c7426dc486001bddc91ae31a76fb1f55132f7e2633" dependencies = [ "proc-macro2", "quote", @@ -129,9 +129,9 @@ dependencies = [ [[package]] name = "serde" -version = "1.0.226" +version = "1.0.228" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0dca6411025b24b60bfa7ec1fe1f8e710ac09782dca409ee8237ba74b51295fd" +checksum = "9a8e94ea7f378bd32cbbd37198a4a91436180c5bb472411e48b5ec2e2124ae9e" dependencies = [ "serde_core", "serde_derive", @@ -139,18 +139,18 @@ dependencies = [ [[package]] name = "serde_core" -version = "1.0.226" +version = "1.0.228" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba2ba63999edb9dac981fb34b3e5c0d111a69b0924e253ed29d83f7c99e966a4" +checksum = "41d385c7d4ca58e59fc732af25c3983b67ac852c1a25000afe1175de458b67ad" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.226" +version = "1.0.228" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8db53ae22f34573731bafa1db20f04027b2d25e02d8205921b569171699cdb33" +checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79" dependencies = [ "proc-macro2", "quote", @@ -183,9 +183,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.106" +version = "2.0.110" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ede7c438028d4436d71104916910f5bb611972c5cfd7f89b8300a8186e6fada6" +checksum = "a99801b5bd34ede4cf3fc688c5919368fea4e4814a4664359503e6015b280aea" dependencies = [ "proc-macro2", "quote", @@ -194,9 +194,9 @@ dependencies = [ [[package]] name = "unicode-ident" -version = "1.0.19" +version = "1.0.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f63a545481291138910575129486daeaf8ac54aee4387fe7906919f7830c7d9d" +checksum = "9312f7c4f6ff9069b165498234ce8be658059c6728633667c526e27dc2cf1df5" [[package]] name = "unicode-xid" diff --git a/Cargo.toml b/Cargo.toml index 8a95d9f..84f94ed 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -27,7 +27,7 @@ path = "rust/bin/generate.rs" [dependencies] anyhow = "1" -derive_more = { version = "2.0.1", features = ["from", "display"] } +derive_more = { version = "2", features = ["from", "display"] } schemars = { version = "1" } serde = { version = "1", features = ["derive", "rc"] } serde_json = { version = "1", features = ["raw_value"] } diff --git a/docs/protocol/schema.mdx b/docs/protocol/schema.mdx index d21e0d6..a19fd37 100644 --- a/docs/protocol/schema.mdx +++ b/docs/protocol/schema.mdx @@ -613,7 +613,11 @@ See protocol docs: [Requesting Permission](https://agentclientprotocol.com/proto > The session ID for this request. - +ToolCallUpdate} + required +> Details about the tool call requiring permission. @@ -1017,6 +1021,31 @@ Optional annotations for the client. The client can use annotations to inform ho +## AudioContent + +Audio provided to or from an LLM. + +**Type:** Object + +**Properties:** + + + Extension point for implementations + + + + Annotations + + | null + + } +> + + + ## AuthMethod Describes an available authentication method. @@ -1097,6 +1126,32 @@ All text that was typed after the command name is provided as input. +## AvailableCommandsUpdate + +Available commands are ready or have changed + +**Type:** Object + +**Properties:** + + + Extension point for implementations + + + + AvailableCommand + + [] + + } + required +> + Commands the agent can execute + + ## BlobResourceContents Binary resource contents. @@ -1312,6 +1367,74 @@ Requires the `embeddedContext` prompt capability when included in prompts. +## ContentChunk + +A streamed item of content + +**Type:** Object + +**Properties:** + + + Extension point for implementations + +ContentBlock} + required +> + A single item of content + + +## CurrentModeUpdate + +The current mode of the session has changed + +See protocol docs: [Session Modes](https://agentclientprotocol.com/protocol/session-modes) + +**Type:** Object + +**Properties:** + + + Extension point for implementations + +SessionModeId} + required +> + The ID of the current mode + + +## EmbeddedResource + +The contents of a resource, embedded into a prompt or tool call result. + +**Type:** Object + +**Properties:** + + + Extension point for implementations + + + + Annotations + + | null + + } +> +EmbeddedResourceResource} + required +> + ## EmbeddedResourceResource Resource content that can be embedded in a message. @@ -1437,6 +1560,32 @@ An HTTP header to set when making requests to the MCP server. The value to set for the HTTP header. +## ImageContent + +An image provided to or from an LLM. + +**Type:** Object + +**Properties:** + + + Extension point for implementations + + + + Annotations + + | null + + } +> + + + + ## Implementation Describes the name and version of an MCP implementation, with an optional @@ -1663,6 +1812,31 @@ Helps clients choose appropriate icons and UI treatment. Reject this operation and remember the choice. +## Plan + +An execution plan for accomplishing complex tasks. + +Plans consist of multiple entries representing individual tasks or goals. +Agents report plans to clients to provide visibility into their execution strategy. +Plans can evolve during execution as the agent discovers new requirements or completes tasks. + +See protocol docs: [Agent Plan](https://agentclientprotocol.com/protocol/agent-plan) + +**Type:** Object + +**Properties:** + + + Extension point for implementations + +PlanEntry[]} required> + The list of tasks to be accomplished. + +When updating a plan, the agent must send a complete list of all entries +with their current status. The client replaces the entire plan with each update. + + + ## PlanEntry A single entry in the execution plan. @@ -1835,6 +2009,35 @@ The user selected one of the provided options. +## ResourceLink + +A resource that the server is capable of reading, included in a prompt or tool call result. + +**Type:** Object + +**Properties:** + + + Extension point for implementations + + + + Annotations + + | null + + } +> + + + + + + + ## Role The sender or recipient of messages and data in a conversation. @@ -2250,6 +2453,30 @@ Exit status of a terminal command. The signal that terminated the process (may be null if exited normally). +## TextContent + +Text provided to or from an LLM. + +**Type:** Object + +**Properties:** + + + Extension point for implementations + + + + Annotations + + | null + + } +> + + ## TextResourceContents Text-based resource contents. @@ -2265,6 +2492,76 @@ Text-based resource contents. +## ToolCall + +Represents a tool call that the language model has requested. + +Tool calls are actions that the agent executes on behalf of the language model, +such as reading files, executing code, or fetching data from external sources. + +See protocol docs: [Tool Calls](https://agentclientprotocol.com/protocol/tool-calls) + +**Type:** Object + +**Properties:** + + + Extension point for implementations + + + + ToolCallContent + + [] + + } +> + Content produced by the tool call. + +ToolKind}> + The category of tool being invoked. Helps clients choose appropriate icons and + UI treatment. + + + + ToolCallLocation + + [] + + } +> + File locations affected by this tool call. Enables "follow-along" features in + clients. + + + Raw input parameters sent to the tool. + + + Raw output returned by the tool. + +ToolCallStatus} +> + Current execution status of the tool call. + + + Human-readable title describing what the tool is doing. + +ToolCallId} + required +> + Unique identifier for this tool call within the session. + + ## ToolCallContent Content produced by a tool call. @@ -2387,6 +2684,71 @@ See protocol docs: [Status](https://agentclientprotocol.com/protocol/tool-calls# The tool call failed with an error. +## ToolCallUpdate + +An update to an existing tool call. + +Used to report progress and results as tools execute. All fields except +the tool call ID are optional - only changed fields need to be included. + +See protocol docs: [Updating](https://agentclientprotocol.com/protocol/tool-calls#updating) + +**Type:** Object + +**Properties:** + + + Extension point for implementations + + + Replace the content collection. + + + + ToolKind + + | null + + } +> + Update the tool kind. + + + Replace the locations collection. + + + Update the raw input. + + + Update the raw output. + + + + ToolCallStatus + + | null + + } +> + Update the execution status. + + + Update the human-readable title. + +ToolCallId} + required +> + The ID of the tool call being updated. + + ## ToolKind Categories of tools that can be invoked. diff --git a/rust/agent.rs b/rust/agent.rs index 7d9bf1a..2ecf493 100644 --- a/rust/agent.rs +++ b/rust/agent.rs @@ -167,7 +167,7 @@ pub struct NewSessionResponse { /// Initial mode state if supported by the Agent /// /// See protocol docs: [Session Modes](https://agentclientprotocol.com/protocol/session-modes) - #[serde(default, skip_serializing_if = "Option::is_none")] + #[serde(skip_serializing_if = "Option::is_none")] pub modes: Option, /// **UNSTABLE** /// @@ -175,7 +175,7 @@ pub struct NewSessionResponse { /// /// Initial model state if supported by the Agent #[cfg(feature = "unstable_session_model")] - #[serde(default, skip_serializing_if = "Option::is_none")] + #[serde(skip_serializing_if = "Option::is_none")] pub models: Option, /// Extension point for implementations #[serde(skip_serializing_if = "Option::is_none", rename = "_meta")] diff --git a/rust/bin/generate.rs b/rust/bin/generate.rs index 1811a89..df27a1b 100644 --- a/rust/bin/generate.rs +++ b/rust/bin/generate.rs @@ -2,7 +2,11 @@ use agent_client_protocol_schema::{ AGENT_METHOD_NAMES, AgentSide, CLIENT_METHOD_NAMES, ClientSide, JsonRpcMessage, OutgoingMessage, VERSION, }; -use schemars::{JsonSchema, generate::SchemaSettings}; +use schemars::{ + JsonSchema, + generate::SchemaSettings, + transform::{RemoveRefSiblings, ReplaceBoolSchemas}, +}; use std::{env, fs, path::Path}; use markdown_generator::MarkdownGenerator; @@ -26,8 +30,10 @@ enum AcpTypes { } fn main() { - let mut settings = SchemaSettings::default(); - settings.untagged_enum_variant_titles = true; + let mut settings = SchemaSettings::draft2020_12(); + settings = settings + .with_transform(RemoveRefSiblings::default()) + .with_transform(ReplaceBoolSchemas::default()); let generator = settings.into_generator(); let mut schema = generator.into_root_schema_for::(); @@ -271,10 +277,8 @@ and control access to resources." write!(&mut self.output, "").unwrap(); - writeln!(&mut self.output).unwrap(); - self.document_properties_as_fields(props, variant, 0); - writeln!(&mut self.output).unwrap(); - writeln!(&mut self.output, "").unwrap(); + // Collect all properties and required fields + let mut merged_props = serde_json::Map::new(); + let mut merged_required = Vec::new(); + + // Helper to merge from a definition + let mut merge_from = |def: &Value| { + if let Some(props) = def.get("properties").and_then(|v| v.as_object()) { + for (k, v) in props { + merged_props.insert(k.clone(), v.clone()); + } } - } else if !variant_name.is_empty() { - // If this is a $ref, look up and document the referenced type's properties - if let Some(ref_def) = self.definitions.get(&variant_name).cloned() - && let Some(props) = ref_def.get("properties").and_then(|v| v.as_object()) - && !props.is_empty() - { - writeln!(&mut self.output).unwrap(); - writeln!(&mut self.output, "").unwrap(); - writeln!(&mut self.output).unwrap(); - self.document_properties_as_fields(props, &ref_def, 0); - writeln!(&mut self.output).unwrap(); - writeln!(&mut self.output, "").unwrap(); + if let Some(req) = def.get("required").and_then(|v| v.as_array()) { + for r in req { + if !merged_required.contains(r) { + merged_required.push(r.clone()); + } + } + } + }; + + // 1. Check for $ref (direct) + if let Some(ref_val) = variant.get("$ref").and_then(|v| v.as_str()) { + let type_name = ref_val.strip_prefix("#/$defs/").unwrap_or(ref_val); + if let Some(ref_def) = self.definitions.get(type_name) { + merge_from(ref_def); } } + // 2. Check for allOf (often used for inheritance/composition) + if let Some(all_of) = variant.get("allOf").and_then(|v| v.as_array()) { + for item in all_of { + if let Some(ref_val) = item.get("$ref").and_then(|v| v.as_str()) { + let type_name = ref_val.strip_prefix("#/$defs/").unwrap_or(ref_val); + if let Some(ref_def) = self.definitions.get(type_name) { + merge_from(ref_def); + } + } else { + merge_from(item); + } + } + } + + // 3. Local properties + merge_from(variant); + + if !merged_props.is_empty() { + writeln!(&mut self.output).unwrap(); + writeln!(&mut self.output, "").unwrap(); + writeln!(&mut self.output).unwrap(); + + let mut synthetic_def = serde_json::Map::new(); + synthetic_def.insert("required".to_string(), Value::Array(merged_required)); + + self.document_properties_as_fields(&merged_props, &Value::Object(synthetic_def), 0); + writeln!(&mut self.output).unwrap(); + writeln!(&mut self.output, "").unwrap(); + } + writeln!(&mut self.output, "").unwrap(); writeln!(&mut self.output).unwrap(); } @@ -584,6 +621,15 @@ and control access to resources." ); } + // Check for single-item allOf/anyOf/oneOf wrappers (often used for $ref with sibling properties) + for key in ["allOf", "anyOf", "oneOf"] { + if let Some(arr) = schema.get(key).and_then(|v| v.as_array()) + && arr.len() == 1 + { + return Self::get_type_string(&arr[0]); + } + } + // Check for type if let Some(type_val) = schema.get("type") { if let Some(type_str) = type_val.as_str() { diff --git a/rust/client.rs b/rust/client.rs index 61ec29b..c2f25b0 100644 --- a/rust/client.rs +++ b/rust/client.rs @@ -70,7 +70,6 @@ pub enum SessionUpdate { /// See protocol docs: [Session Modes](https://agentclientprotocol.com/protocol/session-modes) #[derive(Debug, Clone, Serialize, Deserialize, JsonSchema, PartialEq, Eq)] #[serde(rename_all = "camelCase")] -#[schemars(inline)] pub struct CurrentModeUpdate { /// The ID of the current mode pub current_mode_id: SessionModeId, @@ -82,7 +81,6 @@ pub struct CurrentModeUpdate { /// A streamed item of content #[derive(Debug, Clone, Serialize, Deserialize, JsonSchema, PartialEq)] #[serde(rename_all = "camelCase")] -#[schemars(inline)] pub struct ContentChunk { /// A single item of content pub content: ContentBlock, @@ -94,7 +92,6 @@ pub struct ContentChunk { /// Available commands are ready or have changed #[derive(Debug, Clone, Serialize, Deserialize, JsonSchema, PartialEq, Eq)] #[serde(rename_all = "camelCase")] -#[schemars(inline)] pub struct AvailableCommandsUpdate { /// Commands the agent can execute pub available_commands: Vec, @@ -123,7 +120,6 @@ pub struct AvailableCommand { #[serde(untagged, rename_all = "camelCase")] pub enum AvailableCommandInput { /// All text that was typed after the command name is provided as input. - #[schemars(rename = "UnstructuredCommandInput")] Unstructured { /// A hint to display when the input hasn't been provided yet hint: String, @@ -154,10 +150,10 @@ pub struct RequestPermissionRequest { /// An option presented to the user when requesting permission. #[derive(Debug, Clone, Serialize, Deserialize, JsonSchema, PartialEq, Eq)] +#[serde(rename_all = "camelCase")] pub struct PermissionOption { /// Unique identifier for this permission option. - #[serde(rename = "optionId")] - pub id: PermissionOptionId, + pub option_id: PermissionOptionId, /// Human-readable label to display to the user. pub name: String, /// Hint about the nature of this permission option. @@ -268,10 +264,10 @@ pub struct ReadTextFileRequest { /// Absolute path to the file to read. pub path: PathBuf, /// Line number to start reading from (1-based). - #[serde(default, skip_serializing_if = "Option::is_none")] + #[serde(skip_serializing_if = "Option::is_none")] pub line: Option, /// Maximum number of lines to read. - #[serde(default, skip_serializing_if = "Option::is_none")] + #[serde(skip_serializing_if = "Option::is_none")] pub limit: Option, /// Extension point for implementations #[serde(skip_serializing_if = "Option::is_none", rename = "_meta")] @@ -312,7 +308,7 @@ pub struct CreateTerminalRequest { #[serde(default, skip_serializing_if = "Vec::is_empty")] pub env: Vec, /// Working directory for the command (absolute path). - #[serde(default, skip_serializing_if = "Option::is_none")] + #[serde(skip_serializing_if = "Option::is_none")] pub cwd: Option, /// Maximum number of output bytes to retain. /// @@ -322,7 +318,7 @@ pub struct CreateTerminalRequest { /// The Client MUST ensure truncation happens at a character boundary to maintain valid /// string output, even if this means the retained output is slightly less than the /// specified limit. - #[serde(default, skip_serializing_if = "Option::is_none")] + #[serde(skip_serializing_if = "Option::is_none")] pub output_byte_limit: Option, /// Extension point for implementations #[serde(skip_serializing_if = "Option::is_none", rename = "_meta")] diff --git a/rust/content.rs b/rust/content.rs index 0e5a53c..3632905 100644 --- a/rust/content.rs +++ b/rust/content.rs @@ -57,9 +57,8 @@ pub enum ContentBlock { /// Text provided to or from an LLM. #[derive(Debug, Clone, PartialEq, Deserialize, Serialize, JsonSchema)] -#[schemars(inline)] pub struct TextContent { - #[serde(default, skip_serializing_if = "Option::is_none")] + #[serde(skip_serializing_if = "Option::is_none")] pub annotations: Option, pub text: String, /// Extension point for implementations @@ -79,14 +78,13 @@ impl> From for ContentBlock { /// An image provided to or from an LLM. #[derive(Debug, Clone, PartialEq, Deserialize, Serialize, JsonSchema)] -#[schemars(inline)] +#[serde(rename_all = "camelCase")] pub struct ImageContent { - #[serde(default, skip_serializing_if = "Option::is_none")] + #[serde(skip_serializing_if = "Option::is_none")] pub annotations: Option, pub data: String, - #[serde(rename = "mimeType")] pub mime_type: String, - #[serde(default, skip_serializing_if = "Option::is_none")] + #[serde(skip_serializing_if = "Option::is_none")] pub uri: Option, /// Extension point for implementations #[serde(skip_serializing_if = "Option::is_none", rename = "_meta")] @@ -95,12 +93,11 @@ pub struct ImageContent { /// Audio provided to or from an LLM. #[derive(Debug, Clone, PartialEq, Deserialize, Serialize, JsonSchema)] -#[schemars(inline)] +#[serde(rename_all = "camelCase")] pub struct AudioContent { - #[serde(default, skip_serializing_if = "Option::is_none")] + #[serde(skip_serializing_if = "Option::is_none")] pub annotations: Option, pub data: String, - #[serde(rename = "mimeType")] pub mime_type: String, /// Extension point for implementations #[serde(skip_serializing_if = "Option::is_none", rename = "_meta")] @@ -109,9 +106,8 @@ pub struct AudioContent { /// The contents of a resource, embedded into a prompt or tool call result. #[derive(Debug, Clone, PartialEq, Deserialize, Serialize, JsonSchema)] -#[schemars(inline)] pub struct EmbeddedResource { - #[serde(default, skip_serializing_if = "Option::is_none")] + #[serde(skip_serializing_if = "Option::is_none")] pub annotations: Option, pub resource: EmbeddedResourceResource, /// Extension point for implementations @@ -129,8 +125,9 @@ pub enum EmbeddedResourceResource { /// Text-based resource contents. #[derive(Debug, Clone, PartialEq, Deserialize, Serialize, JsonSchema)] +#[serde(rename_all = "camelCase")] pub struct TextResourceContents { - #[serde(rename = "mimeType", default, skip_serializing_if = "Option::is_none")] + #[serde(skip_serializing_if = "Option::is_none")] pub mime_type: Option, pub text: String, pub uri: String, @@ -141,9 +138,10 @@ pub struct TextResourceContents { /// Binary resource contents. #[derive(Debug, Clone, PartialEq, Deserialize, Serialize, JsonSchema)] +#[serde(rename_all = "camelCase")] pub struct BlobResourceContents { pub blob: String, - #[serde(rename = "mimeType", default, skip_serializing_if = "Option::is_none")] + #[serde(skip_serializing_if = "Option::is_none")] pub mime_type: Option, pub uri: String, /// Extension point for implementations @@ -153,18 +151,18 @@ pub struct BlobResourceContents { /// A resource that the server is capable of reading, included in a prompt or tool call result. #[derive(Debug, Clone, PartialEq, Deserialize, Serialize, JsonSchema)] -#[schemars(inline)] +#[serde(rename_all = "camelCase")] pub struct ResourceLink { - #[serde(default, skip_serializing_if = "Option::is_none")] + #[serde(skip_serializing_if = "Option::is_none")] pub annotations: Option, - #[serde(default, skip_serializing_if = "Option::is_none")] + #[serde(skip_serializing_if = "Option::is_none")] pub description: Option, - #[serde(rename = "mimeType", default, skip_serializing_if = "Option::is_none")] + #[serde(skip_serializing_if = "Option::is_none")] pub mime_type: Option, pub name: String, - #[serde(default, skip_serializing_if = "Option::is_none")] + #[serde(skip_serializing_if = "Option::is_none")] pub size: Option, - #[serde(default, skip_serializing_if = "Option::is_none")] + #[serde(skip_serializing_if = "Option::is_none")] pub title: Option, pub uri: String, /// Extension point for implementations @@ -174,16 +172,13 @@ pub struct ResourceLink { /// Optional annotations for the client. The client can use annotations to inform how objects are used or displayed #[derive(Debug, Clone, PartialEq, Deserialize, Serialize, JsonSchema)] +#[serde(rename_all = "camelCase")] pub struct Annotations { - #[serde(default, skip_serializing_if = "Option::is_none")] + #[serde(skip_serializing_if = "Option::is_none")] pub audience: Option>, - #[serde( - rename = "lastModified", - default, - skip_serializing_if = "Option::is_none" - )] + #[serde(skip_serializing_if = "Option::is_none")] pub last_modified: Option, - #[serde(default, skip_serializing_if = "Option::is_none")] + #[serde(skip_serializing_if = "Option::is_none")] pub priority: Option, /// Extension point for implementations #[serde(skip_serializing_if = "Option::is_none", rename = "_meta")] @@ -192,9 +187,8 @@ pub struct Annotations { /// The sender or recipient of messages and data in a conversation. #[derive(Debug, Clone, PartialEq, Eq, Deserialize, Serialize, JsonSchema)] +#[serde(rename_all = "camelCase")] pub enum Role { - #[serde(rename = "assistant")] Assistant, - #[serde(rename = "user")] User, } diff --git a/rust/plan.rs b/rust/plan.rs index f850e56..b8d2ee2 100644 --- a/rust/plan.rs +++ b/rust/plan.rs @@ -17,7 +17,6 @@ use serde::{Deserialize, Serialize}; /// See protocol docs: [Agent Plan](https://agentclientprotocol.com/protocol/agent-plan) #[derive(Debug, Clone, Serialize, Deserialize, JsonSchema, PartialEq, Eq)] #[serde(rename_all = "camelCase")] -#[schemars(inline)] pub struct Plan { /// The list of tasks to be accomplished. /// diff --git a/rust/rpc.rs b/rust/rpc.rs index eab1787..8d86589 100644 --- a/rust/rpc.rs +++ b/rust/rpc.rs @@ -27,11 +27,8 @@ use crate::{ #[schemars(inline)] pub enum RequestId { #[display("null")] - #[schemars(title = "null")] Null, - #[schemars(title = "number")] Number(i64), - #[schemars(title = "string")] Str(String), } diff --git a/rust/tool_call.rs b/rust/tool_call.rs index 5b480ca..7b8cc97 100644 --- a/rust/tool_call.rs +++ b/rust/tool_call.rs @@ -20,11 +20,9 @@ use crate::{ContentBlock, Error}; /// See protocol docs: [Tool Calls](https://agentclientprotocol.com/protocol/tool-calls) #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema)] #[serde(rename_all = "camelCase")] -#[schemars(inline)] pub struct ToolCall { /// Unique identifier for this tool call within the session. - #[serde(rename = "toolCallId")] - pub id: ToolCallId, + pub tool_call_id: ToolCallId, /// Human-readable title describing what the tool is doing. pub title: String, /// The category of tool being invoked. @@ -42,10 +40,10 @@ pub struct ToolCall { #[serde(default, skip_serializing_if = "Vec::is_empty")] pub locations: Vec, /// Raw input parameters sent to the tool. - #[serde(default, skip_serializing_if = "Option::is_none")] + #[serde(skip_serializing_if = "Option::is_none")] pub raw_input: Option, /// Raw output returned by the tool. - #[serde(default, skip_serializing_if = "Option::is_none")] + #[serde(skip_serializing_if = "Option::is_none")] pub raw_output: Option, /// Extension point for implementations #[serde(skip_serializing_if = "Option::is_none", rename = "_meta")] @@ -88,11 +86,9 @@ impl ToolCall { /// See protocol docs: [Updating](https://agentclientprotocol.com/protocol/tool-calls#updating) #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, JsonSchema)] #[serde(rename_all = "camelCase")] -#[schemars(inline)] pub struct ToolCallUpdate { /// The ID of the tool call being updated. - #[serde(rename = "toolCallId")] - pub id: ToolCallId, + pub tool_call_id: ToolCallId, /// Fields being updated. #[serde(flatten)] pub fields: ToolCallUpdateFields, @@ -111,25 +107,25 @@ pub struct ToolCallUpdate { #[serde(rename_all = "camelCase")] pub struct ToolCallUpdateFields { /// Update the tool kind. - #[serde(default, skip_serializing_if = "Option::is_none")] + #[serde(skip_serializing_if = "Option::is_none")] pub kind: Option, /// Update the execution status. - #[serde(default, skip_serializing_if = "Option::is_none")] + #[serde(skip_serializing_if = "Option::is_none")] pub status: Option, /// Update the human-readable title. - #[serde(default, skip_serializing_if = "Option::is_none")] + #[serde(skip_serializing_if = "Option::is_none")] pub title: Option, /// Replace the content collection. - #[serde(default, skip_serializing_if = "Option::is_none")] + #[serde(skip_serializing_if = "Option::is_none")] pub content: Option>, /// Replace the locations collection. - #[serde(default, skip_serializing_if = "Option::is_none")] + #[serde(skip_serializing_if = "Option::is_none")] pub locations: Option>, /// Update the raw input. - #[serde(default, skip_serializing_if = "Option::is_none")] + #[serde(skip_serializing_if = "Option::is_none")] pub raw_input: Option, /// Update the raw output. - #[serde(default, skip_serializing_if = "Option::is_none")] + #[serde(skip_serializing_if = "Option::is_none")] pub raw_output: Option, } @@ -140,7 +136,7 @@ impl TryFrom for ToolCall { fn try_from(update: ToolCallUpdate) -> Result { let ToolCallUpdate { - id, + tool_call_id, fields: ToolCallUpdateFields { kind, @@ -151,11 +147,11 @@ impl TryFrom for ToolCall { raw_input, raw_output, }, - meta: _, + meta, } = update; Ok(Self { - id, + tool_call_id, title: title.ok_or_else(|| { Error::invalid_params() .with_data(serde_json::json!("title is required for a tool call")) @@ -166,7 +162,7 @@ impl TryFrom for ToolCall { locations: locations.unwrap_or_default(), raw_input, raw_output, - meta: None, + meta, }) } } @@ -174,7 +170,7 @@ impl TryFrom for ToolCall { impl From for ToolCallUpdate { fn from(value: ToolCall) -> Self { let ToolCall { - id, + tool_call_id, title, kind, status, @@ -182,10 +178,10 @@ impl From for ToolCallUpdate { locations, raw_input, raw_output, - meta: _, + meta, } = value; Self { - id, + tool_call_id, fields: ToolCallUpdateFields { kind: Some(kind), status: Some(status), @@ -195,7 +191,7 @@ impl From for ToolCallUpdate { raw_input, raw_output, }, - meta: None, + meta, } } } diff --git a/schema/schema.json b/schema/schema.json index 98d0cf9..ab22d44 100644 --- a/schema/schema.json +++ b/schema/schema.json @@ -12,7 +12,11 @@ "type": "boolean" }, "mcpCapabilities": { - "$ref": "#/$defs/McpCapabilities", + "allOf": [ + { + "$ref": "#/$defs/McpCapabilities" + } + ], "default": { "http": false, "sse": false @@ -20,7 +24,11 @@ "description": "MCP capabilities supported by the agent." }, "promptCapabilities": { - "$ref": "#/$defs/PromptCapabilities", + "allOf": [ + { + "$ref": "#/$defs/PromptCapabilities" + } + ], "default": { "audio": false, "embeddedContext": false, @@ -34,13 +42,15 @@ "AgentNotification": { "anyOf": [ { - "$ref": "#/$defs/SessionNotification", - "description": "Handles session update notifications from the agent.\n\nThis is a notification endpoint (no response expected) that receives\nreal-time updates about session progress, including message chunks,\ntool calls, and execution plans.\n\nNote: Clients SHOULD continue accepting tool call updates even after\nsending a `session/cancel` notification, as the agent may send final\nupdates before responding with the cancelled stop reason.\n\nSee protocol docs: [Agent Reports Output](https://agentclientprotocol.com/protocol/prompt-turn#3-agent-reports-output)", - "title": "SessionNotification" + "allOf": [ + { + "$ref": "#/$defs/SessionNotification" + } + ], + "description": "Handles session update notifications from the agent.\n\nThis is a notification endpoint (no response expected) that receives\nreal-time updates about session progress, including message chunks,\ntool calls, and execution plans.\n\nNote: Clients SHOULD continue accepting tool call updates even after\nsending a `session/cancel` notification, as the agent may send final\nupdates before responding with the cancelled stop reason.\n\nSee protocol docs: [Agent Reports Output](https://agentclientprotocol.com/protocol/prompt-turn#3-agent-reports-output)" }, { - "description": "Handles extension notifications from the agent.\n\nAllows the Agent to send an arbitrary notification that is not part of the ACP spec.\nExtension notifications provide a way to send one-way messages for custom functionality\nwhile maintaining protocol compatibility.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", - "title": "ExtNotification" + "description": "Handles extension notifications from the agent.\n\nAllows the Agent to send an arbitrary notification that is not part of the ACP spec.\nExtension notifications provide a way to send one-way messages for custom functionality\nwhile maintaining protocol compatibility.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)" } ], "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.", @@ -53,16 +63,13 @@ "id": { "anyOf": [ { - "title": "null", "type": "null" }, { "format": "int64", - "title": "number", "type": "integer" }, { - "title": "string", "type": "string" } ], @@ -83,7 +90,6 @@ } }, "required": ["id", "method"], - "title": "Request", "type": "object" }, { @@ -111,16 +117,13 @@ "id": { "anyOf": [ { - "title": "null", "type": "null" }, { "format": "int64", - "title": "number", "type": "integer" }, { - "title": "string", "type": "string" } ], @@ -128,7 +131,6 @@ } }, "required": ["id"], - "title": "Response", "type": "object" }, { @@ -148,7 +150,6 @@ } }, "required": ["method"], - "title": "Notification", "type": "object" } ], @@ -166,48 +167,71 @@ "AgentRequest": { "anyOf": [ { - "$ref": "#/$defs/WriteTextFileRequest", - "description": "Writes content to a text file in the client's file system.\n\nOnly available if the client advertises the `fs.writeTextFile` capability.\nAllows the agent to create or modify files within the client's environment.\n\nSee protocol docs: [Client](https://agentclientprotocol.com/protocol/overview#client)", - "title": "WriteTextFileRequest" + "allOf": [ + { + "$ref": "#/$defs/WriteTextFileRequest" + } + ], + "description": "Writes content to a text file in the client's file system.\n\nOnly available if the client advertises the `fs.writeTextFile` capability.\nAllows the agent to create or modify files within the client's environment.\n\nSee protocol docs: [Client](https://agentclientprotocol.com/protocol/overview#client)" }, { - "$ref": "#/$defs/ReadTextFileRequest", - "description": "Reads content from a text file in the client's file system.\n\nOnly available if the client advertises the `fs.readTextFile` capability.\nAllows the agent to access file contents within the client's environment.\n\nSee protocol docs: [Client](https://agentclientprotocol.com/protocol/overview#client)", - "title": "ReadTextFileRequest" + "allOf": [ + { + "$ref": "#/$defs/ReadTextFileRequest" + } + ], + "description": "Reads content from a text file in the client's file system.\n\nOnly available if the client advertises the `fs.readTextFile` capability.\nAllows the agent to access file contents within the client's environment.\n\nSee protocol docs: [Client](https://agentclientprotocol.com/protocol/overview#client)" }, { - "$ref": "#/$defs/RequestPermissionRequest", - "description": "Requests permission from the user for a tool call operation.\n\nCalled by the agent when it needs user authorization before executing\na potentially sensitive operation. The client should present the options\nto the user and return their decision.\n\nIf the client cancels the prompt turn via `session/cancel`, it MUST\nrespond to this request with `RequestPermissionOutcome::Cancelled`.\n\nSee protocol docs: [Requesting Permission](https://agentclientprotocol.com/protocol/tool-calls#requesting-permission)", - "title": "RequestPermissionRequest" + "allOf": [ + { + "$ref": "#/$defs/RequestPermissionRequest" + } + ], + "description": "Requests permission from the user for a tool call operation.\n\nCalled by the agent when it needs user authorization before executing\na potentially sensitive operation. The client should present the options\nto the user and return their decision.\n\nIf the client cancels the prompt turn via `session/cancel`, it MUST\nrespond to this request with `RequestPermissionOutcome::Cancelled`.\n\nSee protocol docs: [Requesting Permission](https://agentclientprotocol.com/protocol/tool-calls#requesting-permission)" }, { - "$ref": "#/$defs/CreateTerminalRequest", - "description": "Executes a command in a new terminal\n\nOnly available if the `terminal` Client capability is set to `true`.\n\nReturns a `TerminalId` that can be used with other terminal methods\nto get the current output, wait for exit, and kill the command.\n\nThe `TerminalId` can also be used to embed the terminal in a tool call\nby using the `ToolCallContent::Terminal` variant.\n\nThe Agent is responsible for releasing the terminal by using the `terminal/release`\nmethod.\n\nSee protocol docs: [Terminals](https://agentclientprotocol.com/protocol/terminals)", - "title": "CreateTerminalRequest" + "allOf": [ + { + "$ref": "#/$defs/CreateTerminalRequest" + } + ], + "description": "Executes a command in a new terminal\n\nOnly available if the `terminal` Client capability is set to `true`.\n\nReturns a `TerminalId` that can be used with other terminal methods\nto get the current output, wait for exit, and kill the command.\n\nThe `TerminalId` can also be used to embed the terminal in a tool call\nby using the `ToolCallContent::Terminal` variant.\n\nThe Agent is responsible for releasing the terminal by using the `terminal/release`\nmethod.\n\nSee protocol docs: [Terminals](https://agentclientprotocol.com/protocol/terminals)" }, { - "$ref": "#/$defs/TerminalOutputRequest", - "description": "Gets the terminal output and exit status\n\nReturns the current content in the terminal without waiting for the command to exit.\nIf the command has already exited, the exit status is included.\n\nSee protocol docs: [Terminals](https://agentclientprotocol.com/protocol/terminals)", - "title": "TerminalOutputRequest" + "allOf": [ + { + "$ref": "#/$defs/TerminalOutputRequest" + } + ], + "description": "Gets the terminal output and exit status\n\nReturns the current content in the terminal without waiting for the command to exit.\nIf the command has already exited, the exit status is included.\n\nSee protocol docs: [Terminals](https://agentclientprotocol.com/protocol/terminals)" }, { - "$ref": "#/$defs/ReleaseTerminalRequest", - "description": "Releases a terminal\n\nThe command is killed if it hasn't exited yet. Use `terminal/wait_for_exit`\nto wait for the command to exit before releasing the terminal.\n\nAfter release, the `TerminalId` can no longer be used with other `terminal/*` methods,\nbut tool calls that already contain it, continue to display its output.\n\nThe `terminal/kill` method can be used to terminate the command without releasing\nthe terminal, allowing the Agent to call `terminal/output` and other methods.\n\nSee protocol docs: [Terminals](https://agentclientprotocol.com/protocol/terminals)", - "title": "ReleaseTerminalRequest" + "allOf": [ + { + "$ref": "#/$defs/ReleaseTerminalRequest" + } + ], + "description": "Releases a terminal\n\nThe command is killed if it hasn't exited yet. Use `terminal/wait_for_exit`\nto wait for the command to exit before releasing the terminal.\n\nAfter release, the `TerminalId` can no longer be used with other `terminal/*` methods,\nbut tool calls that already contain it, continue to display its output.\n\nThe `terminal/kill` method can be used to terminate the command without releasing\nthe terminal, allowing the Agent to call `terminal/output` and other methods.\n\nSee protocol docs: [Terminals](https://agentclientprotocol.com/protocol/terminals)" }, { - "$ref": "#/$defs/WaitForTerminalExitRequest", - "description": "Waits for the terminal command to exit and return its exit status\n\nSee protocol docs: [Terminals](https://agentclientprotocol.com/protocol/terminals)", - "title": "WaitForTerminalExitRequest" + "allOf": [ + { + "$ref": "#/$defs/WaitForTerminalExitRequest" + } + ], + "description": "Waits for the terminal command to exit and return its exit status\n\nSee protocol docs: [Terminals](https://agentclientprotocol.com/protocol/terminals)" }, { - "$ref": "#/$defs/KillTerminalCommandRequest", - "description": "Kills the terminal command without releasing the terminal\n\nWhile `terminal/release` will also kill the command, this method will keep\nthe `TerminalId` valid so it can be used with other methods.\n\nThis method can be helpful when implementing command timeouts which terminate\nthe command as soon as elapsed, and then get the final output so it can be sent\nto the model.\n\nNote: `terminal/release` when `TerminalId` is no longer needed.\n\nSee protocol docs: [Terminals](https://agentclientprotocol.com/protocol/terminals)", - "title": "KillTerminalCommandRequest" + "allOf": [ + { + "$ref": "#/$defs/KillTerminalCommandRequest" + } + ], + "description": "Kills the terminal command without releasing the terminal\n\nWhile `terminal/release` will also kill the command, this method will keep\nthe `TerminalId` valid so it can be used with other methods.\n\nThis method can be helpful when implementing command timeouts which terminate\nthe command as soon as elapsed, and then get the final output so it can be sent\nto the model.\n\nNote: `terminal/release` when `TerminalId` is no longer needed.\n\nSee protocol docs: [Terminals](https://agentclientprotocol.com/protocol/terminals)" }, { - "description": "Handles extension method requests from the agent.\n\nAllows the Agent to send an arbitrary request that is not part of the ACP spec.\nExtension methods provide a way to add custom functionality while maintaining\nprotocol compatibility.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", - "title": "ExtMethodRequest" + "description": "Handles extension method requests from the agent.\n\nAllows the Agent to send an arbitrary request that is not part of the ACP spec.\nExtension methods provide a way to add custom functionality while maintaining\nprotocol compatibility.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)" } ], "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.", @@ -216,32 +240,24 @@ "AgentResponse": { "anyOf": [ { - "$ref": "#/$defs/InitializeResponse", - "title": "InitializeResponse" + "$ref": "#/$defs/InitializeResponse" }, { - "$ref": "#/$defs/AuthenticateResponse", - "title": "AuthenticateResponse" + "$ref": "#/$defs/AuthenticateResponse" }, { - "$ref": "#/$defs/NewSessionResponse", - "title": "NewSessionResponse" + "$ref": "#/$defs/NewSessionResponse" }, { - "$ref": "#/$defs/LoadSessionResponse", - "title": "LoadSessionResponse" + "$ref": "#/$defs/LoadSessionResponse" }, { - "$ref": "#/$defs/SetSessionModeResponse", - "title": "SetSessionModeResponse" + "$ref": "#/$defs/SetSessionModeResponse" }, { - "$ref": "#/$defs/PromptResponse", - "title": "PromptResponse" + "$ref": "#/$defs/PromptResponse" }, - { - "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 @@ -268,6 +284,32 @@ }, "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": { @@ -279,7 +321,11 @@ "type": ["string", "null"] }, "id": { - "$ref": "#/$defs/AuthMethodId", + "allOf": [ + { + "$ref": "#/$defs/AuthMethodId" + } + ], "description": "Unique identifier for this authentication method." }, "name": { @@ -301,7 +347,11 @@ "description": "Extension point for implementations" }, "methodId": { - "$ref": "#/$defs/AuthMethodId", + "allOf": [ + { + "$ref": "#/$defs/AuthMethodId" + } + ], "description": "The ID of the authentication method to use.\nMust be one of the methods advertised in the initialize response." } }, @@ -361,12 +411,28 @@ } }, "required": ["hint"], - "title": "UnstructuredCommandInput", "type": "object" } ], "description": "The input specification for a command." }, + "AvailableCommandsUpdate": { + "description": "Available commands are ready or have changed", + "properties": { + "_meta": { + "description": "Extension point for implementations" + }, + "availableCommands": { + "description": "Commands the agent can execute", + "items": { + "$ref": "#/$defs/AvailableCommand" + }, + "type": "array" + } + }, + "required": ["availableCommands"], + "type": "object" + }, "BlobResourceContents": { "description": "Binary resource contents.", "properties": { @@ -393,7 +459,11 @@ "description": "Extension point for implementations" }, "sessionId": { - "$ref": "#/$defs/SessionId", + "allOf": [ + { + "$ref": "#/$defs/SessionId" + } + ], "description": "The ID of the session to cancel operations for." } }, @@ -409,7 +479,11 @@ "description": "Extension point for implementations" }, "fs": { - "$ref": "#/$defs/FileSystemCapability", + "allOf": [ + { + "$ref": "#/$defs/FileSystemCapability" + } + ], "default": { "readTextFile": false, "writeTextFile": false @@ -427,13 +501,15 @@ "ClientNotification": { "anyOf": [ { - "$ref": "#/$defs/CancelNotification", - "description": "Cancels ongoing operations for a session.\n\nThis is a notification sent by the client to cancel an ongoing prompt turn.\n\nUpon receiving this notification, the Agent SHOULD:\n- Stop all language model requests as soon as possible\n- Abort all tool call invocations in progress\n- Send any pending `session/update` notifications\n- Respond to the original `session/prompt` request with `StopReason::Cancelled`\n\nSee protocol docs: [Cancellation](https://agentclientprotocol.com/protocol/prompt-turn#cancellation)", - "title": "CancelNotification" + "allOf": [ + { + "$ref": "#/$defs/CancelNotification" + } + ], + "description": "Cancels ongoing operations for a session.\n\nThis is a notification sent by the client to cancel an ongoing prompt turn.\n\nUpon receiving this notification, the Agent SHOULD:\n- Stop all language model requests as soon as possible\n- Abort all tool call invocations in progress\n- Send any pending `session/update` notifications\n- Respond to the original `session/prompt` request with `StopReason::Cancelled`\n\nSee protocol docs: [Cancellation](https://agentclientprotocol.com/protocol/prompt-turn#cancellation)" }, { - "description": "Handles extension notifications from the client.\n\nExtension notifications provide a way to send one-way messages for custom functionality\nwhile maintaining protocol compatibility.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", - "title": "ExtNotification" + "description": "Handles extension notifications from the client.\n\nExtension notifications provide a way to send one-way messages for custom functionality\nwhile maintaining protocol compatibility.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)" } ], "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.", @@ -446,16 +522,13 @@ "id": { "anyOf": [ { - "title": "null", "type": "null" }, { "format": "int64", - "title": "number", "type": "integer" }, { - "title": "string", "type": "string" } ], @@ -476,7 +549,6 @@ } }, "required": ["id", "method"], - "title": "Request", "type": "object" }, { @@ -504,16 +576,13 @@ "id": { "anyOf": [ { - "title": "null", "type": "null" }, { "format": "int64", - "title": "number", "type": "integer" }, { - "title": "string", "type": "string" } ], @@ -521,7 +590,6 @@ } }, "required": ["id"], - "title": "Response", "type": "object" }, { @@ -541,7 +609,6 @@ } }, "required": ["method"], - "title": "Notification", "type": "object" } ], @@ -559,38 +626,55 @@ "ClientRequest": { "anyOf": [ { - "$ref": "#/$defs/InitializeRequest", - "description": "Establishes the connection with a client and negotiates protocol capabilities.\n\nThis method is called once at the beginning of the connection to:\n- Negotiate the protocol version to use\n- Exchange capability information between client and agent\n- Determine available authentication methods\n\nThe agent should respond with its supported protocol version and capabilities.\n\nSee protocol docs: [Initialization](https://agentclientprotocol.com/protocol/initialization)", - "title": "InitializeRequest" + "allOf": [ + { + "$ref": "#/$defs/InitializeRequest" + } + ], + "description": "Establishes the connection with a client and negotiates protocol capabilities.\n\nThis method is called once at the beginning of the connection to:\n- Negotiate the protocol version to use\n- Exchange capability information between client and agent\n- Determine available authentication methods\n\nThe agent should respond with its supported protocol version and capabilities.\n\nSee protocol docs: [Initialization](https://agentclientprotocol.com/protocol/initialization)" }, { - "$ref": "#/$defs/AuthenticateRequest", - "description": "Authenticates the client using the specified authentication method.\n\nCalled when the agent requires authentication before allowing session creation.\nThe client provides the authentication method ID that was advertised during initialization.\n\nAfter successful authentication, the client can proceed to create sessions with\n`new_session` without receiving an `auth_required` error.\n\nSee protocol docs: [Initialization](https://agentclientprotocol.com/protocol/initialization)", - "title": "AuthenticateRequest" + "allOf": [ + { + "$ref": "#/$defs/AuthenticateRequest" + } + ], + "description": "Authenticates the client using the specified authentication method.\n\nCalled when the agent requires authentication before allowing session creation.\nThe client provides the authentication method ID that was advertised during initialization.\n\nAfter successful authentication, the client can proceed to create sessions with\n`new_session` without receiving an `auth_required` error.\n\nSee protocol docs: [Initialization](https://agentclientprotocol.com/protocol/initialization)" }, { - "$ref": "#/$defs/NewSessionRequest", - "description": "Creates a new conversation session with the agent.\n\nSessions represent independent conversation contexts with their own history and state.\n\nThe agent should:\n- Create a new session context\n- Connect to any specified MCP servers\n- Return a unique session ID for future requests\n\nMay return an `auth_required` error if the agent requires authentication.\n\nSee protocol docs: [Session Setup](https://agentclientprotocol.com/protocol/session-setup)", - "title": "NewSessionRequest" + "allOf": [ + { + "$ref": "#/$defs/NewSessionRequest" + } + ], + "description": "Creates a new conversation session with the agent.\n\nSessions represent independent conversation contexts with their own history and state.\n\nThe agent should:\n- Create a new session context\n- Connect to any specified MCP servers\n- Return a unique session ID for future requests\n\nMay return an `auth_required` error if the agent requires authentication.\n\nSee protocol docs: [Session Setup](https://agentclientprotocol.com/protocol/session-setup)" }, { - "$ref": "#/$defs/LoadSessionRequest", - "description": "Loads an existing session to resume a previous conversation.\n\nThis method is only available if the agent advertises the `loadSession` capability.\n\nThe agent should:\n- Restore the session context and conversation history\n- Connect to the specified MCP servers\n- Stream the entire conversation history back to the client via notifications\n\nSee protocol docs: [Loading Sessions](https://agentclientprotocol.com/protocol/session-setup#loading-sessions)", - "title": "LoadSessionRequest" + "allOf": [ + { + "$ref": "#/$defs/LoadSessionRequest" + } + ], + "description": "Loads an existing session to resume a previous conversation.\n\nThis method is only available if the agent advertises the `loadSession` capability.\n\nThe agent should:\n- Restore the session context and conversation history\n- Connect to the specified MCP servers\n- Stream the entire conversation history back to the client via notifications\n\nSee protocol docs: [Loading Sessions](https://agentclientprotocol.com/protocol/session-setup#loading-sessions)" }, { - "$ref": "#/$defs/SetSessionModeRequest", - "description": "Sets the current mode for a session.\n\nAllows switching between different agent modes (e.g., \"ask\", \"architect\", \"code\")\nthat affect system prompts, tool availability, and permission behaviors.\n\nThe mode must be one of the modes advertised in `availableModes` during session\ncreation or loading. Agents may also change modes autonomously and notify the\nclient via `current_mode_update` notifications.\n\nThis method can be called at any time during a session, whether the Agent is\nidle or actively generating a response.\n\nSee protocol docs: [Session Modes](https://agentclientprotocol.com/protocol/session-modes)", - "title": "SetSessionModeRequest" + "allOf": [ + { + "$ref": "#/$defs/SetSessionModeRequest" + } + ], + "description": "Sets the current mode for a session.\n\nAllows switching between different agent modes (e.g., \"ask\", \"architect\", \"code\")\nthat affect system prompts, tool availability, and permission behaviors.\n\nThe mode must be one of the modes advertised in `availableModes` during session\ncreation or loading. Agents may also change modes autonomously and notify the\nclient via `current_mode_update` notifications.\n\nThis method can be called at any time during a session, whether the Agent is\nidle or actively generating a response.\n\nSee protocol docs: [Session Modes](https://agentclientprotocol.com/protocol/session-modes)" }, { - "$ref": "#/$defs/PromptRequest", - "description": "Processes a user prompt within a session.\n\nThis method handles the whole lifecycle of a prompt:\n- Receives user messages with optional context (files, images, etc.)\n- Processes the prompt using language models\n- Reports language model content and tool calls to the Clients\n- Requests permission to run tools\n- Executes any requested tool calls\n- Returns when the turn is complete with a stop reason\n\nSee protocol docs: [Prompt Turn](https://agentclientprotocol.com/protocol/prompt-turn)", - "title": "PromptRequest" + "allOf": [ + { + "$ref": "#/$defs/PromptRequest" + } + ], + "description": "Processes a user prompt within a session.\n\nThis method handles the whole lifecycle of a prompt:\n- Receives user messages with optional context (files, images, etc.)\n- Processes the prompt using language models\n- Reports language model content and tool calls to the Clients\n- Requests permission to run tools\n- Executes any requested tool calls\n- Returns when the turn is complete with a stop reason\n\nSee protocol docs: [Prompt Turn](https://agentclientprotocol.com/protocol/prompt-turn)" }, { - "description": "Handles extension method requests from the client.\n\nExtension methods provide a way to add custom functionality while maintaining\nprotocol compatibility.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", - "title": "ExtMethodRequest" + "description": "Handles extension method requests from the client.\n\nExtension methods provide a way to add custom functionality while maintaining\nprotocol compatibility.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)" } ], "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.", @@ -599,40 +683,30 @@ "ClientResponse": { "anyOf": [ { - "$ref": "#/$defs/WriteTextFileResponse", - "title": "WriteTextFileResponse" + "$ref": "#/$defs/WriteTextFileResponse" }, { - "$ref": "#/$defs/ReadTextFileResponse", - "title": "ReadTextFileResponse" + "$ref": "#/$defs/ReadTextFileResponse" }, { - "$ref": "#/$defs/RequestPermissionResponse", - "title": "RequestPermissionResponse" + "$ref": "#/$defs/RequestPermissionResponse" }, { - "$ref": "#/$defs/CreateTerminalResponse", - "title": "CreateTerminalResponse" + "$ref": "#/$defs/CreateTerminalResponse" }, { - "$ref": "#/$defs/TerminalOutputResponse", - "title": "TerminalOutputResponse" + "$ref": "#/$defs/TerminalOutputResponse" }, { - "$ref": "#/$defs/ReleaseTerminalResponse", - "title": "ReleaseTerminalResponse" + "$ref": "#/$defs/ReleaseTerminalResponse" }, { - "$ref": "#/$defs/WaitForTerminalExitResponse", - "title": "WaitForTerminalExitResponse" + "$ref": "#/$defs/WaitForTerminalExitResponse" }, { - "$ref": "#/$defs/KillTerminalCommandResponse", - "title": "KillTerminalResponse" + "$ref": "#/$defs/KillTerminalCommandResponse" }, - { - "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 @@ -644,167 +718,105 @@ }, "oneOf": [ { + "allOf": [ + { + "$ref": "#/$defs/TextContent" + } + ], "description": "Text content. May be plain text or formatted with Markdown.\n\nAll agents MUST support text content blocks in prompts.\nClients SHOULD render this text as Markdown.", "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"], + "required": ["type"], "type": "object" }, { + "allOf": [ + { + "$ref": "#/$defs/ImageContent" + } + ], "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"], + "required": ["type"], "type": "object" }, { + "allOf": [ + { + "$ref": "#/$defs/AudioContent" + } + ], "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"], + "required": ["type"], "type": "object" }, { + "allOf": [ + { + "$ref": "#/$defs/ResourceLink" + } + ], "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"], + "required": ["type"], "type": "object" }, { + "allOf": [ + { + "$ref": "#/$defs/EmbeddedResource" + } + ], "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"], + "required": ["type"], "type": "object" } ] }, + "ContentChunk": { + "description": "A streamed item of content", + "properties": { + "_meta": { + "description": "Extension point for implementations" + }, + "content": { + "allOf": [ + { + "$ref": "#/$defs/ContentBlock" + } + ], + "description": "A single item of content" + } + }, + "required": ["content"], + "type": "object" + }, "CreateTerminalRequest": { "description": "Request to create a new terminal and execute a command.", "properties": { @@ -840,7 +852,11 @@ "type": ["integer", "null"] }, "sessionId": { - "$ref": "#/$defs/SessionId", + "allOf": [ + { + "$ref": "#/$defs/SessionId" + } + ], "description": "The session ID for this request." } }, @@ -865,15 +881,54 @@ "x-method": "terminal/create", "x-side": "client" }, + "CurrentModeUpdate": { + "description": "The current mode of the session has changed\n\nSee protocol docs: [Session Modes](https://agentclientprotocol.com/protocol/session-modes)", + "properties": { + "_meta": { + "description": "Extension point for implementations" + }, + "currentModeId": { + "allOf": [ + { + "$ref": "#/$defs/SessionModeId" + } + ], + "description": "The ID of the current mode" + } + }, + "required": ["currentModeId"], + "type": "object" + }, + "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/TextResourceContents" }, { - "$ref": "#/$defs/BlobResourceContents", - "title": "BlobResourceContents" + "$ref": "#/$defs/BlobResourceContents" } ], "description": "Resource content that can be embedded in a message." @@ -952,18 +1007,47 @@ "required": ["name", "value"], "type": "object" }, - "Implementation": { - "description": "Describes the name and version of an MCP implementation, with an optional\ntitle for UI representation.", + "ImageContent": { + "description": "An image provided to or from an LLM.", "properties": { - "name": { - "description": "Intended for programmatic or logical use, but can be used as a display\nname fallback if title isn’t present.", - "type": "string" + "_meta": { + "description": "Extension point for implementations" }, - "title": { - "description": "Intended for UI and end-user contexts — optimized to be human-readable\nand easily understood.\n\nIf not provided, the name should be used for display.", - "type": ["string", "null"] + "annotations": { + "anyOf": [ + { + "$ref": "#/$defs/Annotations" + }, + { + "type": "null" + } + ] }, - "version": { + "data": { + "type": "string" + }, + "mimeType": { + "type": "string" + }, + "uri": { + "type": ["string", "null"] + } + }, + "required": ["data", "mimeType"], + "type": "object" + }, + "Implementation": { + "description": "Describes the name and version of an MCP implementation, with an optional\ntitle for UI representation.", + "properties": { + "name": { + "description": "Intended for programmatic or logical use, but can be used as a display\nname fallback if title isn’t present.", + "type": "string" + }, + "title": { + "description": "Intended for UI and end-user contexts — optimized to be human-readable\nand easily understood.\n\nIf not provided, the name should be used for display.", + "type": ["string", "null"] + }, + "version": { "description": "Version of the implementation. Can be displayed to the user or used\nfor debugging or metrics purposes.", "type": "string" } @@ -978,7 +1062,11 @@ "description": "Extension point for implementations" }, "clientCapabilities": { - "$ref": "#/$defs/ClientCapabilities", + "allOf": [ + { + "$ref": "#/$defs/ClientCapabilities" + } + ], "default": { "fs": { "readTextFile": false, @@ -1000,7 +1088,11 @@ "description": "Information about the Client name and version sent to the Agent.\n\nNote: in future versions of the protocol, this will be required." }, "protocolVersion": { - "$ref": "#/$defs/ProtocolVersion", + "allOf": [ + { + "$ref": "#/$defs/ProtocolVersion" + } + ], "description": "The latest protocol version supported by the client." } }, @@ -1016,7 +1108,11 @@ "description": "Extension point for implementations" }, "agentCapabilities": { - "$ref": "#/$defs/AgentCapabilities", + "allOf": [ + { + "$ref": "#/$defs/AgentCapabilities" + } + ], "default": { "loadSession": false, "mcpCapabilities": { @@ -1051,7 +1147,11 @@ "type": "array" }, "protocolVersion": { - "$ref": "#/$defs/ProtocolVersion", + "allOf": [ + { + "$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." } }, @@ -1067,7 +1167,11 @@ "description": "Extension point for implementations" }, "sessionId": { - "$ref": "#/$defs/SessionId", + "allOf": [ + { + "$ref": "#/$defs/SessionId" + } + ], "description": "The session ID for this request." }, "terminalId": { @@ -1109,7 +1213,11 @@ "type": "array" }, "sessionId": { - "$ref": "#/$defs/SessionId", + "allOf": [ + { + "$ref": "#/$defs/SessionId" + } + ], "description": "The ID of the session to load." } }, @@ -1240,7 +1348,6 @@ } }, "required": ["name", "command", "args", "env"], - "title": "stdio", "type": "object" } ], @@ -1290,7 +1397,11 @@ "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", + "allOf": [ + { + "$ref": "#/$defs/SessionId" + } + ], "description": "Unique identifier for the created session.\n\nUsed in all subsequent requests for this conversation." } }, @@ -1306,7 +1417,11 @@ "description": "Extension point for implementations" }, "kind": { - "$ref": "#/$defs/PermissionOptionKind", + "allOf": [ + { + "$ref": "#/$defs/PermissionOptionKind" + } + ], "description": "Hint about the nature of this permission option." }, "name": { @@ -1314,7 +1429,11 @@ "type": "string" }, "optionId": { - "$ref": "#/$defs/PermissionOptionId", + "allOf": [ + { + "$ref": "#/$defs/PermissionOptionId" + } + ], "description": "Unique identifier for this permission option." } }, @@ -1350,6 +1469,23 @@ } ] }, + "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": { @@ -1361,11 +1497,19 @@ "type": "string" }, "priority": { - "$ref": "#/$defs/PlanEntryPriority", + "allOf": [ + { + "$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", + "allOf": [ + { + "$ref": "#/$defs/PlanEntryStatus" + } + ], "description": "Current execution status of this task." } }, @@ -1450,7 +1594,11 @@ "type": "array" }, "sessionId": { - "$ref": "#/$defs/SessionId", + "allOf": [ + { + "$ref": "#/$defs/SessionId" + } + ], "description": "The ID of the session to send this user message to" } }, @@ -1466,7 +1614,11 @@ "description": "Extension point for implementations" }, "stopReason": { - "$ref": "#/$defs/StopReason", + "allOf": [ + { + "$ref": "#/$defs/StopReason" + } + ], "description": "Indicates why the agent stopped processing the turn." } }, @@ -1505,7 +1657,11 @@ "type": "string" }, "sessionId": { - "$ref": "#/$defs/SessionId", + "allOf": [ + { + "$ref": "#/$defs/SessionId" + } + ], "description": "The session ID for this request." } }, @@ -1536,7 +1692,11 @@ "description": "Extension point for implementations" }, "sessionId": { - "$ref": "#/$defs/SessionId", + "allOf": [ + { + "$ref": "#/$defs/SessionId" + } + ], "description": "The session ID for this request." }, "terminalId": { @@ -1581,7 +1741,11 @@ "description": "The user selected one of the provided options.", "properties": { "optionId": { - "$ref": "#/$defs/PermissionOptionId", + "allOf": [ + { + "$ref": "#/$defs/PermissionOptionId" + } + ], "description": "The ID of the option the user selected." }, "outcome": { @@ -1608,68 +1772,20 @@ "type": "array" }, "sessionId": { - "$ref": "#/$defs/SessionId", + "allOf": [ + { + "$ref": "#/$defs/SessionId" + } + ], "description": "The session ID for this request." }, "toolCall": { - "description": "Details about the tool call requiring permission.", - "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." + "allOf": [ + { + "$ref": "#/$defs/ToolCallUpdate" } - }, - "required": ["toolCallId"], - "type": "object" + ], + "description": "Details about the tool call requiring permission." } }, "required": ["sessionId", "toolCall", "options"], @@ -1684,7 +1800,11 @@ "description": "Extension point for implementations" }, "outcome": { - "$ref": "#/$defs/RequestPermissionOutcome", + "allOf": [ + { + "$ref": "#/$defs/RequestPermissionOutcome" + } + ], "description": "The user's decision on the permission request." } }, @@ -1693,6 +1813,45 @@ "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"], @@ -1739,7 +1898,11 @@ "type": "array" }, "currentModeId": { - "$ref": "#/$defs/SessionModeId", + "allOf": [ + { + "$ref": "#/$defs/SessionModeId" + } + ], "description": "The current mode the Agent is in." } }, @@ -1753,11 +1916,19 @@ "description": "Extension point for implementations" }, "sessionId": { - "$ref": "#/$defs/SessionId", + "allOf": [ + { + "$ref": "#/$defs/SessionId" + } + ], "description": "The ID of the session this update pertains to." }, "update": { - "$ref": "#/$defs/SessionUpdate", + "allOf": [ + { + "$ref": "#/$defs/SessionUpdate" + } + ], "description": "The actual update content." } }, @@ -1773,231 +1944,131 @@ }, "oneOf": [ { + "allOf": [ + { + "$ref": "#/$defs/ContentChunk" + } + ], "description": "A chunk of the user's message being streamed.", "properties": { - "_meta": { - "description": "Extension point for implementations" - }, - "content": { - "$ref": "#/$defs/ContentBlock", - "description": "A single item of content" - }, "sessionUpdate": { "const": "user_message_chunk", "type": "string" } }, - "required": ["sessionUpdate", "content"], + "required": ["sessionUpdate"], "type": "object" }, { + "allOf": [ + { + "$ref": "#/$defs/ContentChunk" + } + ], "description": "A chunk of the agent's response being streamed.", "properties": { - "_meta": { - "description": "Extension point for implementations" - }, - "content": { - "$ref": "#/$defs/ContentBlock", - "description": "A single item of content" - }, "sessionUpdate": { "const": "agent_message_chunk", "type": "string" } }, - "required": ["sessionUpdate", "content"], + "required": ["sessionUpdate"], "type": "object" }, { + "allOf": [ + { + "$ref": "#/$defs/ContentChunk" + } + ], "description": "A chunk of the agent's internal reasoning being streamed.", "properties": { - "_meta": { - "description": "Extension point for implementations" - }, - "content": { - "$ref": "#/$defs/ContentBlock", - "description": "A single item of content" - }, "sessionUpdate": { "const": "agent_thought_chunk", "type": "string" } }, - "required": ["sessionUpdate", "content"], + "required": ["sessionUpdate"], "type": "object" }, { + "allOf": [ + { + "$ref": "#/$defs/ToolCall" + } + ], "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"], + "required": ["sessionUpdate"], "type": "object" }, { + "allOf": [ + { + "$ref": "#/$defs/ToolCallUpdate" + } + ], "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"], + "required": ["sessionUpdate"], "type": "object" }, { + "allOf": [ + { + "$ref": "#/$defs/Plan" + } + ], "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"], + "required": ["sessionUpdate"], "type": "object" }, { + "allOf": [ + { + "$ref": "#/$defs/AvailableCommandsUpdate" + } + ], "description": "Available commands are ready or have changed", "properties": { - "_meta": { - "description": "Extension point for implementations" - }, - "availableCommands": { - "description": "Commands the agent can execute", - "items": { - "$ref": "#/$defs/AvailableCommand" - }, - "type": "array" - }, "sessionUpdate": { "const": "available_commands_update", "type": "string" } }, - "required": ["sessionUpdate", "availableCommands"], + "required": ["sessionUpdate"], "type": "object" }, { + "allOf": [ + { + "$ref": "#/$defs/CurrentModeUpdate" + } + ], "description": "The current mode of the session has changed\n\nSee protocol docs: [Session Modes](https://agentclientprotocol.com/protocol/session-modes)", "properties": { - "_meta": { - "description": "Extension point for implementations" - }, - "currentModeId": { - "$ref": "#/$defs/SessionModeId", - "description": "The ID of the current mode" - }, "sessionUpdate": { "const": "current_mode_update", "type": "string" } }, - "required": ["sessionUpdate", "currentModeId"], + "required": ["sessionUpdate"], "type": "object" } ] @@ -2009,11 +2080,19 @@ "description": "Extension point for implementations" }, "modeId": { - "$ref": "#/$defs/SessionModeId", + "allOf": [ + { + "$ref": "#/$defs/SessionModeId" + } + ], "description": "The ID of the mode to set." }, "sessionId": { - "$ref": "#/$defs/SessionId", + "allOf": [ + { + "$ref": "#/$defs/SessionId" + } + ], "description": "The ID of the session to set the mode for." } }, @@ -2025,7 +2104,7 @@ "SetSessionModeResponse": { "description": "Response to `session/set_mode` method.", "properties": { - "_meta": true + "_meta": {} }, "type": "object", "x-method": "session/set_mode", @@ -2087,7 +2166,11 @@ "description": "Extension point for implementations" }, "sessionId": { - "$ref": "#/$defs/SessionId", + "allOf": [ + { + "$ref": "#/$defs/SessionId" + } + ], "description": "The session ID for this request." }, "terminalId": { @@ -2131,6 +2214,29 @@ "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": { @@ -2150,6 +2256,64 @@ "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": { + "allOf": [ + { + "$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": { + "allOf": [ + { + "$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": { + "allOf": [ + { + "$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)", "discriminator": { @@ -2160,7 +2324,11 @@ "description": "Standard content block (text, images, resources).", "properties": { "content": { - "$ref": "#/$defs/ContentBlock", + "allOf": [ + { + "$ref": "#/$defs/ContentBlock" + } + ], "description": "The actual content block." }, "type": { @@ -2262,6 +2430,70 @@ } ] }, + "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": { + "allOf": [ + { + "$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": [ @@ -2324,7 +2556,11 @@ "description": "Extension point for implementations" }, "sessionId": { - "$ref": "#/$defs/SessionId", + "allOf": [ + { + "$ref": "#/$defs/SessionId" + } + ], "description": "The session ID for this request." }, "terminalId": { @@ -2373,7 +2609,11 @@ "type": "string" }, "sessionId": { - "$ref": "#/$defs/SessionId", + "allOf": [ + { + "$ref": "#/$defs/SessionId" + } + ], "description": "The session ID for this request." } }, @@ -2397,12 +2637,10 @@ "$schema": "https://json-schema.org/draft/2020-12/schema", "anyOf": [ { - "$ref": "#/$defs/AgentOutgoingMessage", - "title": "AgentOutgoingMessage" + "$ref": "#/$defs/AgentOutgoingMessage" }, { - "$ref": "#/$defs/ClientOutgoingMessage", - "title": "ClientOutgoingMessage" + "$ref": "#/$defs/ClientOutgoingMessage" } ] } diff --git a/unstable/docs/protocol/schema.mdx b/unstable/docs/protocol/schema.mdx index 89eb826..f8a0b7d 100644 --- a/unstable/docs/protocol/schema.mdx +++ b/unstable/docs/protocol/schema.mdx @@ -680,7 +680,11 @@ See protocol docs: [Requesting Permission](https://agentclientprotocol.com/proto > The session ID for this request. - +ToolCallUpdate} + required +> Details about the tool call requiring permission. @@ -1084,6 +1088,31 @@ Optional annotations for the client. The client can use annotations to inform ho +## AudioContent + +Audio provided to or from an LLM. + +**Type:** Object + +**Properties:** + + + Extension point for implementations + + + + Annotations + + | null + + } +> + + + ## AuthMethod Describes an available authentication method. @@ -1164,6 +1193,32 @@ All text that was typed after the command name is provided as input. +## AvailableCommandsUpdate + +Available commands are ready or have changed + +**Type:** Object + +**Properties:** + + + Extension point for implementations + + + + AvailableCommand + + [] + + } + required +> + Commands the agent can execute + + ## BlobResourceContents Binary resource contents. @@ -1379,6 +1434,74 @@ Requires the `embeddedContext` prompt capability when included in prompts. +## ContentChunk + +A streamed item of content + +**Type:** Object + +**Properties:** + + + Extension point for implementations + +ContentBlock} + required +> + A single item of content + + +## CurrentModeUpdate + +The current mode of the session has changed + +See protocol docs: [Session Modes](https://agentclientprotocol.com/protocol/session-modes) + +**Type:** Object + +**Properties:** + + + Extension point for implementations + +SessionModeId} + required +> + The ID of the current mode + + +## EmbeddedResource + +The contents of a resource, embedded into a prompt or tool call result. + +**Type:** Object + +**Properties:** + + + Extension point for implementations + + + + Annotations + + | null + + } +> +EmbeddedResourceResource} + required +> + ## EmbeddedResourceResource Resource content that can be embedded in a message. @@ -1504,6 +1627,32 @@ An HTTP header to set when making requests to the MCP server. The value to set for the HTTP header. +## ImageContent + +An image provided to or from an LLM. + +**Type:** Object + +**Properties:** + + + Extension point for implementations + + + + Annotations + + | null + + } +> + + + + ## Implementation Describes the name and version of an MCP implementation, with an optional @@ -1765,6 +1914,31 @@ Helps clients choose appropriate icons and UI treatment. Reject this operation and remember the choice. +## Plan + +An execution plan for accomplishing complex tasks. + +Plans consist of multiple entries representing individual tasks or goals. +Agents report plans to clients to provide visibility into their execution strategy. +Plans can evolve during execution as the agent discovers new requirements or completes tasks. + +See protocol docs: [Agent Plan](https://agentclientprotocol.com/protocol/agent-plan) + +**Type:** Object + +**Properties:** + + + Extension point for implementations + +PlanEntry[]} required> + The list of tasks to be accomplished. + +When updating a plan, the agent must send a complete list of all entries +with their current status. The client replaces the entire plan with each update. + + + ## PlanEntry A single entry in the execution plan. @@ -1937,6 +2111,35 @@ The user selected one of the provided options. +## ResourceLink + +A resource that the server is capable of reading, included in a prompt or tool call result. + +**Type:** Object + +**Properties:** + + + Extension point for implementations + + + + Annotations + + | null + + } +> + + + + + + + ## Role The sender or recipient of messages and data in a conversation. @@ -2389,6 +2592,30 @@ Exit status of a terminal command. The signal that terminated the process (may be null if exited normally). +## TextContent + +Text provided to or from an LLM. + +**Type:** Object + +**Properties:** + + + Extension point for implementations + + + + Annotations + + | null + + } +> + + ## TextResourceContents Text-based resource contents. @@ -2404,6 +2631,76 @@ Text-based resource contents. +## ToolCall + +Represents a tool call that the language model has requested. + +Tool calls are actions that the agent executes on behalf of the language model, +such as reading files, executing code, or fetching data from external sources. + +See protocol docs: [Tool Calls](https://agentclientprotocol.com/protocol/tool-calls) + +**Type:** Object + +**Properties:** + + + Extension point for implementations + + + + ToolCallContent + + [] + + } +> + Content produced by the tool call. + +ToolKind}> + The category of tool being invoked. Helps clients choose appropriate icons and + UI treatment. + + + + ToolCallLocation + + [] + + } +> + File locations affected by this tool call. Enables "follow-along" features in + clients. + + + Raw input parameters sent to the tool. + + + Raw output returned by the tool. + +ToolCallStatus} +> + Current execution status of the tool call. + + + Human-readable title describing what the tool is doing. + +ToolCallId} + required +> + Unique identifier for this tool call within the session. + + ## ToolCallContent Content produced by a tool call. @@ -2526,6 +2823,71 @@ See protocol docs: [Status](https://agentclientprotocol.com/protocol/tool-calls# The tool call failed with an error. +## ToolCallUpdate + +An update to an existing tool call. + +Used to report progress and results as tools execute. All fields except +the tool call ID are optional - only changed fields need to be included. + +See protocol docs: [Updating](https://agentclientprotocol.com/protocol/tool-calls#updating) + +**Type:** Object + +**Properties:** + + + Extension point for implementations + + + Replace the content collection. + + + + ToolKind + + | null + + } +> + Update the tool kind. + + + Replace the locations collection. + + + Update the raw input. + + + Update the raw output. + + + + ToolCallStatus + + | null + + } +> + Update the execution status. + + + Update the human-readable title. + +ToolCallId} + required +> + The ID of the tool call being updated. + + ## ToolKind Categories of tools that can be invoked. diff --git a/unstable/schema/schema.json b/unstable/schema/schema.json index b265430..4042a00 100644 --- a/unstable/schema/schema.json +++ b/unstable/schema/schema.json @@ -12,7 +12,11 @@ "type": "boolean" }, "mcpCapabilities": { - "$ref": "#/$defs/McpCapabilities", + "allOf": [ + { + "$ref": "#/$defs/McpCapabilities" + } + ], "default": { "http": false, "sse": false @@ -20,7 +24,11 @@ "description": "MCP capabilities supported by the agent." }, "promptCapabilities": { - "$ref": "#/$defs/PromptCapabilities", + "allOf": [ + { + "$ref": "#/$defs/PromptCapabilities" + } + ], "default": { "audio": false, "embeddedContext": false, @@ -34,13 +42,15 @@ "AgentNotification": { "anyOf": [ { - "$ref": "#/$defs/SessionNotification", - "description": "Handles session update notifications from the agent.\n\nThis is a notification endpoint (no response expected) that receives\nreal-time updates about session progress, including message chunks,\ntool calls, and execution plans.\n\nNote: Clients SHOULD continue accepting tool call updates even after\nsending a `session/cancel` notification, as the agent may send final\nupdates before responding with the cancelled stop reason.\n\nSee protocol docs: [Agent Reports Output](https://agentclientprotocol.com/protocol/prompt-turn#3-agent-reports-output)", - "title": "SessionNotification" + "allOf": [ + { + "$ref": "#/$defs/SessionNotification" + } + ], + "description": "Handles session update notifications from the agent.\n\nThis is a notification endpoint (no response expected) that receives\nreal-time updates about session progress, including message chunks,\ntool calls, and execution plans.\n\nNote: Clients SHOULD continue accepting tool call updates even after\nsending a `session/cancel` notification, as the agent may send final\nupdates before responding with the cancelled stop reason.\n\nSee protocol docs: [Agent Reports Output](https://agentclientprotocol.com/protocol/prompt-turn#3-agent-reports-output)" }, { - "description": "Handles extension notifications from the agent.\n\nAllows the Agent to send an arbitrary notification that is not part of the ACP spec.\nExtension notifications provide a way to send one-way messages for custom functionality\nwhile maintaining protocol compatibility.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", - "title": "ExtNotification" + "description": "Handles extension notifications from the agent.\n\nAllows the Agent to send an arbitrary notification that is not part of the ACP spec.\nExtension notifications provide a way to send one-way messages for custom functionality\nwhile maintaining protocol compatibility.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)" } ], "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.", @@ -53,16 +63,13 @@ "id": { "anyOf": [ { - "title": "null", "type": "null" }, { "format": "int64", - "title": "number", "type": "integer" }, { - "title": "string", "type": "string" } ], @@ -83,7 +90,6 @@ } }, "required": ["id", "method"], - "title": "Request", "type": "object" }, { @@ -111,16 +117,13 @@ "id": { "anyOf": [ { - "title": "null", "type": "null" }, { "format": "int64", - "title": "number", "type": "integer" }, { - "title": "string", "type": "string" } ], @@ -128,7 +131,6 @@ } }, "required": ["id"], - "title": "Response", "type": "object" }, { @@ -148,7 +150,6 @@ } }, "required": ["method"], - "title": "Notification", "type": "object" } ], @@ -166,48 +167,71 @@ "AgentRequest": { "anyOf": [ { - "$ref": "#/$defs/WriteTextFileRequest", - "description": "Writes content to a text file in the client's file system.\n\nOnly available if the client advertises the `fs.writeTextFile` capability.\nAllows the agent to create or modify files within the client's environment.\n\nSee protocol docs: [Client](https://agentclientprotocol.com/protocol/overview#client)", - "title": "WriteTextFileRequest" + "allOf": [ + { + "$ref": "#/$defs/WriteTextFileRequest" + } + ], + "description": "Writes content to a text file in the client's file system.\n\nOnly available if the client advertises the `fs.writeTextFile` capability.\nAllows the agent to create or modify files within the client's environment.\n\nSee protocol docs: [Client](https://agentclientprotocol.com/protocol/overview#client)" }, { - "$ref": "#/$defs/ReadTextFileRequest", - "description": "Reads content from a text file in the client's file system.\n\nOnly available if the client advertises the `fs.readTextFile` capability.\nAllows the agent to access file contents within the client's environment.\n\nSee protocol docs: [Client](https://agentclientprotocol.com/protocol/overview#client)", - "title": "ReadTextFileRequest" + "allOf": [ + { + "$ref": "#/$defs/ReadTextFileRequest" + } + ], + "description": "Reads content from a text file in the client's file system.\n\nOnly available if the client advertises the `fs.readTextFile` capability.\nAllows the agent to access file contents within the client's environment.\n\nSee protocol docs: [Client](https://agentclientprotocol.com/protocol/overview#client)" }, { - "$ref": "#/$defs/RequestPermissionRequest", - "description": "Requests permission from the user for a tool call operation.\n\nCalled by the agent when it needs user authorization before executing\na potentially sensitive operation. The client should present the options\nto the user and return their decision.\n\nIf the client cancels the prompt turn via `session/cancel`, it MUST\nrespond to this request with `RequestPermissionOutcome::Cancelled`.\n\nSee protocol docs: [Requesting Permission](https://agentclientprotocol.com/protocol/tool-calls#requesting-permission)", - "title": "RequestPermissionRequest" + "allOf": [ + { + "$ref": "#/$defs/RequestPermissionRequest" + } + ], + "description": "Requests permission from the user for a tool call operation.\n\nCalled by the agent when it needs user authorization before executing\na potentially sensitive operation. The client should present the options\nto the user and return their decision.\n\nIf the client cancels the prompt turn via `session/cancel`, it MUST\nrespond to this request with `RequestPermissionOutcome::Cancelled`.\n\nSee protocol docs: [Requesting Permission](https://agentclientprotocol.com/protocol/tool-calls#requesting-permission)" }, { - "$ref": "#/$defs/CreateTerminalRequest", - "description": "Executes a command in a new terminal\n\nOnly available if the `terminal` Client capability is set to `true`.\n\nReturns a `TerminalId` that can be used with other terminal methods\nto get the current output, wait for exit, and kill the command.\n\nThe `TerminalId` can also be used to embed the terminal in a tool call\nby using the `ToolCallContent::Terminal` variant.\n\nThe Agent is responsible for releasing the terminal by using the `terminal/release`\nmethod.\n\nSee protocol docs: [Terminals](https://agentclientprotocol.com/protocol/terminals)", - "title": "CreateTerminalRequest" + "allOf": [ + { + "$ref": "#/$defs/CreateTerminalRequest" + } + ], + "description": "Executes a command in a new terminal\n\nOnly available if the `terminal` Client capability is set to `true`.\n\nReturns a `TerminalId` that can be used with other terminal methods\nto get the current output, wait for exit, and kill the command.\n\nThe `TerminalId` can also be used to embed the terminal in a tool call\nby using the `ToolCallContent::Terminal` variant.\n\nThe Agent is responsible for releasing the terminal by using the `terminal/release`\nmethod.\n\nSee protocol docs: [Terminals](https://agentclientprotocol.com/protocol/terminals)" }, { - "$ref": "#/$defs/TerminalOutputRequest", - "description": "Gets the terminal output and exit status\n\nReturns the current content in the terminal without waiting for the command to exit.\nIf the command has already exited, the exit status is included.\n\nSee protocol docs: [Terminals](https://agentclientprotocol.com/protocol/terminals)", - "title": "TerminalOutputRequest" + "allOf": [ + { + "$ref": "#/$defs/TerminalOutputRequest" + } + ], + "description": "Gets the terminal output and exit status\n\nReturns the current content in the terminal without waiting for the command to exit.\nIf the command has already exited, the exit status is included.\n\nSee protocol docs: [Terminals](https://agentclientprotocol.com/protocol/terminals)" }, { - "$ref": "#/$defs/ReleaseTerminalRequest", - "description": "Releases a terminal\n\nThe command is killed if it hasn't exited yet. Use `terminal/wait_for_exit`\nto wait for the command to exit before releasing the terminal.\n\nAfter release, the `TerminalId` can no longer be used with other `terminal/*` methods,\nbut tool calls that already contain it, continue to display its output.\n\nThe `terminal/kill` method can be used to terminate the command without releasing\nthe terminal, allowing the Agent to call `terminal/output` and other methods.\n\nSee protocol docs: [Terminals](https://agentclientprotocol.com/protocol/terminals)", - "title": "ReleaseTerminalRequest" + "allOf": [ + { + "$ref": "#/$defs/ReleaseTerminalRequest" + } + ], + "description": "Releases a terminal\n\nThe command is killed if it hasn't exited yet. Use `terminal/wait_for_exit`\nto wait for the command to exit before releasing the terminal.\n\nAfter release, the `TerminalId` can no longer be used with other `terminal/*` methods,\nbut tool calls that already contain it, continue to display its output.\n\nThe `terminal/kill` method can be used to terminate the command without releasing\nthe terminal, allowing the Agent to call `terminal/output` and other methods.\n\nSee protocol docs: [Terminals](https://agentclientprotocol.com/protocol/terminals)" }, { - "$ref": "#/$defs/WaitForTerminalExitRequest", - "description": "Waits for the terminal command to exit and return its exit status\n\nSee protocol docs: [Terminals](https://agentclientprotocol.com/protocol/terminals)", - "title": "WaitForTerminalExitRequest" + "allOf": [ + { + "$ref": "#/$defs/WaitForTerminalExitRequest" + } + ], + "description": "Waits for the terminal command to exit and return its exit status\n\nSee protocol docs: [Terminals](https://agentclientprotocol.com/protocol/terminals)" }, { - "$ref": "#/$defs/KillTerminalCommandRequest", - "description": "Kills the terminal command without releasing the terminal\n\nWhile `terminal/release` will also kill the command, this method will keep\nthe `TerminalId` valid so it can be used with other methods.\n\nThis method can be helpful when implementing command timeouts which terminate\nthe command as soon as elapsed, and then get the final output so it can be sent\nto the model.\n\nNote: `terminal/release` when `TerminalId` is no longer needed.\n\nSee protocol docs: [Terminals](https://agentclientprotocol.com/protocol/terminals)", - "title": "KillTerminalCommandRequest" + "allOf": [ + { + "$ref": "#/$defs/KillTerminalCommandRequest" + } + ], + "description": "Kills the terminal command without releasing the terminal\n\nWhile `terminal/release` will also kill the command, this method will keep\nthe `TerminalId` valid so it can be used with other methods.\n\nThis method can be helpful when implementing command timeouts which terminate\nthe command as soon as elapsed, and then get the final output so it can be sent\nto the model.\n\nNote: `terminal/release` when `TerminalId` is no longer needed.\n\nSee protocol docs: [Terminals](https://agentclientprotocol.com/protocol/terminals)" }, { - "description": "Handles extension method requests from the agent.\n\nAllows the Agent to send an arbitrary request that is not part of the ACP spec.\nExtension methods provide a way to add custom functionality while maintaining\nprotocol compatibility.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", - "title": "ExtMethodRequest" + "description": "Handles extension method requests from the agent.\n\nAllows the Agent to send an arbitrary request that is not part of the ACP spec.\nExtension methods provide a way to add custom functionality while maintaining\nprotocol compatibility.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)" } ], "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.", @@ -216,36 +240,27 @@ "AgentResponse": { "anyOf": [ { - "$ref": "#/$defs/InitializeResponse", - "title": "InitializeResponse" + "$ref": "#/$defs/InitializeResponse" }, { - "$ref": "#/$defs/AuthenticateResponse", - "title": "AuthenticateResponse" + "$ref": "#/$defs/AuthenticateResponse" }, { - "$ref": "#/$defs/NewSessionResponse", - "title": "NewSessionResponse" + "$ref": "#/$defs/NewSessionResponse" }, { - "$ref": "#/$defs/LoadSessionResponse", - "title": "LoadSessionResponse" + "$ref": "#/$defs/LoadSessionResponse" }, { - "$ref": "#/$defs/SetSessionModeResponse", - "title": "SetSessionModeResponse" + "$ref": "#/$defs/SetSessionModeResponse" }, { - "$ref": "#/$defs/PromptResponse", - "title": "PromptResponse" + "$ref": "#/$defs/PromptResponse" }, { - "$ref": "#/$defs/SetSessionModelResponse", - "title": "SetSessionModelResponse" + "$ref": "#/$defs/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 @@ -272,6 +287,32 @@ }, "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": { @@ -283,7 +324,11 @@ "type": ["string", "null"] }, "id": { - "$ref": "#/$defs/AuthMethodId", + "allOf": [ + { + "$ref": "#/$defs/AuthMethodId" + } + ], "description": "Unique identifier for this authentication method." }, "name": { @@ -305,7 +350,11 @@ "description": "Extension point for implementations" }, "methodId": { - "$ref": "#/$defs/AuthMethodId", + "allOf": [ + { + "$ref": "#/$defs/AuthMethodId" + } + ], "description": "The ID of the authentication method to use.\nMust be one of the methods advertised in the initialize response." } }, @@ -365,12 +414,28 @@ } }, "required": ["hint"], - "title": "UnstructuredCommandInput", "type": "object" } ], "description": "The input specification for a command." }, + "AvailableCommandsUpdate": { + "description": "Available commands are ready or have changed", + "properties": { + "_meta": { + "description": "Extension point for implementations" + }, + "availableCommands": { + "description": "Commands the agent can execute", + "items": { + "$ref": "#/$defs/AvailableCommand" + }, + "type": "array" + } + }, + "required": ["availableCommands"], + "type": "object" + }, "BlobResourceContents": { "description": "Binary resource contents.", "properties": { @@ -397,7 +462,11 @@ "description": "Extension point for implementations" }, "sessionId": { - "$ref": "#/$defs/SessionId", + "allOf": [ + { + "$ref": "#/$defs/SessionId" + } + ], "description": "The ID of the session to cancel operations for." } }, @@ -413,7 +482,11 @@ "description": "Extension point for implementations" }, "fs": { - "$ref": "#/$defs/FileSystemCapability", + "allOf": [ + { + "$ref": "#/$defs/FileSystemCapability" + } + ], "default": { "readTextFile": false, "writeTextFile": false @@ -431,13 +504,15 @@ "ClientNotification": { "anyOf": [ { - "$ref": "#/$defs/CancelNotification", - "description": "Cancels ongoing operations for a session.\n\nThis is a notification sent by the client to cancel an ongoing prompt turn.\n\nUpon receiving this notification, the Agent SHOULD:\n- Stop all language model requests as soon as possible\n- Abort all tool call invocations in progress\n- Send any pending `session/update` notifications\n- Respond to the original `session/prompt` request with `StopReason::Cancelled`\n\nSee protocol docs: [Cancellation](https://agentclientprotocol.com/protocol/prompt-turn#cancellation)", - "title": "CancelNotification" + "allOf": [ + { + "$ref": "#/$defs/CancelNotification" + } + ], + "description": "Cancels ongoing operations for a session.\n\nThis is a notification sent by the client to cancel an ongoing prompt turn.\n\nUpon receiving this notification, the Agent SHOULD:\n- Stop all language model requests as soon as possible\n- Abort all tool call invocations in progress\n- Send any pending `session/update` notifications\n- Respond to the original `session/prompt` request with `StopReason::Cancelled`\n\nSee protocol docs: [Cancellation](https://agentclientprotocol.com/protocol/prompt-turn#cancellation)" }, { - "description": "Handles extension notifications from the client.\n\nExtension notifications provide a way to send one-way messages for custom functionality\nwhile maintaining protocol compatibility.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", - "title": "ExtNotification" + "description": "Handles extension notifications from the client.\n\nExtension notifications provide a way to send one-way messages for custom functionality\nwhile maintaining protocol compatibility.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)" } ], "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.", @@ -450,16 +525,13 @@ "id": { "anyOf": [ { - "title": "null", "type": "null" }, { "format": "int64", - "title": "number", "type": "integer" }, { - "title": "string", "type": "string" } ], @@ -480,7 +552,6 @@ } }, "required": ["id", "method"], - "title": "Request", "type": "object" }, { @@ -508,16 +579,13 @@ "id": { "anyOf": [ { - "title": "null", "type": "null" }, { "format": "int64", - "title": "number", "type": "integer" }, { - "title": "string", "type": "string" } ], @@ -525,7 +593,6 @@ } }, "required": ["id"], - "title": "Response", "type": "object" }, { @@ -545,7 +612,6 @@ } }, "required": ["method"], - "title": "Notification", "type": "object" } ], @@ -563,43 +629,63 @@ "ClientRequest": { "anyOf": [ { - "$ref": "#/$defs/InitializeRequest", - "description": "Establishes the connection with a client and negotiates protocol capabilities.\n\nThis method is called once at the beginning of the connection to:\n- Negotiate the protocol version to use\n- Exchange capability information between client and agent\n- Determine available authentication methods\n\nThe agent should respond with its supported protocol version and capabilities.\n\nSee protocol docs: [Initialization](https://agentclientprotocol.com/protocol/initialization)", - "title": "InitializeRequest" + "allOf": [ + { + "$ref": "#/$defs/InitializeRequest" + } + ], + "description": "Establishes the connection with a client and negotiates protocol capabilities.\n\nThis method is called once at the beginning of the connection to:\n- Negotiate the protocol version to use\n- Exchange capability information between client and agent\n- Determine available authentication methods\n\nThe agent should respond with its supported protocol version and capabilities.\n\nSee protocol docs: [Initialization](https://agentclientprotocol.com/protocol/initialization)" }, { - "$ref": "#/$defs/AuthenticateRequest", - "description": "Authenticates the client using the specified authentication method.\n\nCalled when the agent requires authentication before allowing session creation.\nThe client provides the authentication method ID that was advertised during initialization.\n\nAfter successful authentication, the client can proceed to create sessions with\n`new_session` without receiving an `auth_required` error.\n\nSee protocol docs: [Initialization](https://agentclientprotocol.com/protocol/initialization)", - "title": "AuthenticateRequest" + "allOf": [ + { + "$ref": "#/$defs/AuthenticateRequest" + } + ], + "description": "Authenticates the client using the specified authentication method.\n\nCalled when the agent requires authentication before allowing session creation.\nThe client provides the authentication method ID that was advertised during initialization.\n\nAfter successful authentication, the client can proceed to create sessions with\n`new_session` without receiving an `auth_required` error.\n\nSee protocol docs: [Initialization](https://agentclientprotocol.com/protocol/initialization)" }, { - "$ref": "#/$defs/NewSessionRequest", - "description": "Creates a new conversation session with the agent.\n\nSessions represent independent conversation contexts with their own history and state.\n\nThe agent should:\n- Create a new session context\n- Connect to any specified MCP servers\n- Return a unique session ID for future requests\n\nMay return an `auth_required` error if the agent requires authentication.\n\nSee protocol docs: [Session Setup](https://agentclientprotocol.com/protocol/session-setup)", - "title": "NewSessionRequest" + "allOf": [ + { + "$ref": "#/$defs/NewSessionRequest" + } + ], + "description": "Creates a new conversation session with the agent.\n\nSessions represent independent conversation contexts with their own history and state.\n\nThe agent should:\n- Create a new session context\n- Connect to any specified MCP servers\n- Return a unique session ID for future requests\n\nMay return an `auth_required` error if the agent requires authentication.\n\nSee protocol docs: [Session Setup](https://agentclientprotocol.com/protocol/session-setup)" }, { - "$ref": "#/$defs/LoadSessionRequest", - "description": "Loads an existing session to resume a previous conversation.\n\nThis method is only available if the agent advertises the `loadSession` capability.\n\nThe agent should:\n- Restore the session context and conversation history\n- Connect to the specified MCP servers\n- Stream the entire conversation history back to the client via notifications\n\nSee protocol docs: [Loading Sessions](https://agentclientprotocol.com/protocol/session-setup#loading-sessions)", - "title": "LoadSessionRequest" + "allOf": [ + { + "$ref": "#/$defs/LoadSessionRequest" + } + ], + "description": "Loads an existing session to resume a previous conversation.\n\nThis method is only available if the agent advertises the `loadSession` capability.\n\nThe agent should:\n- Restore the session context and conversation history\n- Connect to the specified MCP servers\n- Stream the entire conversation history back to the client via notifications\n\nSee protocol docs: [Loading Sessions](https://agentclientprotocol.com/protocol/session-setup#loading-sessions)" }, { - "$ref": "#/$defs/SetSessionModeRequest", - "description": "Sets the current mode for a session.\n\nAllows switching between different agent modes (e.g., \"ask\", \"architect\", \"code\")\nthat affect system prompts, tool availability, and permission behaviors.\n\nThe mode must be one of the modes advertised in `availableModes` during session\ncreation or loading. Agents may also change modes autonomously and notify the\nclient via `current_mode_update` notifications.\n\nThis method can be called at any time during a session, whether the Agent is\nidle or actively generating a response.\n\nSee protocol docs: [Session Modes](https://agentclientprotocol.com/protocol/session-modes)", - "title": "SetSessionModeRequest" + "allOf": [ + { + "$ref": "#/$defs/SetSessionModeRequest" + } + ], + "description": "Sets the current mode for a session.\n\nAllows switching between different agent modes (e.g., \"ask\", \"architect\", \"code\")\nthat affect system prompts, tool availability, and permission behaviors.\n\nThe mode must be one of the modes advertised in `availableModes` during session\ncreation or loading. Agents may also change modes autonomously and notify the\nclient via `current_mode_update` notifications.\n\nThis method can be called at any time during a session, whether the Agent is\nidle or actively generating a response.\n\nSee protocol docs: [Session Modes](https://agentclientprotocol.com/protocol/session-modes)" }, { - "$ref": "#/$defs/PromptRequest", - "description": "Processes a user prompt within a session.\n\nThis method handles the whole lifecycle of a prompt:\n- Receives user messages with optional context (files, images, etc.)\n- Processes the prompt using language models\n- Reports language model content and tool calls to the Clients\n- Requests permission to run tools\n- Executes any requested tool calls\n- Returns when the turn is complete with a stop reason\n\nSee protocol docs: [Prompt Turn](https://agentclientprotocol.com/protocol/prompt-turn)", - "title": "PromptRequest" + "allOf": [ + { + "$ref": "#/$defs/PromptRequest" + } + ], + "description": "Processes a user prompt within a session.\n\nThis method handles the whole lifecycle of a prompt:\n- Receives user messages with optional context (files, images, etc.)\n- Processes the prompt using language models\n- Reports language model content and tool calls to the Clients\n- Requests permission to run tools\n- Executes any requested tool calls\n- Returns when the turn is complete with a stop reason\n\nSee protocol docs: [Prompt Turn](https://agentclientprotocol.com/protocol/prompt-turn)" }, { - "$ref": "#/$defs/SetSessionModelRequest", - "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nSelect a model for a given session.", - "title": "SetSessionModelRequest" + "allOf": [ + { + "$ref": "#/$defs/SetSessionModelRequest" + } + ], + "description": "**UNSTABLE**\n\nThis capability is not part of the spec yet, and may be removed or changed at any point.\n\nSelect a model for a given session." }, { - "description": "Handles extension method requests from the client.\n\nExtension methods provide a way to add custom functionality while maintaining\nprotocol compatibility.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)", - "title": "ExtMethodRequest" + "description": "Handles extension method requests from the client.\n\nExtension methods provide a way to add custom functionality while maintaining\nprotocol compatibility.\n\nSee protocol docs: [Extensibility](https://agentclientprotocol.com/protocol/extensibility)" } ], "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.", @@ -608,40 +694,30 @@ "ClientResponse": { "anyOf": [ { - "$ref": "#/$defs/WriteTextFileResponse", - "title": "WriteTextFileResponse" + "$ref": "#/$defs/WriteTextFileResponse" }, { - "$ref": "#/$defs/ReadTextFileResponse", - "title": "ReadTextFileResponse" + "$ref": "#/$defs/ReadTextFileResponse" }, { - "$ref": "#/$defs/RequestPermissionResponse", - "title": "RequestPermissionResponse" + "$ref": "#/$defs/RequestPermissionResponse" }, { - "$ref": "#/$defs/CreateTerminalResponse", - "title": "CreateTerminalResponse" + "$ref": "#/$defs/CreateTerminalResponse" }, { - "$ref": "#/$defs/TerminalOutputResponse", - "title": "TerminalOutputResponse" + "$ref": "#/$defs/TerminalOutputResponse" }, { - "$ref": "#/$defs/ReleaseTerminalResponse", - "title": "ReleaseTerminalResponse" + "$ref": "#/$defs/ReleaseTerminalResponse" }, { - "$ref": "#/$defs/WaitForTerminalExitResponse", - "title": "WaitForTerminalExitResponse" + "$ref": "#/$defs/WaitForTerminalExitResponse" }, { - "$ref": "#/$defs/KillTerminalCommandResponse", - "title": "KillTerminalResponse" + "$ref": "#/$defs/KillTerminalCommandResponse" }, - { - "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 @@ -653,167 +729,105 @@ }, "oneOf": [ { + "allOf": [ + { + "$ref": "#/$defs/TextContent" + } + ], "description": "Text content. May be plain text or formatted with Markdown.\n\nAll agents MUST support text content blocks in prompts.\nClients SHOULD render this text as Markdown.", "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"], + "required": ["type"], "type": "object" }, { + "allOf": [ + { + "$ref": "#/$defs/ImageContent" + } + ], "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"], + "required": ["type"], "type": "object" }, { + "allOf": [ + { + "$ref": "#/$defs/AudioContent" + } + ], "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"], + "required": ["type"], "type": "object" }, { + "allOf": [ + { + "$ref": "#/$defs/ResourceLink" + } + ], "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"], + "required": ["type"], "type": "object" }, { + "allOf": [ + { + "$ref": "#/$defs/EmbeddedResource" + } + ], "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"], + "required": ["type"], "type": "object" } ] }, + "ContentChunk": { + "description": "A streamed item of content", + "properties": { + "_meta": { + "description": "Extension point for implementations" + }, + "content": { + "allOf": [ + { + "$ref": "#/$defs/ContentBlock" + } + ], + "description": "A single item of content" + } + }, + "required": ["content"], + "type": "object" + }, "CreateTerminalRequest": { "description": "Request to create a new terminal and execute a command.", "properties": { @@ -849,7 +863,11 @@ "type": ["integer", "null"] }, "sessionId": { - "$ref": "#/$defs/SessionId", + "allOf": [ + { + "$ref": "#/$defs/SessionId" + } + ], "description": "The session ID for this request." } }, @@ -874,15 +892,54 @@ "x-method": "terminal/create", "x-side": "client" }, + "CurrentModeUpdate": { + "description": "The current mode of the session has changed\n\nSee protocol docs: [Session Modes](https://agentclientprotocol.com/protocol/session-modes)", + "properties": { + "_meta": { + "description": "Extension point for implementations" + }, + "currentModeId": { + "allOf": [ + { + "$ref": "#/$defs/SessionModeId" + } + ], + "description": "The ID of the current mode" + } + }, + "required": ["currentModeId"], + "type": "object" + }, + "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/TextResourceContents" }, { - "$ref": "#/$defs/BlobResourceContents", - "title": "BlobResourceContents" + "$ref": "#/$defs/BlobResourceContents" } ], "description": "Resource content that can be embedded in a message." @@ -961,20 +1018,49 @@ "required": ["name", "value"], "type": "object" }, - "Implementation": { - "description": "Describes the name and version of an MCP implementation, with an optional\ntitle for UI representation.", + "ImageContent": { + "description": "An image provided to or from an LLM.", "properties": { - "name": { - "description": "Intended for programmatic or logical use, but can be used as a display\nname fallback if title isn’t present.", - "type": "string" - }, - "title": { - "description": "Intended for UI and end-user contexts — optimized to be human-readable\nand easily understood.\n\nIf not provided, the name should be used for display.", - "type": ["string", "null"] + "_meta": { + "description": "Extension point for implementations" }, - "version": { - "description": "Version of the implementation. Can be displayed to the user or used\nfor debugging or metrics purposes.", - "type": "string" + "annotations": { + "anyOf": [ + { + "$ref": "#/$defs/Annotations" + }, + { + "type": "null" + } + ] + }, + "data": { + "type": "string" + }, + "mimeType": { + "type": "string" + }, + "uri": { + "type": ["string", "null"] + } + }, + "required": ["data", "mimeType"], + "type": "object" + }, + "Implementation": { + "description": "Describes the name and version of an MCP implementation, with an optional\ntitle for UI representation.", + "properties": { + "name": { + "description": "Intended for programmatic or logical use, but can be used as a display\nname fallback if title isn’t present.", + "type": "string" + }, + "title": { + "description": "Intended for UI and end-user contexts — optimized to be human-readable\nand easily understood.\n\nIf not provided, the name should be used for display.", + "type": ["string", "null"] + }, + "version": { + "description": "Version of the implementation. Can be displayed to the user or used\nfor debugging or metrics purposes.", + "type": "string" } }, "required": ["name", "version"], @@ -987,7 +1073,11 @@ "description": "Extension point for implementations" }, "clientCapabilities": { - "$ref": "#/$defs/ClientCapabilities", + "allOf": [ + { + "$ref": "#/$defs/ClientCapabilities" + } + ], "default": { "fs": { "readTextFile": false, @@ -1009,7 +1099,11 @@ "description": "Information about the Client name and version sent to the Agent.\n\nNote: in future versions of the protocol, this will be required." }, "protocolVersion": { - "$ref": "#/$defs/ProtocolVersion", + "allOf": [ + { + "$ref": "#/$defs/ProtocolVersion" + } + ], "description": "The latest protocol version supported by the client." } }, @@ -1025,7 +1119,11 @@ "description": "Extension point for implementations" }, "agentCapabilities": { - "$ref": "#/$defs/AgentCapabilities", + "allOf": [ + { + "$ref": "#/$defs/AgentCapabilities" + } + ], "default": { "loadSession": false, "mcpCapabilities": { @@ -1060,7 +1158,11 @@ "type": "array" }, "protocolVersion": { - "$ref": "#/$defs/ProtocolVersion", + "allOf": [ + { + "$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." } }, @@ -1076,7 +1178,11 @@ "description": "Extension point for implementations" }, "sessionId": { - "$ref": "#/$defs/SessionId", + "allOf": [ + { + "$ref": "#/$defs/SessionId" + } + ], "description": "The session ID for this request." }, "terminalId": { @@ -1118,7 +1224,11 @@ "type": "array" }, "sessionId": { - "$ref": "#/$defs/SessionId", + "allOf": [ + { + "$ref": "#/$defs/SessionId" + } + ], "description": "The ID of the session to load." } }, @@ -1260,7 +1370,6 @@ } }, "required": ["name", "command", "args", "env"], - "title": "stdio", "type": "object" } ], @@ -1284,7 +1393,11 @@ "type": ["string", "null"] }, "modelId": { - "$ref": "#/$defs/ModelId", + "allOf": [ + { + "$ref": "#/$defs/ModelId" + } + ], "description": "Unique identifier for the model." }, "name": { @@ -1347,7 +1460,11 @@ "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", + "allOf": [ + { + "$ref": "#/$defs/SessionId" + } + ], "description": "Unique identifier for the created session.\n\nUsed in all subsequent requests for this conversation." } }, @@ -1363,7 +1480,11 @@ "description": "Extension point for implementations" }, "kind": { - "$ref": "#/$defs/PermissionOptionKind", + "allOf": [ + { + "$ref": "#/$defs/PermissionOptionKind" + } + ], "description": "Hint about the nature of this permission option." }, "name": { @@ -1371,7 +1492,11 @@ "type": "string" }, "optionId": { - "$ref": "#/$defs/PermissionOptionId", + "allOf": [ + { + "$ref": "#/$defs/PermissionOptionId" + } + ], "description": "Unique identifier for this permission option." } }, @@ -1407,6 +1532,23 @@ } ] }, + "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": { @@ -1418,11 +1560,19 @@ "type": "string" }, "priority": { - "$ref": "#/$defs/PlanEntryPriority", + "allOf": [ + { + "$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", + "allOf": [ + { + "$ref": "#/$defs/PlanEntryStatus" + } + ], "description": "Current execution status of this task." } }, @@ -1507,7 +1657,11 @@ "type": "array" }, "sessionId": { - "$ref": "#/$defs/SessionId", + "allOf": [ + { + "$ref": "#/$defs/SessionId" + } + ], "description": "The ID of the session to send this user message to" } }, @@ -1523,7 +1677,11 @@ "description": "Extension point for implementations" }, "stopReason": { - "$ref": "#/$defs/StopReason", + "allOf": [ + { + "$ref": "#/$defs/StopReason" + } + ], "description": "Indicates why the agent stopped processing the turn." } }, @@ -1562,7 +1720,11 @@ "type": "string" }, "sessionId": { - "$ref": "#/$defs/SessionId", + "allOf": [ + { + "$ref": "#/$defs/SessionId" + } + ], "description": "The session ID for this request." } }, @@ -1593,7 +1755,11 @@ "description": "Extension point for implementations" }, "sessionId": { - "$ref": "#/$defs/SessionId", + "allOf": [ + { + "$ref": "#/$defs/SessionId" + } + ], "description": "The session ID for this request." }, "terminalId": { @@ -1638,7 +1804,11 @@ "description": "The user selected one of the provided options.", "properties": { "optionId": { - "$ref": "#/$defs/PermissionOptionId", + "allOf": [ + { + "$ref": "#/$defs/PermissionOptionId" + } + ], "description": "The ID of the option the user selected." }, "outcome": { @@ -1665,68 +1835,20 @@ "type": "array" }, "sessionId": { - "$ref": "#/$defs/SessionId", + "allOf": [ + { + "$ref": "#/$defs/SessionId" + } + ], "description": "The session ID for this request." }, "toolCall": { - "description": "Details about the tool call requiring permission.", - "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." + "allOf": [ + { + "$ref": "#/$defs/ToolCallUpdate" } - }, - "required": ["toolCallId"], - "type": "object" + ], + "description": "Details about the tool call requiring permission." } }, "required": ["sessionId", "toolCall", "options"], @@ -1741,7 +1863,11 @@ "description": "Extension point for implementations" }, "outcome": { - "$ref": "#/$defs/RequestPermissionOutcome", + "allOf": [ + { + "$ref": "#/$defs/RequestPermissionOutcome" + } + ], "description": "The user's decision on the permission request." } }, @@ -1750,6 +1876,45 @@ "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"], @@ -1796,7 +1961,11 @@ "type": "array" }, "currentModeId": { - "$ref": "#/$defs/SessionModeId", + "allOf": [ + { + "$ref": "#/$defs/SessionModeId" + } + ], "description": "The current mode the Agent is in." } }, @@ -1817,7 +1986,11 @@ "type": "array" }, "currentModelId": { - "$ref": "#/$defs/ModelId", + "allOf": [ + { + "$ref": "#/$defs/ModelId" + } + ], "description": "The current model the Agent is in." } }, @@ -1831,11 +2004,19 @@ "description": "Extension point for implementations" }, "sessionId": { - "$ref": "#/$defs/SessionId", + "allOf": [ + { + "$ref": "#/$defs/SessionId" + } + ], "description": "The ID of the session this update pertains to." }, "update": { - "$ref": "#/$defs/SessionUpdate", + "allOf": [ + { + "$ref": "#/$defs/SessionUpdate" + } + ], "description": "The actual update content." } }, @@ -1851,231 +2032,131 @@ }, "oneOf": [ { + "allOf": [ + { + "$ref": "#/$defs/ContentChunk" + } + ], "description": "A chunk of the user's message being streamed.", "properties": { - "_meta": { - "description": "Extension point for implementations" - }, - "content": { - "$ref": "#/$defs/ContentBlock", - "description": "A single item of content" - }, "sessionUpdate": { "const": "user_message_chunk", "type": "string" } }, - "required": ["sessionUpdate", "content"], + "required": ["sessionUpdate"], "type": "object" }, { + "allOf": [ + { + "$ref": "#/$defs/ContentChunk" + } + ], "description": "A chunk of the agent's response being streamed.", "properties": { - "_meta": { - "description": "Extension point for implementations" - }, - "content": { - "$ref": "#/$defs/ContentBlock", - "description": "A single item of content" - }, "sessionUpdate": { "const": "agent_message_chunk", "type": "string" } }, - "required": ["sessionUpdate", "content"], + "required": ["sessionUpdate"], "type": "object" }, { + "allOf": [ + { + "$ref": "#/$defs/ContentChunk" + } + ], "description": "A chunk of the agent's internal reasoning being streamed.", "properties": { - "_meta": { - "description": "Extension point for implementations" - }, - "content": { - "$ref": "#/$defs/ContentBlock", - "description": "A single item of content" - }, "sessionUpdate": { "const": "agent_thought_chunk", "type": "string" } }, - "required": ["sessionUpdate", "content"], + "required": ["sessionUpdate"], "type": "object" }, { + "allOf": [ + { + "$ref": "#/$defs/ToolCall" + } + ], "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"], + "required": ["sessionUpdate"], "type": "object" }, { + "allOf": [ + { + "$ref": "#/$defs/ToolCallUpdate" + } + ], "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"], + "required": ["sessionUpdate"], "type": "object" }, { + "allOf": [ + { + "$ref": "#/$defs/Plan" + } + ], "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"], + "required": ["sessionUpdate"], "type": "object" }, { + "allOf": [ + { + "$ref": "#/$defs/AvailableCommandsUpdate" + } + ], "description": "Available commands are ready or have changed", "properties": { - "_meta": { - "description": "Extension point for implementations" - }, - "availableCommands": { - "description": "Commands the agent can execute", - "items": { - "$ref": "#/$defs/AvailableCommand" - }, - "type": "array" - }, "sessionUpdate": { "const": "available_commands_update", "type": "string" } }, - "required": ["sessionUpdate", "availableCommands"], + "required": ["sessionUpdate"], "type": "object" }, { + "allOf": [ + { + "$ref": "#/$defs/CurrentModeUpdate" + } + ], "description": "The current mode of the session has changed\n\nSee protocol docs: [Session Modes](https://agentclientprotocol.com/protocol/session-modes)", "properties": { - "_meta": { - "description": "Extension point for implementations" - }, - "currentModeId": { - "$ref": "#/$defs/SessionModeId", - "description": "The ID of the current mode" - }, "sessionUpdate": { "const": "current_mode_update", "type": "string" } }, - "required": ["sessionUpdate", "currentModeId"], + "required": ["sessionUpdate"], "type": "object" } ] @@ -2087,11 +2168,19 @@ "description": "Extension point for implementations" }, "modeId": { - "$ref": "#/$defs/SessionModeId", + "allOf": [ + { + "$ref": "#/$defs/SessionModeId" + } + ], "description": "The ID of the mode to set." }, "sessionId": { - "$ref": "#/$defs/SessionId", + "allOf": [ + { + "$ref": "#/$defs/SessionId" + } + ], "description": "The ID of the session to set the mode for." } }, @@ -2103,7 +2192,7 @@ "SetSessionModeResponse": { "description": "Response to `session/set_mode` method.", "properties": { - "_meta": true + "_meta": {} }, "type": "object", "x-method": "session/set_mode", @@ -2116,11 +2205,19 @@ "description": "Extension point for implementations" }, "modelId": { - "$ref": "#/$defs/ModelId", + "allOf": [ + { + "$ref": "#/$defs/ModelId" + } + ], "description": "The ID of the model to set." }, "sessionId": { - "$ref": "#/$defs/SessionId", + "allOf": [ + { + "$ref": "#/$defs/SessionId" + } + ], "description": "The ID of the session to set the model for." } }, @@ -2196,7 +2293,11 @@ "description": "Extension point for implementations" }, "sessionId": { - "$ref": "#/$defs/SessionId", + "allOf": [ + { + "$ref": "#/$defs/SessionId" + } + ], "description": "The session ID for this request." }, "terminalId": { @@ -2240,6 +2341,29 @@ "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": { @@ -2259,6 +2383,64 @@ "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": { + "allOf": [ + { + "$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": { + "allOf": [ + { + "$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": { + "allOf": [ + { + "$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)", "discriminator": { @@ -2269,7 +2451,11 @@ "description": "Standard content block (text, images, resources).", "properties": { "content": { - "$ref": "#/$defs/ContentBlock", + "allOf": [ + { + "$ref": "#/$defs/ContentBlock" + } + ], "description": "The actual content block." }, "type": { @@ -2371,6 +2557,70 @@ } ] }, + "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": { + "allOf": [ + { + "$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": [ @@ -2433,7 +2683,11 @@ "description": "Extension point for implementations" }, "sessionId": { - "$ref": "#/$defs/SessionId", + "allOf": [ + { + "$ref": "#/$defs/SessionId" + } + ], "description": "The session ID for this request." }, "terminalId": { @@ -2482,7 +2736,11 @@ "type": "string" }, "sessionId": { - "$ref": "#/$defs/SessionId", + "allOf": [ + { + "$ref": "#/$defs/SessionId" + } + ], "description": "The session ID for this request." } }, @@ -2506,12 +2764,10 @@ "$schema": "https://json-schema.org/draft/2020-12/schema", "anyOf": [ { - "$ref": "#/$defs/AgentOutgoingMessage", - "title": "AgentOutgoingMessage" + "$ref": "#/$defs/AgentOutgoingMessage" }, { - "$ref": "#/$defs/ClientOutgoingMessage", - "title": "ClientOutgoingMessage" + "$ref": "#/$defs/ClientOutgoingMessage" } ] }