UNPKG

@withpica/mcp-server

Version:

MCP Server for withPICA — enables AI assistants to interact with your withPICA music catalog

54 lines • 2.38 kB
/** * Programmable rights — MCP tools (ADR-321 §9, Phase 2). * * Agents propose, humans confirm. `pica_rights_propose` follows the * duplicate-merge pattern (ADR-288): tier "destructive", approvalMode "human", * resource scope `write:catalog` so a delegated agent can PROPOSE; the org * owner approves out-of-band and `human-approval-executor` replays the frozen * params through the same `proposeRightsRule` the route calls. Proposing never * activates or confirms anything — each party confirms by email. * * `pica_rights_status` and `pica_rights_inspect` are reads over * `GET /api/admin/rights/rules/{id}` and `GET /api/admin/works/{id}/rights`. * * Phase 3: `pica_rights_statements` reads what income WOULD pay * (`/api/admin/rights-income`, `/api/admin/rights-statements/*`) and * `pica_rights_record_income` records a figure the user gave. Both need * finance access; neither moves money. */ import { PicaClient } from "@withpica/mcp-sdk"; import type { ToolDefinition, ToolExecutor } from "./index.js"; /** The share-rule kinds the propose route accepts (programmable-rights-share-rule SHARE_RULE_KINDS). */ export declare const RIGHTS_SHARE_KINDS: readonly ["publisher", "manager_commission", "sold_share", "other"]; /** * Build the POST body from tool args — only the fields the route reads, so * nothing unexpected is forwarded. The route re-validates everything. */ export declare function buildProposeBody(args: Record<string, unknown>): Record<string, unknown>; /** The one-line message for a successful proposal. Never says "active" unless it is. */ export declare function proposeMessage(data: { locked?: boolean; requests?: unknown[]; informed?: unknown[]; }): string; /** The one-line message for a song's rights overview. Holds are PICA's rules. */ export declare function inspectMessage(data: { workTitle?: string; holds?: unknown[]; }): string; /** The one-line message for statements. Never says paid. */ export declare function statementsMessage(entries: number): string; export declare class RightsTools { private pica; constructor(pica: PicaClient); getTools(): Array<{ definition: ToolDefinition; executor: ToolExecutor; }>; private propose; private status; private statements; private recordIncome; private inspect; } //# sourceMappingURL=rights.d.ts.map