Skip to content

mcp.call

Calls a tool of a workspace’s remote MCP server from the daemon, with pi’s OAuth login for it (PRT-435).

/** `mcp.call` params (PRT-435). */
export type McpCallParams = {
/** The tool's arguments, an object; none sends `{}`. */
arguments?: Record<string, unknown> | null;
server: string;
tool: string;
workspaceId: string;
};
/** `mcp.call` result (PRT-435): the server's `tools/call` result. */
export type McpCallResult = {
/** The result's content blocks (`{ type: "text", text }`, `image`, `audio`, `resource_link`, `resource`), as sent. */
content: unknown[];
/** The tool reported a failure (the call itself went through). */
isError: boolean;
structuredContent?: unknown;
};