Available on crate feature
unstable_protocol_v2 only.Expand description
Agent Client Protocol version 2 draft types.
EXPERIMENTAL. This module is gated behind the unstable_protocol_v2
feature, is not part of the unstable umbrella, and is not
advertised by crate::ProtocolVersion::LATEST. The wire format is
currently identical to v1 (the default crate-root types) and the types
here exist only as a place to evolve v2 without disturbing the stable v1
API. The wire format intentionally diverges from v1 as draft v2 RFDs land.
Both the type definitions and the conversion helpers may change at any
time.
Modules§
- conversion
- Explicit conversion helpers for experimenting with ACP v2 while SDKs still speak v1.
Structs§
- Agent
Auth Capabilities - Authentication-related capabilities supported by the agent.
- Agent
Capabilities - Capabilities supported by the agent.
- Agent
Method Names - Names of all methods that agents handle.
- Annotations
- Optional annotations for the client. The client can use annotations to inform how objects are used or displayed
- Audio
Content - Audio provided to or from an LLM.
- Auth
Capabilities - UNSTABLE
- Auth
EnvVar - UNSTABLE
- Auth
Method Agent - Agent handles authentication itself.
- Auth
Method EnvVar - UNSTABLE
- Auth
Method Id - Auth
Method Terminal - UNSTABLE
- Authenticate
Request - Request parameters for the authenticate method.
- Authenticate
Response - Response to the
authenticatemethod. - Available
Command - Information about a command.
- Available
Commands Update - Available commands are ready or have changed
- Blob
Resource Contents - Binary resource contents.
- Boolean
Property Schema - Schema for boolean properties in an elicitation form.
- Cancel
Notification - Notification to cancel ongoing operations for a session.
- Client
Capabilities - Capabilities supported by the client.
- Client
Method Names - Names of all methods that clients handle.
- Close
Session Request - Request parameters for closing an active session.
- Close
Session Response - Response from closing a session.
- Complete
Elicitation Notification - UNSTABLE
- Config
Option Update - Session configuration options have been updated.
- Connect
McpRequest - UNSTABLE
- Connect
McpResponse - UNSTABLE
- Content
- Standard content block (text, images, resources).
- Content
Chunk - A streamed item of content
- Cost
- Cost information for a session.
- Create
Elicitation Request - UNSTABLE
- Create
Elicitation Response - UNSTABLE
- Delete
Session Request - Request parameters for deleting an existing session from
session/list. - Delete
Session Response - Response from deleting a session.
- Diff
- A diff representing file modifications.
- Disconnect
McpRequest - UNSTABLE
- Disconnect
McpResponse - UNSTABLE
- Elicitation
Accept Action - UNSTABLE
- Elicitation
Capabilities - UNSTABLE
- Elicitation
Form Capabilities - UNSTABLE
- Elicitation
Form Mode - UNSTABLE
- Elicitation
Id - UNSTABLE
- Elicitation
Request Scope - UNSTABLE
- Elicitation
Schema - Type-safe elicitation schema for requesting structured user input.
- Elicitation
Session Scope - UNSTABLE
- Elicitation
UrlCapabilities - UNSTABLE
- Elicitation
UrlMode - UNSTABLE
- Embedded
Resource - The contents of a resource, embedded into a prompt or tool call result.
- Enum
Option - A titled enum option with a const value and human-readable title.
- EnvVariable
- An environment variable to set when launching an MCP server.
- Error
- JSON-RPC error object.
- ExtNotification
- Allows the Agent to send an arbitrary notification that is not part of the ACP spec. Extension notifications provide a way to send one-way messages for custom functionality while maintaining protocol compatibility.
- ExtRequest
- Allows for sending an arbitrary request that is not part of the ACP spec. Extension methods provide a way to add custom functionality while maintaining protocol compatibility.
- ExtResponse
- Allows for sending an arbitrary response to an
ExtRequestthat is not part of the ACP spec. Extension methods provide a way to add custom functionality while maintaining protocol compatibility. - Fork
Session Request - UNSTABLE
- Fork
Session Response - UNSTABLE
- Http
Header - An HTTP header to set when making requests to the MCP server.
- Image
Content - An image provided to or from an LLM.
- Implementation
- Metadata about the implementation of the client or agent. Describes the name and version of an MCP implementation, with an optional title for UI representation.
- Initialize
Request - Request parameters for the initialize method.
- Initialize
Response - Response to the
initializemethod. - Integer
Property Schema - Schema for integer properties in an elicitation form.
- Json
RpcBatch - A non-empty JSON-RPC 2.0 batch message.
- Json
RpcMessage - A message (request, response, or notification) with
"jsonrpc": "2.0"specified as required by JSON-RPC 2.0 Specification. - List
Sessions Request - Request parameters for listing existing sessions.
- List
Sessions Response - Response from listing sessions.
- Load
Session Request - Request parameters for loading an existing session.
- Load
Session Response - Response from loading an existing session.
- Logout
Capabilities - Logout capabilities supported by the agent.
- Logout
Request - Request parameters for the logout method.
- Logout
Response - Response to the
logoutmethod. - McpAcp
Capabilities - UNSTABLE
- McpCapabilities
- MCP capabilities supported by the agent
- McpConnection
Id - UNSTABLE
- McpHttp
Capabilities - Capabilities for HTTP MCP server transports.
- McpServer
Acp - UNSTABLE
- McpServer
AcpId unstable_mcp_over_acp - UNSTABLE
- McpServer
Http - HTTP transport configuration for MCP.
- McpServer
Stdio - Stdio transport configuration for MCP.
- McpStdio
Capabilities - Capabilities for stdio MCP server transports.
- Message
Id - Unique identifier for a message within a session.
- Message
McpNotification - UNSTABLE
- Message
McpRequest - UNSTABLE
- Message
McpResponse - UNSTABLE
- Multi
Select Property Schema - Schema for multi-select (array) properties in an elicitation form.
- NewSession
Request - Request parameters for creating a new session.
- NewSession
Response - Response from creating a new session.
- Notification
- Number
Property Schema - Schema for number (floating-point) properties in an elicitation form.
- Other
Auth Method - Custom or future authentication method payload.
- Other
Available Command Input - Custom or future command input specification.
- Other
Content Block - Custom or future content block payload.
- Other
McpServer - Custom or future MCP server transport payload.
- Other
Plan Update Content - Custom or future plan update content payload.
- Other
Session Config Kind - Custom or future session configuration option payload.
- Other
Session Update - Custom or future session update payload.
- Other
Tool Call Content - Custom or future tool call content payload.
- Permission
Option - An option presented to the user when requesting permission.
- Permission
Option Id - Unique identifier for a permission option.
- Plan
Entry - A single entry in the execution plan.
- PlanId
- Unique identifier for a plan within a session.
- Plan
Items - A plan represented as structured entries.
- Plan
Update - A content update for a plan identified by ID.
- Prompt
Audio Capabilities - Capabilities for audio content in prompt requests.
- Prompt
Capabilities - Prompt capabilities supported by the agent in
session/promptrequests. - Prompt
Embedded Context Capabilities - Capabilities for embedded context in prompt requests.
- Prompt
Image Capabilities - Capabilities for image content in prompt requests.
- Prompt
Request - Request parameters for sending a user prompt to the agent.
- Prompt
Response - Response from processing a user prompt.
- RawValue
- Reference to a range of bytes encompassing a single valid JSON value in the input data.
- Request
- Request
Permission Request - Request for user permission to execute a tool call.
- Request
Permission Response - Response to a permission request.
- Resource
Link - A resource that the server is capable of reading, included in a prompt or tool call result.
- Resume
Session Request - Request parameters for resuming an existing session.
- Resume
Session Response - Response from resuming an existing session.
- Selected
Permission Outcome - The user selected one of the provided options.
- Session
Additional Directories Capabilities - Capabilities for additional session directories support.
- Session
Capabilities - Session capabilities supported by the agent.
- Session
Close Capabilities - Capabilities for the
session/closemethod. - Session
Config Boolean unstable_boolean_config - UNSTABLE
- Session
Config Group Id - Unique identifier for a session configuration option value group.
- Session
Config Id - Unique identifier for a session configuration option.
- Session
Config Option - A session configuration option selector and its current state.
- Session
Config Select - A single-value selector (dropdown) session configuration option payload.
- Session
Config Select Group - A group of possible values for a session configuration option.
- Session
Config Select Option - A possible value for a session configuration option.
- Session
Config Value Id - Unique identifier for a session configuration option value.
- Session
Delete Capabilities - Capabilities for the
session/deletemethod. - Session
Fork Capabilities - UNSTABLE
- Session
Id - A unique identifier for a conversation session between a client and agent.
- Session
Info - Information about a session returned by session/list
- Session
Info Update - Update to session metadata. All fields are optional to support partial updates.
- Session
List Capabilities - Capabilities for the
session/listmethod. - Session
Load Capabilities - Capabilities for the
session/loadmethod. - Session
Notification - Notification containing a session update from the agent.
- Session
Resume Capabilities - Capabilities for the
session/resumemethod. - SetSession
Config Option Request - Request parameters for setting a session configuration option.
- SetSession
Config Option Response - Response to
session/set_config_optionmethod. - String
Property Schema - Schema for string properties in an elicitation form.
- Terminal
Auth Capabilities - UNSTABLE
- Text
Content - Text provided to or from an LLM.
- Text
Resource Contents - Text-based resource contents.
- Titled
Multi Select Items - Items definition for titled multi-select enum properties.
- Tool
Call - Represents a tool call that the language model has requested.
- Tool
Call Id - Unique identifier for a tool call within a session.
- Tool
Call Location - A file location being accessed or modified by a tool.
- Tool
Call Update - An update to an existing tool call.
- Tool
Call Update Fields - Optional fields that can be updated in a tool call.
- Unstructured
Command Input - All text that was typed after the command name is provided as input.
- Untitled
Multi Select Items - Items definition for untitled multi-select enum properties.
- UrlElicitation
Required Data - UNSTABLE
- UrlElicitation
Required Item - UNSTABLE
- Usage
- UNSTABLE
- Usage
Update - Context window and cost update for a session.
Enums§
- Agent
Notification - All possible notifications that an agent can send to a client.
- Agent
Request - All possible requests that an agent can send to a client.
- Agent
Response - All possible responses that an agent can send to a client.
- Auth
Method - Describes an available authentication method.
- Available
Command Input - The input specification for a command.
- Client
Notification - All possible notifications that a client can send to an agent.
- Client
Request - All possible requests that a client can send to an agent.
- Client
Response - All possible responses that a client can send to an agent.
- Content
Block - Content blocks represent displayable information in the Agent Client Protocol.
- Elicitation
Action - UNSTABLE
- Elicitation
Content Value - Elicitation
Mode - UNSTABLE
- Elicitation
Property Schema - Property schema for elicitation form fields.
- Elicitation
Schema Type - Type discriminator for elicitation schemas.
- Elicitation
Scope - UNSTABLE
- Elicitation
String Type - Items definition for untitled multi-select enum properties.
- Elicitation
UrlOnly Mode - Type discriminator for URL-only elicitation error items.
- Embedded
Resource Resource - Resource content that can be embedded in a message.
- Error
Code - Predefined error codes for common JSON-RPC and ACP-specific errors.
- McpServer
- Configuration for connecting to an MCP (Model Context Protocol) server.
- Multi
Select Items - Items for a multi-select (array) property schema.
- Permission
Option Kind - The type of permission option being presented to the user.
- Plan
Entry Priority - Priority levels for plan entries.
- Plan
Entry Status - Status of a plan entry in the execution flow.
- Plan
Update Content - Updated content for a plan.
- Request
Id - JSON RPC Request Id
- Request
Permission Outcome - The outcome of a permission request.
- Role
- The sender or recipient of messages and data in a conversation.
- Session
Config Kind - Type-specific session configuration option payload.
- Session
Config Option Category - Semantic category for a session configuration option.
- Session
Config Option Value unstable_boolean_config - UNSTABLE
- Session
Config Select Options - Possible values for a session configuration option.
- Session
Update - Different types of updates that can be sent during session processing.
- Stop
Reason - Reasons why an agent stops processing a prompt turn.
- String
Format - String format types for string properties in elicitation schemas.
- Tool
Call Content - Content produced by a tool call.
- Tool
Call Status - Execution status of a tool call.
- Tool
Kind - Categories of tools that can be invoked.
Constants§
- AGENT_
METHOD_ NAMES - Constant containing all agent method names.
- CLIENT_
METHOD_ NAMES - Constant containing all client method names.