@withpica/mcp-server 2.40.0 → 2.44.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (60) hide show
  1. package/CHANGELOG.md +104 -0
  2. package/dist/resources/agent-guide.d.ts +2 -2
  3. package/dist/resources/agent-guide.d.ts.map +1 -1
  4. package/dist/resources/agent-guide.js +54 -20
  5. package/dist/resources/agent-guide.js.map +1 -1
  6. package/dist/resources/index.d.ts.map +1 -1
  7. package/dist/resources/index.js +40 -14
  8. package/dist/resources/index.js.map +1 -1
  9. package/dist/resources/required-schemas.generated.d.ts +193 -12
  10. package/dist/resources/required-schemas.generated.d.ts.map +1 -1
  11. package/dist/resources/required-schemas.generated.js +432 -18
  12. package/dist/resources/required-schemas.generated.js.map +1 -1
  13. package/dist/resources/required-schemas.source.d.ts.map +1 -1
  14. package/dist/resources/required-schemas.source.js +228 -15
  15. package/dist/resources/required-schemas.source.js.map +1 -1
  16. package/dist/resources/welcome.d.ts +14 -0
  17. package/dist/resources/welcome.d.ts.map +1 -0
  18. package/dist/resources/welcome.js +26 -0
  19. package/dist/resources/welcome.js.map +1 -0
  20. package/dist/server-instructions.d.ts +23 -0
  21. package/dist/server-instructions.d.ts.map +1 -1
  22. package/dist/server-instructions.js +27 -0
  23. package/dist/server-instructions.js.map +1 -1
  24. package/dist/tools/agreement-types.js +1 -1
  25. package/dist/tools/agreement-types.js.map +1 -1
  26. package/dist/tools/agreements.js +3 -3
  27. package/dist/tools/agreements.js.map +1 -1
  28. package/dist/tools/audio-files.js +4 -4
  29. package/dist/tools/audio-files.js.map +1 -1
  30. package/dist/tools/dashboard.js +5 -5
  31. package/dist/tools/dashboard.js.map +1 -1
  32. package/dist/tools/discovery.d.ts.map +1 -1
  33. package/dist/tools/discovery.js +13 -2
  34. package/dist/tools/discovery.js.map +1 -1
  35. package/dist/tools/enrichment.js +6 -6
  36. package/dist/tools/enrichment.js.map +1 -1
  37. package/dist/tools/exports.js +5 -5
  38. package/dist/tools/exports.js.map +1 -1
  39. package/dist/tools/index.d.ts +1 -1
  40. package/dist/tools/index.d.ts.map +1 -1
  41. package/dist/tools/index.js +32 -1
  42. package/dist/tools/index.js.map +1 -1
  43. package/dist/tools/metadata.d.ts.map +1 -1
  44. package/dist/tools/metadata.js +32 -1
  45. package/dist/tools/metadata.js.map +1 -1
  46. package/dist/tools/multimedia.js +4 -4
  47. package/dist/tools/multimedia.js.map +1 -1
  48. package/dist/tools/notifications.d.ts +8 -0
  49. package/dist/tools/notifications.d.ts.map +1 -1
  50. package/dist/tools/notifications.js +145 -0
  51. package/dist/tools/notifications.js.map +1 -1
  52. package/dist/tools/settings.d.ts.map +1 -1
  53. package/dist/tools/settings.js +44 -5
  54. package/dist/tools/settings.js.map +1 -1
  55. package/dist/tools/storage-config.d.ts +13 -0
  56. package/dist/tools/storage-config.d.ts.map +1 -0
  57. package/dist/tools/storage-config.js +245 -0
  58. package/dist/tools/storage-config.js.map +1 -0
  59. package/package.json +3 -3
  60. package/server.json +2 -2
@@ -1,4 +1,192 @@
1
1
  export declare const REQUIRED_SCHEMAS: {
2
+ readonly "agreement-required": {
3
+ readonly workflow: "agreement-required";
4
+ readonly summary: "Required fields to create an agreement, then attach works and (optionally) render from a template.";
5
+ readonly primary_tool: "pica_agreements_create";
6
+ readonly primary_required: readonly ["title", "agreement_type", "other_party_name"];
7
+ readonly primary_recommended: readonly ["id", "other_party_type", "description", "notes", "tags", "agreement_category", "status", "signing_date", "start_date", "end_date", "expires_at", "renewal_date", "termination_date", "counterparty_org_id", "counterparty_email", "advance_amount", "advance_currency", "is_recoupable", "financial_terms", "agreement_terms", "termination_notice_period_days", "include_future_works"];
8
+ readonly enums: {
9
+ readonly agreement_type: readonly ["admin_only", "artist_contract", "co_publishing", "distribution", "library_music", "master_recording", "other", "production", "publishing_admin", "report", "sub_publishing", "termination"];
10
+ readonly other_party_type: readonly ["artist", "individual", "label", "music_library", "other", "production_company", "publisher"];
11
+ readonly status: readonly ["active", "cancelled", "completed", "draft", "expired", "fully_executed", "partially_signed", "pending_signature", "terminated", "unknown"];
12
+ };
13
+ readonly companion_calls: readonly [{
14
+ readonly tool: "pica_agreements_update";
15
+ readonly when: "After creation — to amend any inline field. Status changes trigger notifications; counterparty_org_id changes require the linked-org check at the route layer.";
16
+ readonly required: readonly ["id"];
17
+ }, {
18
+ readonly tool: "pica_agreements_link_work";
19
+ readonly when: "Attach a work to the agreement. Optionally set a royalty split percentage per work.";
20
+ readonly required: readonly ["agreement_id", "work_id"];
21
+ }, {
22
+ readonly tool: "pica_agreement_templates_render";
23
+ readonly when: "Template-driven flow — fill an agreement template with catalog data (work_id + people_ids) before creating the agreement row.";
24
+ readonly required: readonly ["id"];
25
+ }];
26
+ readonly example: {
27
+ readonly title: "Songwriter Admin Deal — Midnight Rivers";
28
+ readonly agreement_type: "publishing_admin";
29
+ readonly other_party_name: "Indigo Music Publishing Ltd.";
30
+ };
31
+ };
32
+ readonly "audio-upload-required": {
33
+ readonly workflow: "audio-upload-required";
34
+ readonly summary: "Three-step chain to add an audio master / stem / version to the catalog: presign → PUT → finalize, then optional async analyze + poll.";
35
+ readonly primary_tool: "pica_audio_presigned_upload";
36
+ readonly primary_required: readonly ["filename", "content_type", "file_size"];
37
+ readonly primary_recommended: readonly ["work_id", "title", "file_type"];
38
+ readonly enums: {
39
+ readonly file_type: readonly ["demo", "instrumental", "master", "stem", "version"];
40
+ readonly classification: readonly ["composition", "demo", "drum_pack", "loop", "other", "released_song", "sample", "stem", "unreleased_song"];
41
+ };
42
+ readonly companion_calls: readonly [{
43
+ readonly tool: "pica_audio_complete_upload";
44
+ readonly when: "Step 2 — after the uploader PUTs the file to the signed URL returned by step 1. Finalizes the upload, writes the audio_files row, and (optionally) links or auto-creates a recording for master files.";
45
+ readonly required: readonly ["upload_id", "key", "bucket", "filename", "content_type", "file_size"];
46
+ }, {
47
+ readonly tool: "pica_audio_analyze";
48
+ readonly when: "Step 3 (optional, async). Triggers BPM / key / mood feature extraction (Librosa) and lyrics transcription (Whisper). Each side bills 1 credit. Does not auto-run on complete_upload — explicit call required.";
49
+ readonly required: readonly ["id"];
50
+ }, {
51
+ readonly tool: "pica_audio_inspect";
52
+ readonly when: "Step 4 (poll). Call with sections: ['analysis', 'status'] until the analysis job reports complete. Lyrics transcripts land on the analysis row, not works.lyrics — copy is a separate step.";
53
+ readonly required: readonly ["id"];
54
+ }];
55
+ readonly example: {
56
+ readonly filename: "midnight-rivers-master.wav";
57
+ readonly content_type: "audio/wav";
58
+ readonly file_size: 48234567;
59
+ readonly work_id: "<optional uuid — auto-creates a recording for master files>";
60
+ };
61
+ };
62
+ readonly "claim-required": {
63
+ readonly workflow: "claim-required";
64
+ readonly summary: "Resolve pending discoveries (credits, custody, artist links) into your catalog. Each discovery type has a typed claim verb; the generic discoveries_review surface accepts/rejects without specialised handling.";
65
+ readonly primary_tool: "pica_discoveries_query";
66
+ readonly primary_required: readonly [];
67
+ readonly primary_recommended: readonly ["status", "limit"];
68
+ readonly enums: {
69
+ readonly status: readonly ["expired", "pending", "resolved", "revoked"];
70
+ readonly match_basis: readonly ["email", "ipi", "ipn", "isni", "musicbrainz"];
71
+ readonly custody_type: readonly ["composition", "master"];
72
+ };
73
+ readonly companion_calls: readonly [{
74
+ readonly tool: "pica_discoveries_review";
75
+ readonly when: "Generic accept/reject for any discovery row — accepted discoveries update your catalog automatically. Use for non-credit / non-custody / non-artist discoveries, or when the typed claim tools refuse on rate-limit / state preconditions.";
76
+ readonly required: readonly ["discovery_id", "status"];
77
+ }, {
78
+ readonly tool: "pica_claim_credit";
79
+ readonly when: "Drain a discovered_credits row and insert a work_credits row in your catalog. Rate-limited to 20 claims/hour. Re-claiming an already-resolved row returns DISCOVERY_ALREADY_RESOLVED (409).";
80
+ readonly required: readonly ["id"];
81
+ }, {
82
+ readonly tool: "pica_claim_custody";
83
+ readonly when: "Drain a discovered_custody row into a pending custody_claims row with +72h silent-consent auto-approve. The current custodian keeps the catalog row until the window elapses.";
84
+ readonly required: readonly ["id"];
85
+ }, {
86
+ readonly tool: "pica_claim_artist";
87
+ readonly when: "Drain a discovered_artists row instantly (identity evidence already validated at discovery time). Requires your identity to already be linked via pica_update_my_identity. Refuses (409) when an open artist_claims review row exists.";
88
+ readonly required: readonly ["id"];
89
+ }];
90
+ readonly example: {
91
+ readonly status: "pending";
92
+ readonly limit: 50;
93
+ };
94
+ };
95
+ readonly "enrichment-resolve-required": {
96
+ readonly workflow: "enrichment-resolve-required";
97
+ readonly summary: "Fan out enrichment across every eligible source for an entity (work / recording / person), then review fuzzy Tier B matches in the proposals queue. Tier A identifier matches apply directly; Tier B fuzzy matches queue as proposals.";
98
+ readonly primary_tool: "pica_resolve_work";
99
+ readonly primary_required: readonly ["work_id"];
100
+ readonly primary_recommended: readonly ["sources", "include_fuzzy"];
101
+ readonly enums: {
102
+ readonly status: readonly ["applied", "expired", "pending", "rejected"];
103
+ readonly entity_type: readonly ["person", "recording", "work"];
104
+ readonly proposal_action: readonly ["create", "update"];
105
+ };
106
+ readonly companion_calls: readonly [{
107
+ readonly tool: "pica_resolve_recording";
108
+ readonly when: "Recording-side variant. Fans out across Spotify, YouTube, MusicBrainz, Discogs. Triggered by spotify_track_uri / youtube_video_id on the recording.";
109
+ readonly required: readonly ["recording_id"];
110
+ }, {
111
+ readonly tool: "pica_resolve_person";
112
+ readonly when: "Person-side variant. Fans out across ISNI and MusicBrainz (Wikidata downstream). Triggered by isni / musicbrainz_id on the person.";
113
+ readonly required: readonly ["person_id"];
114
+ }, {
115
+ readonly tool: "pica_enrichment_proposals_list";
116
+ readonly when: "After resolve — list pending Tier B fuzzy matches awaiting review. Only pending status is returned.";
117
+ readonly required: readonly [];
118
+ }, {
119
+ readonly tool: "pica_enrichment_proposal_apply";
120
+ readonly when: "Commit a reviewed proposal. Drift detection runs first on update proposals — pass force=true only after the user has reviewed any conflicts from a prior drift_detected response.";
121
+ readonly required: readonly ["proposal_id"];
122
+ }, {
123
+ readonly tool: "pica_enrichment_proposal_reject";
124
+ readonly when: "Dismiss a proposal. Content-hash suppression permanently blocks re-proposal of the same exact content; cascade only re-proposes if the source data genuinely changes.";
125
+ readonly required: readonly ["proposal_id"];
126
+ }];
127
+ readonly example: {
128
+ readonly work_id: "<uuid>";
129
+ readonly sources: readonly ["mlc", "spotify"];
130
+ readonly include_fuzzy: true;
131
+ };
132
+ };
133
+ readonly "export-required": {
134
+ readonly workflow: "export-required";
135
+ readonly summary: "Generate exports of the works catalog in formats matching the destination — CSV/JSON for general use, CWR for PRO registration, industry-ready packages for publishers/labels/sync, CAR for diligence and finance, AI-consent for declaration matrices.";
136
+ readonly primary_tool: "pica_export_catalog_csv";
137
+ readonly primary_required: readonly [];
138
+ readonly primary_recommended: readonly ["format"];
139
+ readonly enums: {};
140
+ readonly companion_calls: readonly [{
141
+ readonly tool: "pica_export_song_registration";
142
+ readonly when: "CWR-compatible song-registration export, formatted for PRO/CMO submission. Billing-gated.";
143
+ readonly required: readonly [];
144
+ }, {
145
+ readonly tool: "pica_export_industry_ready";
146
+ readonly when: "Industry-ready metadata package — formatted for distribution to publishers, labels, and sync agents. Billing-gated.";
147
+ readonly required: readonly [];
148
+ }, {
149
+ readonly tool: "pica_export_catalog_asset_report";
150
+ readonly when: "Catalog Asset Report (CAR) — unified ZIP bundle with cover PDF, evidence folders, integrity manifest. Property-lending framing for finance / insurance / diligence. Nested `sections` object accepts boolean flags: valuation, assets, agreements, intelligence, audio. Ownership is always included. Billing-gated.";
151
+ readonly required: readonly [];
152
+ }, {
153
+ readonly tool: "pica_export_ai_consent";
154
+ readonly when: "AI-usage consent declaration matrix — per-work + per-contributor declarations of human-made / AI-assisted / AI-generated.";
155
+ readonly required: readonly [];
156
+ }];
157
+ readonly example: {
158
+ readonly format: "csv";
159
+ };
160
+ };
161
+ readonly "multimedia-required": {
162
+ readonly workflow: "multimedia-required";
163
+ readonly summary: "Required fields to register a multimedia item (photo / video / audio / external streaming link), and the patterns for importing or attaching to a work.";
164
+ readonly primary_tool: "pica_multimedia_create";
165
+ readonly primary_required: readonly ["title", "content_type"];
166
+ readonly primary_recommended: readonly ["url", "classification", "caption", "description", "tags", "credits", "duration_seconds", "collection_id", "display_order", "is_featured", "is_published", "venue", "event_name", "performance_date", "setlist_position", "sync_side", "spotify_url", "spotify_track_uri", "spotify_track_id", "youtube_url", "youtube_video_id", "soundcloud_url", "thumbnail_url"];
167
+ readonly enums: {
168
+ readonly content_type: readonly ["live_performance", "soundcloud_track", "spotify_track", "uploaded_audio", "uploaded_photo", "uploaded_video", "youtube_video"];
169
+ readonly classification: readonly ["album_artwork", "artist_showcase", "behind_the_scenes", "general", "live_performance", "music_video", "promo_material", "studio_session", "sync_placement"];
170
+ };
171
+ readonly companion_calls: readonly [{
172
+ readonly tool: "pica_multimedia_import_url";
173
+ readonly when: "Import an external image or video URL — downloads the file into PICA storage rather than referencing it externally. Use for Spotify artwork, web images, etc.";
174
+ readonly required: readonly ["url"];
175
+ }, {
176
+ readonly tool: "pica_multimedia_link_youtube";
177
+ readonly when: "YouTube-specific variant — pulls thumbnail, title, and view count automatically. Use this instead of pica_multimedia_create for YouTube videos.";
178
+ readonly required: readonly ["youtube_video_id", "title"];
179
+ }, {
180
+ readonly tool: "pica_multimedia_link_work";
181
+ readonly when: "Attach an existing multimedia item to a work with a typed relationship (music_video_for, sync_placement, album_artwork, etc.).";
182
+ readonly required: readonly ["multimedia_id", "work_id", "relationship_type"];
183
+ }];
184
+ readonly example: {
185
+ readonly title: "Midnight Rivers — Official Music Video";
186
+ readonly content_type: "youtube_video";
187
+ readonly url: "https://www.youtube.com/watch?v=dQw4w9WgXcQ";
188
+ };
189
+ };
2
190
  readonly "person-required": {
3
191
  readonly workflow: "person-required";
4
192
  readonly summary: "Required fields to register a person (writer, performer, producer, publisher). Identifiers (IPI / ISNI / PRO / MusicBrainz / etc.) are inline-settable at create time.";
@@ -31,15 +219,9 @@ export declare const REQUIRED_SCHEMAS: {
31
219
  readonly companion_calls: readonly [];
32
220
  readonly example: {
33
221
  readonly recording_id: "<uuid>";
34
- readonly credits: readonly [{
35
- readonly credited_name: "The Riverbed Trio";
36
- readonly role: "MainArtist";
37
- readonly display_order: 0;
38
- }, {
39
- readonly credited_name: "Sam Producer";
40
- readonly role: "Producer";
41
- readonly display_order: 1;
42
- }];
222
+ readonly credited_name: "The Riverbed Trio";
223
+ readonly role: "MainArtist";
224
+ readonly person_id: "<uuid>";
43
225
  };
44
226
  };
45
227
  readonly "recording-required": {
@@ -53,9 +235,8 @@ export declare const REQUIRED_SCHEMAS: {
53
235
  };
54
236
  readonly companion_calls: readonly [{
55
237
  readonly tool: "pica_recording_credits_update";
56
- readonly when: "Batch — attach MainArtist / Producer / Engineer credits to the recording.";
57
- readonly required: readonly ["recording_id", "credits"];
58
- readonly per_row_required: readonly ["credited_name", "role", "display_order"];
238
+ readonly when: "Per credit — attach a single MainArtist / Producer / Engineer credit. Call once per person; does NOT take a credits[] batch (asymmetric with pica_credits_update for works).";
239
+ readonly required: readonly ["recording_id", "credited_name", "role"];
59
240
  }, {
60
241
  readonly tool: "pica_recordings_update";
61
242
  readonly when: "After creation — to amend recording_title, artist_name, version_type, isrc, duration_ms, or any other inline field. Same payload shape as create plus `id`.";
@@ -1 +1 @@
1
- {"version":3,"file":"required-schemas.generated.d.ts","sourceRoot":"","sources":["../../src/resources/required-schemas.generated.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgVnB,CAAC;AAEX,MAAM,MAAM,iBAAiB,GAAG,MAAM,OAAO,gBAAgB,CAAC"}
1
+ {"version":3,"file":"required-schemas.generated.d.ts","sourceRoot":"","sources":["../../src/resources/required-schemas.generated.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8uBnB,CAAC;AAEX,MAAM,MAAM,iBAAiB,GAAG,MAAM,OAAO,gBAAgB,CAAC"}