UNPKG

@withpica/mcp-server

Version:

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

40 lines • 2.33 kB
/** * Write tools that save a field WHOLE, so a shorter value drops what was * there (8b's MCP review, medium "saving a list replaces it whole"). The * founder's 2026-11-20 credits rule: ask first when something real is lost; * otherwise keep the old value so the change can be undone. * * Each check below returns a preview only when the call would drop or * change something already stored. A call that only adds, or fills an empty * field, runs at once. The ask is the same server-side two-step token as * pica_credits_update (conditional-confirm.ts), bound to the call AND to * what would be lost, so a token for one loss never confirms another. * * Which tool gets what, and why: * - pica_works_update `mood` (tags on the primary recording, not a works * column, so the song's history can't keep it) and `metadata` (one JSON * object saved whole: a missing key is gone). `genre` needs no ask: it is * a catalogue value field, so the history keeps the old list. * - pica_people_update `emails`, `social_media`, `tags`, `origin_countries`: * personal fields, which the history records by name only (founder * decision 2026-09-29, lib/config/edit-value-fields.ts PERSONAL_FIELDS). * So the preview names only what kind of thing goes and how many, and the * binding is a hash of the removed values, never the values. stage_names * and roles are catalogue value fields, undoable from history. * - pica_agreements_update: the money and term fields. Changing or clearing * a stored term asks; setting an empty one doesn't. The preview names the * fields, never the amounts. * * Every read here fails closed: if PICA can't read what is stored, nothing * is saved and the caller is told to try again. A record that isn't found * is left to the route, which answers not-found itself. */ import type { Check } from "./conditional-confirm.js"; export declare const worksUpdateCheck: Check; export declare const peopleUpdateCheck: Check; /** The money and term fields of an agreement (write-schemas AGREEMENTS_WRITE_PROPERTIES). */ export declare const AGREEMENT_TERM_FIELDS: readonly string[]; export declare const agreementsUpdateCheck: Check; export declare const reassignArtistCheck: Check; export declare const linkArtistCheck: Check; //# sourceMappingURL=list-replace-confirms.d.ts.map