UNPKG

@withpica/mcp-server

Version:

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

397 lines • 18 kB
// Copyright (c) 2025-2026 Withpica Ltd. All rights reserved. export const OPENAI_WORDINGS = { pica_agreements_query: { "": [ [ "For one agreement in full, use pica_agreements_inspect.", "For one agreement in full, send the user to the agreement's page in PICA. Don't build PICA links yourself.", ], ], }, pica_audio_attach: { "": [ [ "→ then: pica_audio_inspect (see the analysis when it lands)", "Analysis takes a minute or two. To see it, call pica_recordings_inspect (or pica_works_inspect) once it has landed. The results are on the song's page too.", ], ], }, pica_catalog_health: { "": [ [ "Reports only — for concrete fix-actions, use pica_catalog_health_plan.", "Reports only: fix each item with the tool for that record (pica_works_update, pica_credits_update, pica_people_update, pica_recordings_update), or on the record's page in pica.", ], ], }, pica_credits_list: { "": [ [ "→ then: pica_claim_credit (add yourself), pica_credits_update (fix existing credits), pica_people_inspect (look at a credited person)", "→ then: pica_credits_update (add or fix credits, including the user's own), pica_people_inspect (look at a credited person)", ], ], }, pica_credits_update: { "": [ [ "To change, add or remove ONE credit, use pica_credit_update, pica_credit_add or pica_credit_remove where you have them; otherwise read the current credits first and send them all back with only that change.", "To change, add or remove ONE credit, read the current credits first and send them all back with only that change.", ], [ "so for them prefer pica_recording_credits_update (target the recording)", "and you can't add them from here yet. Send the user to the recording's page in PICA to add them", ], [ "and only the credited person confirms it — send it with pica_credits_send_for_attestation.", "and only the credited person confirms it. The user asks them to confirm on the work's page in PICA.", ], ], }, pica_dashboard_briefing: { "": [ ["Full breakdown lives on pica_carbon_footprint.", ""], [ "Then: pica_enrichment_proposals_list to show them, pica_enrichment_proposals_bulk_apply to accept a reviewed batch.", "Then: pica_enrichment_proposals_list to show them, and pica_enrichment_proposal_apply on each one the user accepts. Many at once: the found page in PICA", ], [ ", and call pica_feedback_list when the user wants what the team wrote.", ". If the user wants what the team wrote, it's in pica, on the page where they sent the report.", ], [ "Mention them and offer to prepare invites with pica_profile_claims_invite; from a connected app the invite is sent only after an owner or admin approves it.", "Mention them. The user can invite each one to claim their profile from that person's page in pica.", ], [ "(the org's living outcome statement, saved by agents via pica_memory_save under the reserved org-scoped `org_intent` key)", "(the catalogue's own statement of what it is working towards)", ], ], }, pica_enrichment_proposal_apply: { "": [ [ "Prefer pica_enrichment_proposals_bulk_apply when accepting a reviewed batch;", "For a large reviewed batch, the user can accept them together on the found page in PICA;", ], ], }, pica_enrichment_proposals_list: { "": [ [ "→ then: pica_enrichment_proposal_apply (accept a proposal), pica_enrichment_proposal_reject (dismiss a proposal), pica_enrichment_proposals_bulk_apply (accept a reviewed batch)", "→ then: pica_enrichment_proposal_apply (accept a proposal). To dismiss proposals, or accept many at once, send the user to the found page in PICA", ], ], max_confidence: [ [ "Combine with pica_enrichment_proposals_bulk_reject to clear low-confidence noise.", "", ], ], }, pica_export_catalog_csv: { "": [ ["; `pica_download` needs a presigned URL and does not apply here.", "."], [ "use pica_export_song_registration instead;", "send the user to their catalogue in PICA;", ], ], }, pica_find_duplicates: { "": [ [ "or pica_duplicates_mark_different (when the user says a recording or release group is NOT one thing; pairs marked different are never offered again)", "and if the user says a group is not one thing, leave it, and tell them they can mark it as different in pica so it stops coming back.", ], ], }, pica_import_streaming_link: { "": [ [ "For a YouTube video, use pica_import_youtube_link; this one takes Spotify and Deezer links.", "This one takes Spotify and Deezer links; a YouTube video is added on the song's page in pica.", ], ], }, pica_merge_duplicates: { "": [ [ "transfer custody first (pica_recording_custody_assign) or keep both recordings.", "transfer custody first on the recording's page in pica, or keep both recordings.", ], [ "For delegated agents (OAuth connectors / pica_grant_*) this tool does NOT execute directly: it creates a pending human approval and the org owner approves out-of-band — relay the returned message and poll pica_approval_status.", "From ChatGPT this tool does not merge straight away: it asks the catalogue's owner to approve, by email. Pass on the message it returns. The merge happens once they approve, and the user sees the result in pica.", ], [ "Once approved, pica_approval_status returns a per-pair outcome (merged / skipped because already merged or deleted / failed with the reason);", "Once approved, each pair is merged, skipped (already merged or deleted) or failed with the reason; the user sees which in pica;", ], ], }, pica_notes_query: { "": [["For one note in full by id, use pica_notes_inspect.", ""]], }, pica_people_create: { "": [ [ "→ then: pica_resolve_person (fill identifiers from ISNI/MusicBrainz), pica_credit_add (add to a work), pica_credits_update (only where the one-credit tool isn't listed: send the work's full credit list)", "→ then: pica_credits_update (add them to a work: send the work's full credit list)", ], ], }, pica_people_inspect: { "": [ [ "For the GLOBAL identity graph by identifier use pica_graph_traverse instead.", "", ], [ "Offer to prepare the invite with pica_profile_claims_invite.", "The user can send the invite from this person's page in PICA.", ], [ "→ then: pica_credit_add (add them to a work), pica_credits_update (only where the one-credit tool isn't listed: send the work's full credit list), pica_resolve_person (fill identifiers from ISNI/MusicBrainz)", "→ then: pica_credits_update (add them to a work: send the work's full credit list), pica_people_update (fix their details)", ], ], sections: [ [ "read it before pica_people_split_identity.", "read it before telling the user two people share one identity. They separate them on the person's page in pica.", ], ], }, pica_people_query: { outreach_state: [ [ "`do_not_contact` — hard opt-out, honoured by pica_collaborators_invite.", "`do_not_contact`: they asked not to be contacted, so never suggest inviting them.", ], ], }, pica_people_update: { "": [ [ "To set an artist photo / avatar / profile picture from a URL, prefer pica_multimedia_import_url with person_id (downloads and stores it); profile_image_url here hotlinks an existing public image without storing it.", "profile_image_url links to an existing public image without storing it. To store an artist photo, the user can add it on the person's page in pica.", ], ], }, pica_recording_splits_create: { "": [ [ "(who played/produced — that's pica_recording_credits_update)", "(who played or produced, which the user adds on the recording's page in pica)", ], ], }, pica_recording_splits_list: { "": [ [ "Prefer pica_recording_splits_create to record a new ownership share, pica_recording_splits_update or pica_recording_splits_end to fix one; this one only reads them.", "This one only reads them. To record a new share use pica_recording_splits_create. To change or end one, send the user to the recording's page in PICA", ], ], }, pica_recordings_create: { "": [ [ "Album metadata (album_name, album_release_date, upc, track_number) lives on pica_releases_create/update, not here.", "Album metadata (album name, release date, UPC, track number) belongs on the release, not here: use pica_releases_create_with_tracks for a new release, or the release's page in pica for an existing one.", ], [ "Label-as-org belongs on the release (pica_releases_create/update's label_organization_id via pica_labels_query);", "The label belongs on the release too;", ], [ "→ then: pica_audio_presigned_upload (upload audio), pica_audio_analyze (extract features)", "→ then: pica_audio_attach (store an audio file the user attached) or pica_upload (accept: 'audio'), which starts the analysis itself", ], ], primary_artist_id: [ [ "Resolve the person first with pica_people_query / pica_resolve_person.", "Find the person first with pica_people_query.", ], ], studio_name: [ [ "For a structured session with location, attach the recording to a pica_projects_* recording_session instead/as well.", "", ], ], }, pica_recordings_inspect: { "": [ [ "Round-trip a pica_recording_credits_update write via sections:['recording_credits'].", "sections:['recording_credits'] lists who played, produced and engineered.", ], [ "→ then: pica_audio_query (audio files), pica_credits_update (fix work-side credits), pica_recording_credits_update (add a recording-side credit)", "→ then: pica_credits_update (fix work-side credits). Recording-side credits are added on the recording's page in pica.", ], ], sections: [ [ 'Use ["recording_credits"] to round-trip a pica_recording_credits_update write.', "recording_credits: who played, produced and engineered.", ], ], }, pica_recordings_query: { work_id: [ [ "Filter recordings by work ID (replaces pica_recordings_by_work)", "Filter recordings by work ID", ], ], }, pica_recordings_update: { "": [ [ "Album metadata (album_name, upc, track_number) belongs on pica_releases_create/update;", "Album metadata (album name, UPC, track number) belongs on the release (the release's page in pica, or pica_releases_create_with_tracks for a new one);", ], ], primary_artist_id: [ [ "Resolve the person first with pica_people_query / pica_resolve_person.", "Find the person first with pica_people_query.", ], ], studio_name: [ [ "For a structured session with location, attach the recording to a pica_projects_* recording_session instead/as well.", "", ], ], }, pica_releases_create_with_tracks: { "": [ [ " (same semantics as pica_releases_attach_track with identifier_type + identifier_value)", "", ], [ "Use this when importing a new album — use pica_releases_attach_track with items[] when the release already exists.", "Use this when importing a new album. If the release already exists, the user adds tracks on its page in pica.", ], ], release: [ [ "Release fields (same shape as pica_releases_create).", "Release fields.", ], ], "release.label_organization_id": [ [ "resolve via pica_labels_query first.", "pass only an id you already have, never a free-text name. If you don't have one, leave it out, and the user can set the label on the release's page in pica.", ], ], }, pica_report_issue: { "": [ [ "you can poll resolution status via pica_my_reported_issues.", "the team's answer shows in the user's briefing (pica_dashboard_briefing) when the report closes.", ], ], kind: [ [ "(prefer pica_enrichment_propose for additions — report_issue is for contradictions)", "(for a missing fact, add it with that record's update tool; report_issue is for contradictions)", ], ], }, pica_resolve_work: { "": [ [ "Prefer pica_resolve_recording when the target is a specific recorded take rather than the work.", "", ], ], }, pica_upload: { "": [ [ "For programmatic uploads where you already have file details: call pica_upload_file + pica_upload_complete.", "If the user has already attached the file in the chat, use pica_audio_attach instead (audio only).", ], ], accept: [ [ "'audio' routes through pica_audio_presigned_upload for automatic BPM/key analysis.", "'audio' also starts BPM and key analysis.", ], ], }, pica_works_create: { "": [ [ "Album, artwork, track number, UPC, and Spotify URL live on the release (pica_releases_create/update), not here; label too, via the release (resolve the label name with pica_labels_query first).", "Album, artwork, track number, UPC, Spotify URL and label live on the release, not here (pica_releases_create_with_tracks for a new one).", ], ], }, pica_works_delete: { "": [ [ "Prefer pica_works_bulk_delete when removing several works in one call.", "To remove several, call it once for each work, after the user has confirmed the list.", ], ], }, pica_works_inspect: { "": [ [ "→ then: pica_credits_update (fix credits), pica_resolve_work (fill identifiers + metadata), pica_run_work_cascade (retry)", "→ then: pica_credits_update (fix credits), pica_resolve_work (fill identifiers and metadata)", ], ], sections: [ [ "for the PDF, or several works in one ZIP, use pica_export_song_dossiers.", "the PDF is on the work's page in pica.", ], ], }, pica_works_query: { has_audio: [ [ "list the files with pica_audio_query then.", "then narrow it with query or work_status and try again.", ], ], }, pica_works_update: { "": [ [ "must go through pica_releases_create/update, not here.", "belong on the release, not here.", ], [ "pica_credits_update (batch) or pica_credit_add write work_collaborators", "pica_credits_update writes them to work_collaborators", ], ], }, }; /** Replace each edit's text once; throws if a `from` is not there. */ export function applyEdits(text, edits, where) { let out = text; for (const [from, to] of edits) { const at = out.indexOf(from); if (at < 0) { throw new Error(`openai-wordings: "${from.slice(0, 60)}…" is no longer in ${where}; update OPENAI_WORDINGS`); } out = out.slice(0, at) + to + out.slice(at + from.length); } return out.replace(/ {2,}/g, " ").replace(/ +([.;,])/g, "$1"); } //# sourceMappingURL=openai-wordings.js.map