Package-level declarations
Types
One MCP tool as an AgentTool. The model sees <server>__<tool> (unique across servers, within the 64-character limit), the UI the tool's title and server name. Progress notifications stream as preliminary output; results the server flags isError become tool errors; questions the server asks the user (elicitation) go to the chat's dev.ai.elements.core.chat.ToolApprover.input.
When an MCP tool asks the user before running.
The MCP Apps extension (SEP-1865, stable revision 2026-01-26): tools whose results an interactive HTML view (ui:// resource) renders. The host side — sandbox, the ui/… message bridge — is ai-elements-mcp-apps; this is what the MCP client needs: the extension id, the negotiation and the view's media type.
The server requires authorization (HTTP 401) and no usable credentials are configured. resourceMetadataUrl (RFC 9728) and scope come from the WWW-Authenticate challenge and feed McpOAuth.discover.
A Model Context Protocol client over the Streamable HTTP transport.
One item of a tool result or prompt message.
Name and version of an MCP client or server (Implementation).
Answers a server's question to the user (MCP elicitation) with the user's response.
What McpOAuth.discover learned about an MCP server's authorization and the client it registered — persist it with the tokens.
A progress notification for a running request (notifications/progress).
How an app configures one remote MCP server. Secrets (tokens) are stored separately.
What happened when a server's tools were listed for a turn.
A tool offered by an MCP server (tools/list).
Hints a server gives about a tool (ToolAnnotations). They are untrusted unless the server is: use them for defaults (e.g. skip the confirmation for read-only tools), never as a security boundary.
The result of tools/call. isError results are tool failures the model should see.
The enabled MCP servers as a Capability: their tools, listed in parallel with a timeoutMs per server. A server that fails is skipped (see status) instead of failing the turn. Tool lists are cached for cacheMs; invalidate forces a refresh.