Skip to main content
When the agent calls a tool, the assistant message includes a part with type: 'tool'. Tool approval and Model Context Protocol (MCP) connect are separate. They block the turn until the subscriber acts. See Tool approval for the agent-side API.

Tool calls

A tool part shows the call and its result. This is not approval. Do not call respondToAction for tool parts. Fields on part.type === 'tool': Render the tool name, then input or output from state:

Tool approval

pendingActions lists waits that block the turn. Do not mix the two action types. Show an Approve button for each pending approval:
Pass action.approvalId from pendingActions. Do not invent approve or deny ids.

MCP connect

An mcp-connection action asks the subscriber to authorize an MCP server. Open authorizeUrl. Do not call respondToAction.