Sends one MCP request to a declared server over the connection behind
context, and returns its inner outcome.
Required MCP 2026-07-28 metadata is added to params._meta unless already
present. Outer ACP failures, including cancellation and binding errors,
reject with a RequestError; inner MCP errors resolve as { error }.
options.sessionId and options.toolCallId name the ACP session and tool
call the request is sent for. A toolCallId without a sessionId rejects
before anything is sent.
Optionalparams: Record<string, unknown> | nullReadonlyhandleHandles an incoming mcp/message notification. Register it with
onNotification(methods.agent.mcp.message, caller.handleNotification).
Notifications for unknown or already completed requests are dropped.
Calls MCP servers that an ACP peer declared with
"type": "acp".Create one caller per app and register handleNotification for
mcp/messagenotifications so progress and subscription events reach the request that owns them: