@withpica/mcp-server
Version:
MCP Server for withPICA — enables AI assistants to interact with your withPICA music catalog
29 lines • 1.3 kB
TypeScript
/**
* Approvals Tools — the read-only poll for an out-of-band human approval.
*
* When a delegated agent's destructive write is deferred for human approval,
* the dispatcher returns a `human_approval_required` envelope carrying an
* `approval_reference`. `pica_approval_status` is the tool that reference
* points the agent at: it polls the approval row by id and reports whether the
* owner has decided. Read-only; ownership is enforced server-side by
* `/api/approvals/{id}/status` (org match for keys, grant match for grant
* tokens) — a foreign approval comes back as `not_found`, never a leak.
*/
import { PicaClient } from "@withpica/mcp-sdk";
import { ToolDefinition, ToolExecutor } from "./index.js";
export declare class ApprovalsTools {
private pica;
constructor(pica: PicaClient);
getTools(): Array<{
definition: ToolDefinition;
executor: ToolExecutor;
}>;
/**
* Poll a single approval's status. A not-found / foreign approval surfaces
* as a clean `{ status: "not_found" }` (the route returns 404 → the SDK
* throws EntityNotFoundError) rather than a hard error, so an agent can poll
* an unknown reference without crashing its loop.
*/
private getApprovalStatus;
}
//# sourceMappingURL=approvals.d.ts.map