Skip to content

initialize

Class info

Classes

Name Children Inherits
InitializeRequest
aclientp.schema.v2.initialize
Request parameters for the initialize method.
InitializeResponse
aclientp.schema.v2.initialize
Response to the ``initialize`` method.

🛈 DocStrings

v2 initialize: protocol version negotiation, implementation info and capabilities.

InitializeRequest

Bases: AnnotatedObject

Request parameters for the initialize method.

Source code in src/aclientp/schema/v2/initialize.py
class InitializeRequest(AnnotatedObject):
    """Request parameters for the initialize method."""

    protocol_version: ProtocolVersion
    """The latest protocol version supported by the client."""

    info: Implementation
    """Information about the implementation sending this initialize request."""

    capabilities: ClientCapabilities | MISSING = MISSING
    """Capabilities supported by the client."""

capabilities class-attribute instance-attribute

capabilities: ClientCapabilities | MISSING = MISSING

Capabilities supported by the client.

info instance-attribute

Information about the implementation sending this initialize request.

protocol_version instance-attribute

protocol_version: ProtocolVersion

The latest protocol version supported by the client.

InitializeResponse

Bases: AnnotatedObject

Response to the initialize method.

Source code in src/aclientp/schema/v2/initialize.py
class InitializeResponse(AnnotatedObject):
    """Response to the ``initialize`` method."""

    protocol_version: ProtocolVersion
    """The highest protocol version supported by the agent that is at or below the version
    requested by the client. If no such version exists, initialization fails with error code
    -32022."""

    info: Implementation
    """Information about the implementation sending this initialize response."""

    capabilities: AgentCapabilities | MISSING = MISSING
    """Capabilities supported by the agent."""

    auth_methods: Sequence[AuthMethod] | MISSING = MISSING
    """Authentication methods supported by the agent."""

auth_methods class-attribute instance-attribute

auth_methods: Sequence[AuthMethod] | MISSING = MISSING

Authentication methods supported by the agent.

capabilities class-attribute instance-attribute

capabilities: AgentCapabilities | MISSING = MISSING

Capabilities supported by the agent.

info instance-attribute

Information about the implementation sending this initialize response.

protocol_version instance-attribute

protocol_version: ProtocolVersion

The highest protocol version supported by the agent that is at or below the version requested by the client. If no such version exists, initialization fails with error code -32022.