Skip to main content

Module external_tools

Module external_tools 

Source
Expand description

Shared governed MCP runtime for agent and interactive chat lifecycles.

Discovery is lazy, remote descriptions/results are observations, and only local policy can classify effects and footprints. Constructing one runtime never starts a server; discover_server is the first lifecycle action.

Modules§

chat
Chat-mode MCP tools: the same admission and transports as the agent, behind the interactive chat interface.

Structs§

DecliningMcpElicitationProvider
Non-interactive agent policy: acknowledge the protocol request and decline it immediately instead of hanging a run that has no attached input UI.
ExternalToolRejection
A locally rejected remote declaration. The server’s text is diagnostic data only; it never changes the trusted effect or footprint policy.
ExternalToolResult
ExternalToolRuntime
A single role-specific external-tool lifecycle. Agent and chat construct separate instances even when they select the same server configuration.
McpClientServices
McpElicitationBroker
A product-neutral interactive elicitation bridge. The protocol task waits on a one-shot response while a TUI or SDK host drains requests and answers them explicitly.
McpPendingElicitation
ModelTransportSamplingProvider
Sampling adapter used by the governed agent. The requesting server may suggest a model, but Perspt keeps route selection local and uses the model already selected for the product lifecycle.

Enums§

ExternalConnectionState
ExternalToolEvent
McpElicitationAction
McpServerEvent

Constants§

MCP_PROTOCOL_VERSION

Traits§

ExternalToolObserver
McpElicitationProvider
Product-owned interaction service for server-initiated MCP elicitation.
McpSamplingProvider
Product-owned model service for server-initiated MCP sampling.

Functions§

replay_key_for
Canonical replay key for a recorded external observation (public for replay assembly and conformance fixtures).