@withpica/mcp-server 2.7.0 → 2.8.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.
- package/dist/__mocks__/mppx-mcp-sdk-server.d.ts +6 -0
- package/dist/__mocks__/mppx-mcp-sdk-server.d.ts.map +1 -0
- package/dist/__mocks__/mppx-mcp-sdk-server.js +6 -0
- package/dist/__mocks__/mppx-mcp-sdk-server.js.map +1 -0
- package/dist/__mocks__/mppx-server.d.ts +12 -0
- package/dist/__mocks__/mppx-server.d.ts.map +1 -0
- package/dist/__mocks__/mppx-server.js +12 -0
- package/dist/__mocks__/mppx-server.js.map +1 -0
- package/dist/apps/download.d.ts +2 -0
- package/dist/apps/download.d.ts.map +1 -0
- package/dist/apps/download.js +125 -0
- package/dist/apps/download.js.map +1 -0
- package/dist/apps/generated/shared-bundle.d.ts +5 -0
- package/dist/apps/generated/shared-bundle.d.ts.map +1 -0
- package/dist/apps/generated/shared-bundle.js +7 -0
- package/dist/apps/generated/shared-bundle.js.map +1 -0
- package/dist/apps/shared.d.ts +15 -0
- package/dist/apps/shared.d.ts.map +1 -0
- package/dist/apps/shared.js +480 -0
- package/dist/apps/shared.js.map +1 -0
- package/dist/apps/upload.d.ts +2 -0
- package/dist/apps/upload.d.ts.map +1 -0
- package/dist/apps/upload.js +280 -0
- package/dist/apps/upload.js.map +1 -0
- package/dist/config.d.ts +4 -25
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +36 -12
- package/dist/config.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/dist/prompts/index.d.ts +64 -64
- package/dist/prompts/index.js +24 -24
- package/dist/prompts/index.js.map +1 -1
- package/dist/resources/index.d.ts +55 -53
- package/dist/resources/index.d.ts.map +1 -1
- package/dist/resources/index.js +133 -54
- package/dist/resources/index.js.map +1 -1
- package/dist/resources/llms-primer.d.ts +2 -0
- package/dist/resources/llms-primer.d.ts.map +1 -0
- package/dist/resources/llms-primer.js +68 -0
- package/dist/resources/llms-primer.js.map +1 -0
- package/dist/server-instructions.d.ts +9 -0
- package/dist/server-instructions.d.ts.map +1 -0
- package/dist/server-instructions.js +34 -0
- package/dist/server-instructions.js.map +1 -0
- package/dist/server.d.ts +49 -32
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +103 -14
- package/dist/server.js.map +1 -1
- package/dist/tools/agreement-types.d.ts +27 -0
- package/dist/tools/agreement-types.d.ts.map +1 -0
- package/dist/tools/agreement-types.js +387 -0
- package/dist/tools/agreement-types.js.map +1 -0
- package/dist/tools/agreements.d.ts +20 -0
- package/dist/tools/agreements.d.ts.map +1 -0
- package/dist/tools/agreements.js +363 -0
- package/dist/tools/agreements.js.map +1 -0
- package/dist/tools/analytics.d.ts +20 -0
- package/dist/tools/analytics.d.ts.map +1 -0
- package/dist/tools/analytics.js +124 -0
- package/dist/tools/analytics.js.map +1 -0
- package/dist/tools/app-tools.d.ts +21 -0
- package/dist/tools/app-tools.d.ts.map +1 -0
- package/dist/tools/app-tools.js +248 -0
- package/dist/tools/app-tools.js.map +1 -0
- package/dist/tools/assets.d.ts +25 -0
- package/dist/tools/assets.d.ts.map +1 -0
- package/dist/tools/assets.js +631 -0
- package/dist/tools/assets.js.map +1 -0
- package/dist/tools/audio-files.d.ts +20 -0
- package/dist/tools/audio-files.d.ts.map +1 -0
- package/dist/tools/audio-files.js +384 -0
- package/dist/tools/audio-files.js.map +1 -0
- package/dist/tools/auth.d.ts +22 -0
- package/dist/tools/auth.d.ts.map +1 -0
- package/dist/tools/auth.js +210 -0
- package/dist/tools/auth.js.map +1 -0
- package/dist/tools/bulk.d.ts +16 -0
- package/dist/tools/bulk.d.ts.map +1 -0
- package/dist/tools/bulk.js +85 -0
- package/dist/tools/bulk.js.map +1 -0
- package/dist/tools/calendar.d.ts +15 -0
- package/dist/tools/calendar.d.ts.map +1 -0
- package/dist/tools/calendar.js +67 -0
- package/dist/tools/calendar.js.map +1 -0
- package/dist/tools/collaborators.d.ts +21 -0
- package/dist/tools/collaborators.d.ts.map +1 -0
- package/dist/tools/collaborators.js +311 -0
- package/dist/tools/collaborators.js.map +1 -0
- package/dist/tools/comparisons.d.ts +22 -0
- package/dist/tools/comparisons.d.ts.map +1 -0
- package/dist/tools/comparisons.js +78 -0
- package/dist/tools/comparisons.js.map +1 -0
- package/dist/tools/credits.d.ts +17 -0
- package/dist/tools/credits.d.ts.map +1 -0
- package/dist/tools/credits.js +312 -0
- package/dist/tools/credits.js.map +1 -0
- package/dist/tools/custody-hints.d.ts +16 -0
- package/dist/tools/custody-hints.d.ts.map +1 -0
- package/dist/tools/custody-hints.js +27 -0
- package/dist/tools/custody-hints.js.map +1 -0
- package/dist/tools/custody.d.ts +38 -0
- package/dist/tools/custody.d.ts.map +1 -0
- package/dist/tools/custody.js +274 -0
- package/dist/tools/custody.js.map +1 -0
- package/dist/tools/dashboard.d.ts +19 -0
- package/dist/tools/dashboard.d.ts.map +1 -0
- package/dist/tools/dashboard.js +146 -0
- package/dist/tools/dashboard.js.map +1 -0
- package/dist/tools/directory.d.ts +15 -0
- package/dist/tools/directory.d.ts.map +1 -0
- package/dist/tools/directory.js +106 -0
- package/dist/tools/directory.js.map +1 -0
- package/dist/tools/discovery.d.ts +28 -0
- package/dist/tools/discovery.d.ts.map +1 -0
- package/dist/tools/discovery.js +560 -0
- package/dist/tools/discovery.js.map +1 -0
- package/dist/tools/disputes.d.ts +18 -0
- package/dist/tools/disputes.d.ts.map +1 -0
- package/dist/tools/disputes.js +61 -0
- package/dist/tools/disputes.js.map +1 -0
- package/dist/tools/documents.d.ts +15 -0
- package/dist/tools/documents.d.ts.map +1 -0
- package/dist/tools/documents.js +36 -0
- package/dist/tools/documents.js.map +1 -0
- package/dist/tools/duplicates.d.ts +16 -0
- package/dist/tools/duplicates.d.ts.map +1 -0
- package/dist/tools/duplicates.js +87 -0
- package/dist/tools/duplicates.js.map +1 -0
- package/dist/tools/enrichment.d.ts +20 -0
- package/dist/tools/enrichment.d.ts.map +1 -0
- package/dist/tools/enrichment.js +154 -0
- package/dist/tools/enrichment.js.map +1 -0
- package/dist/tools/exports.d.ts +19 -0
- package/dist/tools/exports.d.ts.map +1 -0
- package/dist/tools/exports.js +175 -0
- package/dist/tools/exports.js.map +1 -0
- package/dist/tools/import-documents.d.ts +21 -0
- package/dist/tools/import-documents.d.ts.map +1 -0
- package/dist/tools/import-documents.js +203 -0
- package/dist/tools/import-documents.js.map +1 -0
- package/dist/tools/import.d.ts +30 -0
- package/dist/tools/import.d.ts.map +1 -0
- package/dist/tools/import.js +455 -0
- package/dist/tools/import.js.map +1 -0
- package/dist/tools/index.d.ts +83 -37
- package/dist/tools/index.d.ts.map +1 -1
- package/dist/tools/index.js +448 -84
- package/dist/tools/index.js.map +1 -1
- package/dist/tools/integrations.d.ts +15 -0
- package/dist/tools/integrations.d.ts.map +1 -0
- package/dist/tools/integrations.js +100 -0
- package/dist/tools/integrations.js.map +1 -0
- package/dist/tools/licensing.d.ts +40 -0
- package/dist/tools/licensing.d.ts.map +1 -0
- package/dist/tools/licensing.js +431 -0
- package/dist/tools/licensing.js.map +1 -0
- package/dist/tools/memory.d.ts +21 -0
- package/dist/tools/memory.d.ts.map +1 -0
- package/dist/tools/memory.js +116 -0
- package/dist/tools/memory.js.map +1 -0
- package/dist/tools/metadata.d.ts +15 -0
- package/dist/tools/metadata.d.ts.map +1 -0
- package/dist/tools/metadata.js +1106 -0
- package/dist/tools/metadata.js.map +1 -0
- package/dist/tools/multimedia.d.ts +19 -0
- package/dist/tools/multimedia.d.ts.map +1 -0
- package/dist/tools/multimedia.js +291 -0
- package/dist/tools/multimedia.js.map +1 -0
- package/dist/tools/notes.d.ts +21 -0
- package/dist/tools/notes.d.ts.map +1 -0
- package/dist/tools/notes.js +108 -0
- package/dist/tools/notes.js.map +1 -0
- package/dist/tools/notifications.d.ts +20 -0
- package/dist/tools/notifications.d.ts.map +1 -0
- package/dist/tools/notifications.js +266 -0
- package/dist/tools/notifications.js.map +1 -0
- package/dist/tools/people.d.ts +39 -47
- package/dist/tools/people.d.ts.map +1 -1
- package/dist/tools/people.js +148 -109
- package/dist/tools/people.js.map +1 -1
- package/dist/tools/projects.d.ts +19 -0
- package/dist/tools/projects.d.ts.map +1 -0
- package/dist/tools/projects.js +140 -0
- package/dist/tools/projects.js.map +1 -0
- package/dist/tools/publishers.d.ts +16 -0
- package/dist/tools/publishers.d.ts.map +1 -0
- package/dist/tools/publishers.js +69 -0
- package/dist/tools/publishers.js.map +1 -0
- package/dist/tools/purchases.d.ts +15 -0
- package/dist/tools/purchases.d.ts.map +1 -0
- package/dist/tools/purchases.js +63 -0
- package/dist/tools/purchases.js.map +1 -0
- package/dist/tools/recordings.d.ts +9 -9
- package/dist/tools/recordings.d.ts.map +1 -1
- package/dist/tools/recordings.js +136 -48
- package/dist/tools/recordings.js.map +1 -1
- package/dist/tools/recovery-hints.d.ts +14 -0
- package/dist/tools/recovery-hints.d.ts.map +1 -0
- package/dist/tools/recovery-hints.js +277 -0
- package/dist/tools/recovery-hints.js.map +1 -0
- package/dist/tools/releases.d.ts +18 -0
- package/dist/tools/releases.d.ts.map +1 -0
- package/dist/tools/releases.js +128 -0
- package/dist/tools/releases.js.map +1 -0
- package/dist/tools/royalties.d.ts +23 -0
- package/dist/tools/royalties.d.ts.map +1 -0
- package/dist/tools/royalties.js +257 -0
- package/dist/tools/royalties.js.map +1 -0
- package/dist/tools/search.d.ts +21 -21
- package/dist/tools/search.d.ts.map +1 -1
- package/dist/tools/search.js +3 -3
- package/dist/tools/search.js.map +1 -1
- package/dist/tools/send.d.ts +17 -0
- package/dist/tools/send.d.ts.map +1 -0
- package/dist/tools/send.js +185 -0
- package/dist/tools/send.js.map +1 -0
- package/dist/tools/sessions.d.ts +18 -0
- package/dist/tools/sessions.d.ts.map +1 -0
- package/dist/tools/sessions.js +115 -0
- package/dist/tools/sessions.js.map +1 -0
- package/dist/tools/settings.d.ts +18 -0
- package/dist/tools/settings.d.ts.map +1 -0
- package/dist/tools/settings.js +96 -0
- package/dist/tools/settings.js.map +1 -0
- package/dist/tools/share-links.d.ts +19 -0
- package/dist/tools/share-links.d.ts.map +1 -0
- package/dist/tools/share-links.js +121 -0
- package/dist/tools/share-links.js.map +1 -0
- package/dist/tools/split-sheets.d.ts +25 -0
- package/dist/tools/split-sheets.d.ts.map +1 -0
- package/dist/tools/split-sheets.js +307 -0
- package/dist/tools/split-sheets.js.map +1 -0
- package/dist/tools/team.d.ts +22 -0
- package/dist/tools/team.d.ts.map +1 -0
- package/dist/tools/team.js +134 -0
- package/dist/tools/team.js.map +1 -0
- package/dist/tools/telegram.d.ts +21 -0
- package/dist/tools/telegram.d.ts.map +1 -0
- package/dist/tools/telegram.js +141 -0
- package/dist/tools/telegram.js.map +1 -0
- package/dist/tools/uploads.d.ts +17 -0
- package/dist/tools/uploads.d.ts.map +1 -0
- package/dist/tools/uploads.js +156 -0
- package/dist/tools/uploads.js.map +1 -0
- package/dist/tools/works.d.ts +39 -47
- package/dist/tools/works.d.ts.map +1 -1
- package/dist/tools/works.js +216 -116
- package/dist/tools/works.js.map +1 -1
- package/package.json +1 -1
package/dist/prompts/index.js
CHANGED
|
@@ -113,9 +113,9 @@ export class PromptRegistry {
|
|
|
113
113
|
|
|
114
114
|
Use the following tools to gather data:
|
|
115
115
|
1. pica_catalog_stats - Get overall statistics
|
|
116
|
-
2.
|
|
117
|
-
3.
|
|
118
|
-
4.
|
|
116
|
+
2. pica_works_query - Review works data
|
|
117
|
+
3. pica_people_query - Review people data
|
|
118
|
+
4. pica_recordings_query - Review recordings data
|
|
119
119
|
|
|
120
120
|
Analyze and report on:
|
|
121
121
|
- Overall catalog size and composition
|
|
@@ -144,8 +144,8 @@ Please provide specific, actionable insights.`,
|
|
|
144
144
|
text: `Please help me find potential duplicate works and people in my catalog.
|
|
145
145
|
|
|
146
146
|
Use these tools:
|
|
147
|
-
1.
|
|
148
|
-
2.
|
|
147
|
+
1. pica_works_query - Get all works
|
|
148
|
+
2. pica_people_query - Get all people
|
|
149
149
|
|
|
150
150
|
Look for:
|
|
151
151
|
- Works with very similar or identical titles
|
|
@@ -177,8 +177,8 @@ Be thorough but conservative - only flag items that have a strong likelihood of
|
|
|
177
177
|
text: `Please identify works and people that could benefit from metadata enrichment.
|
|
178
178
|
|
|
179
179
|
Use these tools:
|
|
180
|
-
1.
|
|
181
|
-
2.
|
|
180
|
+
1. pica_works_query - Get all works
|
|
181
|
+
2. pica_people_query - Get all people
|
|
182
182
|
|
|
183
183
|
Identify:
|
|
184
184
|
- People without ISNI identifiers who might have one
|
|
@@ -211,9 +211,9 @@ Focus on people and works where enrichment would add the most value.`,
|
|
|
211
211
|
text: `Please review unverified works and suggest which ones are ready for verification.
|
|
212
212
|
|
|
213
213
|
Use these tools:
|
|
214
|
-
1.
|
|
214
|
+
1. pica_works_query with verified: false - Get unverified works
|
|
215
215
|
2. pica_recordings_by_work - Check if works have recordings
|
|
216
|
-
3.
|
|
216
|
+
3. pica_people_query - Check for associated people/credits
|
|
217
217
|
|
|
218
218
|
For each unverified work, assess:
|
|
219
219
|
- Does it have complete metadata (title, type, duration)?
|
|
@@ -245,9 +245,9 @@ Provide specific recommendations for each category, including what's needed to m
|
|
|
245
245
|
text: `Please assess the health of my music catalog using the PICA Score.
|
|
246
246
|
|
|
247
247
|
Use these tools:
|
|
248
|
-
1.
|
|
248
|
+
1. pica_works_inspect({ sections: ["score"] }) - Get the PICA Score with pillar breakdown
|
|
249
249
|
2. pica_catalog_stats - Get raw catalog statistics for additional context
|
|
250
|
-
3.
|
|
250
|
+
3. pica_works_query - Sample works data to understand quality
|
|
251
251
|
|
|
252
252
|
Analyze:
|
|
253
253
|
- The composite score and grade — is this catalog ready for commercial use?
|
|
@@ -278,9 +278,9 @@ Provide:
|
|
|
278
278
|
text: `Please audit the credits across my music catalog to find gaps and issues.
|
|
279
279
|
|
|
280
280
|
Use these tools:
|
|
281
|
-
1.
|
|
281
|
+
1. pica_works_query - Get all works
|
|
282
282
|
2. pica_credits_list - Check credits for each work (sample at least 20 works, prioritizing recent ones)
|
|
283
|
-
3.
|
|
283
|
+
3. pica_people_query - Cross-reference credited people
|
|
284
284
|
|
|
285
285
|
Look for:
|
|
286
286
|
- Works with no credits at all (no collaborators assigned)
|
|
@@ -327,7 +327,7 @@ After importing, guide me through closing the loop on each work:
|
|
|
327
327
|
- Who wrote these songs? (pica_credits_update — add writers and set splits)
|
|
328
328
|
- Are there publishing details registered? (pica_enrich_work_mlc — check MLC)
|
|
329
329
|
- Do I have audio files to upload? (pica_audio_presigned_upload — for analysis)
|
|
330
|
-
- What identifiers are missing? (
|
|
330
|
+
- What identifiers are missing? (pica_works_inspect with sections: ["enrichment"] — check coverage)
|
|
331
331
|
|
|
332
332
|
Don't push — let me stop whenever I want. But always let me know what the next valuable step would be.
|
|
333
333
|
|
|
@@ -346,8 +346,8 @@ Important: I can always log in at withpica.com to see, verify, and manage everyt
|
|
|
346
346
|
*/
|
|
347
347
|
getCloseTheLoopPrompt(workId) {
|
|
348
348
|
const workInstruction = workId
|
|
349
|
-
? `Check completeness for work ${workId} using
|
|
350
|
-
: `Ask me which work I'd like to check, or use
|
|
349
|
+
? `Check completeness for work ${workId} using pica_works_inspect({ id: "${workId || "..."}", sections: ["completeness"] }).`
|
|
350
|
+
: `Ask me which work I'd like to check, or use pica_works_query({ health_filter: "low_completeness" }) to find works that need the most attention.`;
|
|
351
351
|
return {
|
|
352
352
|
messages: [
|
|
353
353
|
{
|
|
@@ -359,9 +359,9 @@ Important: I can always log in at withpica.com to see, verify, and manage everyt
|
|
|
359
359
|
${workInstruction}
|
|
360
360
|
|
|
361
361
|
For the work, check every aspect of completeness:
|
|
362
|
-
1.
|
|
362
|
+
1. pica_works_inspect with sections: ["completeness"] — get the full gap analysis
|
|
363
363
|
2. pica_credits_list — check if credits and splits are assigned
|
|
364
|
-
3.
|
|
364
|
+
3. pica_works_inspect with sections: ["enrichment"] — check what enrichment sources have been tried
|
|
365
365
|
|
|
366
366
|
For each gap found, offer a specific action:
|
|
367
367
|
- Missing credits → "Want me to add writers? Who wrote this song?"
|
|
@@ -371,7 +371,7 @@ For each gap found, offer a specific action:
|
|
|
371
371
|
- No audio → "Got a master recording to upload?"
|
|
372
372
|
- Audio not analysed → "Want me to analyse the audio for BPM, key, and mood?"
|
|
373
373
|
- No agreements → "Is there a publishing agreement for this work?"
|
|
374
|
-
- Not registered → "Want me to check registration status?" (
|
|
374
|
+
- Not registered → "Want me to check registration status?" (pica_works_inspect with sections: ["registration"])
|
|
375
375
|
|
|
376
376
|
Work through each gap one at a time. Let me skip any I'm not ready for. After each fix, check if the completeness score improved.
|
|
377
377
|
|
|
@@ -394,8 +394,8 @@ Keep it conversational — don't list all gaps at once. Start with the most impo
|
|
|
394
394
|
text: `Help me check which of my works are registered and which still need registration.
|
|
395
395
|
|
|
396
396
|
Steps:
|
|
397
|
-
1.
|
|
398
|
-
2. For works that aren't registered, use
|
|
397
|
+
1. pica_works_query — list works, then use pica_works_inspect with sections: ["registration"] to check registration status across PROs (PRS, MCPS, PPL, MLC)
|
|
398
|
+
2. For works that aren't registered, use pica_works_inspect with sections: ["registration", "completeness"] on a sample to understand what's blocking registration
|
|
399
399
|
3. Identify common blockers:
|
|
400
400
|
- Missing ISWC (needed for PRS/MCPS) → suggest pica_enrich_work_mlc
|
|
401
401
|
- Missing ISRC (needed for PPL) → check if recordings have ISRCs
|
|
@@ -439,7 +439,7 @@ If the catalog is EMPTY (0 works):
|
|
|
439
439
|
→ Use the new-catalog-setup workflow. Welcome me, explain how to import music (Spotify link, spreadsheet, screenshot, or just describe songs), and get started.
|
|
440
440
|
|
|
441
441
|
If the catalog has works but LOW completeness (PICA Score below 50 or many gaps):
|
|
442
|
-
→ Use
|
|
442
|
+
→ Use pica_works_query({ health_filter: "low_completeness" }) to find the works that need the most attention.
|
|
443
443
|
→ Pick the top 3 and offer to run close-the-loop on them one at a time.
|
|
444
444
|
→ Tell me: "Your catalog has [N] works but many have gaps. Want me to start closing the loop on the ones that need the most attention?"
|
|
445
445
|
|
|
@@ -453,7 +453,7 @@ If the catalog is HEALTHY (score above 70, few gaps):
|
|
|
453
453
|
→ Use assess-catalog-health for a maintenance check. Tell me: "Your catalog looks solid. Here's a quick health check and what could still improve."
|
|
454
454
|
|
|
455
455
|
If none of the above clearly applies:
|
|
456
|
-
→ Use pica_catalog_stats and
|
|
456
|
+
→ Use pica_catalog_stats and pica_works_inspect({ sections: ["score"] }) to give me a quick summary, then ask what I'd like to focus on.
|
|
457
457
|
|
|
458
458
|
Step 3 — Explain your routing:
|
|
459
459
|
Tell me WHY you chose the workflow you did, in one sentence. Example: "Your catalog has 42 works but 28 are missing credits, so let's close those gaps first."
|
|
@@ -481,7 +481,7 @@ Important: Don't run all workflows at once. Pick the single most valuable action
|
|
|
481
481
|
|
|
482
482
|
Steps:
|
|
483
483
|
1. pica_catalog_stats — get an overview of the catalog
|
|
484
|
-
2.
|
|
484
|
+
2. pica_works_query — sample works to check what's missing for sync readiness
|
|
485
485
|
3. For each work, check:
|
|
486
486
|
- Has audio been uploaded? (supervisors need to hear it)
|
|
487
487
|
- Has audio been analysed? (BPM, key, energy, mood — needed for search)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/prompts/index.ts"],"names":[],"mappings":"AAAA,6DAA6D;AA6B7D,MAAM,OAAO,cAAc;IACzB;;OAEG;IACH,WAAW;QACT,OAAO;YACL;gBACE,IAAI,EAAE,iBAAiB;gBACvB,WAAW,EACT,+FAA+F;gBACjG,SAAS,EAAE,EAAE;aACd;YACD;gBACE,IAAI,EAAE,iBAAiB;gBACvB,WAAW,EACT,kEAAkE;gBACpE,SAAS,EAAE,EAAE;aACd;YACD;gBACE,IAAI,EAAE,iBAAiB;gBACvB,WAAW,EACT,2FAA2F;gBAC7F,SAAS,EAAE,EAAE;aACd;YACD;gBACE,IAAI,EAAE,cAAc;gBACpB,WAAW,EACT,2EAA2E;gBAC7E,SAAS,E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MAAM;wBACZ,IAAI,EAAE;;;;;;;;;;;;;;;;;;mGAkBiF;qBACxF;iBACF;aACF;SACF,CAAC;IACJ,CAAC;IAED;;OAEG;IACK,4BAA4B;QAClC,OAAO;YACL,QAAQ,EAAE;gBACR;oBACE,IAAI,EAAE,MAAM;oBACZ,OAAO,EAAE;wBACP,IAAI,EAAE,MAAM;wBACZ,IAAI,EAAE;;;;;;;;;;;;;;;;;8GAiB4F;qBACnG;iBACF;aACF;SACF,CAAC;IACJ,CAAC;IAED;;OAEG;IACK,qBAAqB;QAC3B,OAAO;YACL,QAAQ,EAAE;gBACR;oBACE,IAAI,EAAE,MAAM;oBACZ,OAAO,EAAE;wBACP,IAAI,EAAE,MAAM;wBACZ,IAAI,EAAE;;;;;;;;;;;;;;;;;;;;iFAoB+D;qBACtE;iBACF;aACF;SACF,CAAC;IACJ,CAAC;IAED;;OAEG;IACK,wBAAwB;QAC9B,OAAO;YACL,QAAQ,EAAE;gBACR;oBACE,IAAI,EAAE,MAAM;oBACZ,OAAO,EAAE;wBACP,IAAI,EAAE,MAAM;wBACZ,IAAI,EAAE;;;;;;;;;;;;;;;;;;;;;;;;6IAwB2H;qBAClI;iBACF;aACF;SACF,CAAC;IACJ,CAAC;IAED;;OAEG;IACK,qBAAqB,CAAC,MAAe;QAC3C,MAAM,eAAe,GAAG,MAAM;YAC5B,CAAC,CAAC,+BAA+B,MAAM,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/prompts/index.ts"],"names":[],"mappings":"AAAA,6DAA6D;AA6B7D,MAAM,OAAO,cAAc;IACzB;;OAEG;IACH,WAAW;QACT,OAAO;YACL;gBACE,IAAI,EAAE,iBAAiB;gBACvB,WAAW,EACT,+FAA+F;gBACjG,SAAS,EAAE,EAAE;aACd;YACD;gBACE,IAAI,EAAE,iBAAiB;gBACvB,WAAW,EACT,kEAAkE;gBACpE,SAAS,EAAE,EAAE;aACd;YACD;gBACE,IAAI,EAAE,iBAAiB;gBACvB,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C5F;iBACF;aACF;SACF,CAAC;IACJ,CAAC;IAED;;OAEG;IACK,wBAAwB;QAC9B,OAAO;YACL,QAAQ,EAAE;gBACR;oBACE,IAAI,EAAE,MAAM;oBACZ,OAAO,EAAE;wBACP,IAAI,EAAE,MAAM;wBACZ,IAAI,EAAE;;;;;;;;;;;;;;;;;;;;;mDAqBiC;qBACxC;iBACF;aACF;SACF,CAAC;IACJ,CAAC;IAED;;OAEG;IACK,2BAA2B;QACjC,OAAO;YACL,QAAQ,EAAE;gBACR;oBACE,IAAI,EAAE,MAAM;oBACZ,OAAO,EAAE;wBACP,IAAI,EAAE,MAAM;wBACZ,IAAI,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gIAiC8G;qBACrH;iBACF;aACF;SACF,CAAC;IACJ,CAAC;IAED;;OAEG;IACK,uBAAuB;QAC7B,OAAO;YACL,QAAQ,EAAE;gBACR;oBACE,IAAI,EAAE,MAAM;oBACZ,OAAO,EAAE;wBACP,IAAI,EAAE,MAAM;wBACZ,IAAI,EAAE;;;;;;;;;;;;;;;;;;;;;;;0GAuBwF;qBAC/F;iBACF;aACF;SACF,CAAC;IACJ,CAAC;CACF"}
|
|
@@ -2,63 +2,65 @@
|
|
|
2
2
|
* Resource Registry for MCP Server
|
|
3
3
|
* Manages read-only data resources that AI assistants can access
|
|
4
4
|
*/
|
|
5
|
-
import { PicaClient } from "
|
|
5
|
+
import { PicaClient } from "@withpica/mcp-sdk";
|
|
6
|
+
import { ServerConfig } from "../config.js";
|
|
6
7
|
export interface ResourceDefinition {
|
|
7
|
-
uri: string;
|
|
8
|
-
name: string;
|
|
9
|
-
description: string;
|
|
10
|
-
mimeType: string;
|
|
11
|
-
}
|
|
12
|
-
export interface ResourceContent {
|
|
13
|
-
contents: Array<{
|
|
14
8
|
uri: string;
|
|
9
|
+
name: string;
|
|
10
|
+
description: string;
|
|
15
11
|
mimeType: string;
|
|
16
|
-
|
|
17
|
-
|
|
12
|
+
}
|
|
13
|
+
export interface ResourceContent {
|
|
14
|
+
contents: Array<{
|
|
15
|
+
uri: string;
|
|
16
|
+
mimeType: string;
|
|
17
|
+
text: string;
|
|
18
|
+
}>;
|
|
18
19
|
}
|
|
19
20
|
export type ResourceResult = any;
|
|
20
21
|
export declare class ResourceRegistry {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
22
|
+
private pica;
|
|
23
|
+
private config?;
|
|
24
|
+
constructor(pica: PicaClient | null, config?: ServerConfig);
|
|
25
|
+
/**
|
|
26
|
+
* List all available resources
|
|
27
|
+
*/
|
|
28
|
+
listResources(): ResourceDefinition[];
|
|
29
|
+
/**
|
|
30
|
+
* Read a resource by URI
|
|
31
|
+
*/
|
|
32
|
+
readResource(uri: string): Promise<any>;
|
|
33
|
+
/**
|
|
34
|
+
* Get OpenAPI specification resource
|
|
35
|
+
*/
|
|
36
|
+
private getOpenAPISpec;
|
|
37
|
+
/**
|
|
38
|
+
* Get works list resource
|
|
39
|
+
*/
|
|
40
|
+
private getWorksList;
|
|
41
|
+
/**
|
|
42
|
+
* Get people list resource
|
|
43
|
+
*/
|
|
44
|
+
private getPeopleList;
|
|
45
|
+
/**
|
|
46
|
+
* Get recordings list resource
|
|
47
|
+
*/
|
|
48
|
+
private getRecordingsList;
|
|
49
|
+
/**
|
|
50
|
+
* Get catalog statistics resource
|
|
51
|
+
*/
|
|
52
|
+
private getCatalogStats;
|
|
53
|
+
/**
|
|
54
|
+
* Get catalog health (PICA Score) resource
|
|
55
|
+
*/
|
|
56
|
+
private getCatalogHealth;
|
|
57
|
+
/**
|
|
58
|
+
* Get workspace context resource — aggregated orientation for agents
|
|
59
|
+
*/
|
|
60
|
+
private getWorkspaceContext;
|
|
61
|
+
/**
|
|
62
|
+
* Get recent events resource — webhook deliveries
|
|
63
|
+
*/
|
|
64
|
+
private getRecentEvents;
|
|
63
65
|
}
|
|
64
|
-
//# sourceMappingURL=index.d.ts.map
|
|
66
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/resources/index.ts"],"names":[],"mappings":"AAEA;;;GAGG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/resources/index.ts"],"names":[],"mappings":"AAEA;;;GAGG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAO/C,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAK5C,MAAM,WAAW,kBAAkB;IACjC,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,eAAe;IAC9B,QAAQ,EAAE,KAAK,CAAC;QACd,GAAG,EAAE,MAAM,CAAC;QACZ,QAAQ,EAAE,MAAM,CAAC;QACjB,IAAI,EAAE,MAAM,CAAC;KACd,CAAC,CAAC;CACJ;AAED,MAAM,MAAM,cAAc,GAAG,GAAG,CAAC;AAEjC,qBAAa,gBAAgB;IAC3B,OAAO,CAAC,IAAI,CAAoB;IAChC,OAAO,CAAC,MAAM,CAAC,CAAe;gBAElB,IAAI,EAAE,UAAU,GAAG,IAAI,EAAE,MAAM,CAAC,EAAE,YAAY;IAK1D;;OAEG;IACH,aAAa,IAAI,kBAAkB,EAAE;IA8FrC;;OAEG;IACG,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC;IA8G7C;;OAEG;IACH,OAAO,CAAC,cAAc;IA6BtB;;OAEG;YACW,YAAY;IA4B1B;;OAEG;YACW,aAAa;IA4B3B;;OAEG;YACW,iBAAiB;IA2B/B;;OAEG;YACW,eAAe;IAoD7B;;OAEG;YACW,gBAAgB;IAc9B;;OAEG;YACW,mBAAmB;IAcjC;;OAEG;YACW,eAAe;CAa9B"}
|
package/dist/resources/index.js
CHANGED
|
@@ -1,78 +1,123 @@
|
|
|
1
1
|
// Copyright (c) 2024-2026 Withpica Ltd. All rights reserved.
|
|
2
|
-
import { ResourceError } from "
|
|
2
|
+
import { ResourceError } from "@withpica/mcp-utils";
|
|
3
3
|
import { readFileSync } from "fs";
|
|
4
4
|
import { join } from "path";
|
|
5
5
|
import { WITHPICA_PRIMER } from "./llms-primer.js";
|
|
6
|
+
import { UPLOAD_HTML } from "../apps/upload.js";
|
|
7
|
+
import { DOWNLOAD_HTML } from "../apps/download.js";
|
|
8
|
+
import { PICA_STORAGE_CONNECT_DOMAINS } from "../apps/shared.js";
|
|
6
9
|
export class ResourceRegistry {
|
|
7
10
|
pica;
|
|
8
|
-
|
|
11
|
+
config;
|
|
12
|
+
constructor(pica, config) {
|
|
9
13
|
this.pica = pica;
|
|
14
|
+
this.config = config;
|
|
10
15
|
}
|
|
11
16
|
/**
|
|
12
17
|
* List all available resources
|
|
13
18
|
*/
|
|
14
19
|
listResources() {
|
|
15
|
-
|
|
20
|
+
const resources = [
|
|
16
21
|
{
|
|
17
|
-
uri: "
|
|
18
|
-
name: "
|
|
19
|
-
description: "
|
|
22
|
+
uri: "pica://welcome",
|
|
23
|
+
name: "Welcome to PICA",
|
|
24
|
+
description: "Getting started guide — how to sign in and what you can do",
|
|
20
25
|
mimeType: "text/markdown",
|
|
21
26
|
},
|
|
22
|
-
{
|
|
23
|
-
uri: "works://list",
|
|
24
|
-
name: "All Works",
|
|
25
|
-
description: "Complete list of musical works in the catalog",
|
|
26
|
-
mimeType: "application/json",
|
|
27
|
-
},
|
|
28
|
-
{
|
|
29
|
-
uri: "people://list",
|
|
30
|
-
name: "All People",
|
|
31
|
-
description: "Complete list of people (artists, composers, etc.)",
|
|
32
|
-
mimeType: "application/json",
|
|
33
|
-
},
|
|
34
|
-
{
|
|
35
|
-
uri: "recordings://list",
|
|
36
|
-
name: "All Recordings",
|
|
37
|
-
description: "Complete list of recordings",
|
|
38
|
-
mimeType: "application/json",
|
|
39
|
-
},
|
|
40
|
-
{
|
|
41
|
-
uri: "catalog://stats",
|
|
42
|
-
name: "Catalog Statistics",
|
|
43
|
-
description: "Statistics and metrics about the catalog",
|
|
44
|
-
mimeType: "application/json",
|
|
45
|
-
},
|
|
46
|
-
{
|
|
47
|
-
uri: "catalog://health",
|
|
48
|
-
name: "Catalog Health (PICA Score)",
|
|
49
|
-
description: "PICA Score — composite legibility index (0-100) with grade, 4-pillar breakdown, and actionable suggestions",
|
|
50
|
-
mimeType: "application/json",
|
|
51
|
-
},
|
|
52
|
-
{
|
|
53
|
-
uri: "workspace://context",
|
|
54
|
-
name: "Workspace Context",
|
|
55
|
-
description: "Aggregated workspace orientation — org info, catalog stats, health score, and top priorities in one call",
|
|
56
|
-
mimeType: "application/json",
|
|
57
|
-
},
|
|
58
|
-
{
|
|
59
|
-
uri: "events://recent",
|
|
60
|
-
name: "Recent Events",
|
|
61
|
-
description: "Recent webhook delivery events — what happened in this workspace recently",
|
|
62
|
-
mimeType: "application/json",
|
|
63
|
-
},
|
|
64
|
-
{
|
|
65
|
-
uri: "api://openapi",
|
|
66
|
-
name: "OpenAPI Specification",
|
|
67
|
-
description: "OpenAPI 3.1 spec for the top 20 PICA API endpoints — works, people, recordings, agreements, credits, search, health",
|
|
68
|
-
mimeType: "text/yaml",
|
|
69
|
-
},
|
|
70
27
|
];
|
|
28
|
+
if (this.config?.lobbyMode || !this.pica) {
|
|
29
|
+
return resources;
|
|
30
|
+
}
|
|
31
|
+
resources.push({
|
|
32
|
+
uri: "llms://primer",
|
|
33
|
+
name: "PICA Domain Primer",
|
|
34
|
+
description: "Plain-language description of PICA's domain model, entity relationships, and recommended agent workflows. Read this first.",
|
|
35
|
+
mimeType: "text/markdown",
|
|
36
|
+
}, {
|
|
37
|
+
uri: "works://list",
|
|
38
|
+
name: "All Works",
|
|
39
|
+
description: "Complete list of musical works in the catalog",
|
|
40
|
+
mimeType: "application/json",
|
|
41
|
+
}, {
|
|
42
|
+
uri: "people://list",
|
|
43
|
+
name: "All People",
|
|
44
|
+
description: "Complete list of people (artists, composers, etc.)",
|
|
45
|
+
mimeType: "application/json",
|
|
46
|
+
}, {
|
|
47
|
+
uri: "recordings://list",
|
|
48
|
+
name: "All Recordings",
|
|
49
|
+
description: "Complete list of recordings",
|
|
50
|
+
mimeType: "application/json",
|
|
51
|
+
}, {
|
|
52
|
+
uri: "catalog://stats",
|
|
53
|
+
name: "Catalog Statistics",
|
|
54
|
+
description: "Statistics and metrics about the catalog",
|
|
55
|
+
mimeType: "application/json",
|
|
56
|
+
}, {
|
|
57
|
+
uri: "catalog://health",
|
|
58
|
+
name: "Catalog Health (PICA Score)",
|
|
59
|
+
description: "PICA Score — composite legibility index (0-100) with grade, 4-pillar breakdown, and actionable suggestions",
|
|
60
|
+
mimeType: "application/json",
|
|
61
|
+
}, {
|
|
62
|
+
uri: "workspace://context",
|
|
63
|
+
name: "Workspace Context",
|
|
64
|
+
description: "Aggregated workspace orientation — org info, catalog stats, health score, and top priorities in one call",
|
|
65
|
+
mimeType: "application/json",
|
|
66
|
+
}, {
|
|
67
|
+
uri: "events://recent",
|
|
68
|
+
name: "Recent Events",
|
|
69
|
+
description: "Recent webhook delivery events — what happened in this workspace recently",
|
|
70
|
+
mimeType: "application/json",
|
|
71
|
+
}, {
|
|
72
|
+
uri: "api://openapi",
|
|
73
|
+
name: "OpenAPI Specification",
|
|
74
|
+
description: "OpenAPI 3.1 spec for the top 20 PICA API endpoints — works, people, recordings, agreements, credits, search, health",
|
|
75
|
+
mimeType: "text/yaml",
|
|
76
|
+
}, {
|
|
77
|
+
uri: "ui://pica/upload",
|
|
78
|
+
name: "Upload Files",
|
|
79
|
+
description: "Generic file upload card — drop zone for audio, photos, documents, anything",
|
|
80
|
+
mimeType: "text/html;profile=mcp-app",
|
|
81
|
+
}, {
|
|
82
|
+
uri: "ui://pica/download",
|
|
83
|
+
name: "Download File",
|
|
84
|
+
description: "File download card — shows file metadata and a download button",
|
|
85
|
+
mimeType: "text/html;profile=mcp-app",
|
|
86
|
+
});
|
|
87
|
+
return resources;
|
|
71
88
|
}
|
|
72
89
|
/**
|
|
73
90
|
* Read a resource by URI
|
|
74
91
|
*/
|
|
75
92
|
async readResource(uri) {
|
|
93
|
+
switch (uri) {
|
|
94
|
+
case "pica://welcome":
|
|
95
|
+
return {
|
|
96
|
+
contents: [
|
|
97
|
+
{
|
|
98
|
+
uri: "pica://welcome",
|
|
99
|
+
mimeType: "text/markdown",
|
|
100
|
+
text: "# welcome to PICA\n\n" +
|
|
101
|
+
"PICA manages your music catalog — works, recordings, credits, agreements, and more.\n\n" +
|
|
102
|
+
"## get started\n\n" +
|
|
103
|
+
'Say **"sign me in"** and provide your email address. ' +
|
|
104
|
+
"You'll receive a magic link — click it, and all tools unlock automatically.\n\n" +
|
|
105
|
+
"No API key needed. No config files. Just talk.\n\n" +
|
|
106
|
+
"## what you can do after signing in\n\n" +
|
|
107
|
+
"- Add and manage works, recordings, and credits\n" +
|
|
108
|
+
"- Enrich metadata from Spotify, MusicBrainz, MLC, and more\n" +
|
|
109
|
+
"- Generate exports (CSV, NRO, CAR reports)\n" +
|
|
110
|
+
"- Track agreements and splits\n" +
|
|
111
|
+
"- Search your catalog and get health reports\n",
|
|
112
|
+
},
|
|
113
|
+
],
|
|
114
|
+
};
|
|
115
|
+
default:
|
|
116
|
+
break;
|
|
117
|
+
}
|
|
118
|
+
if (!this.pica) {
|
|
119
|
+
throw new ResourceError(`Resource not available in lobby mode: ${uri}`);
|
|
120
|
+
}
|
|
76
121
|
switch (uri) {
|
|
77
122
|
case "llms://primer":
|
|
78
123
|
return {
|
|
@@ -100,6 +145,40 @@ export class ResourceRegistry {
|
|
|
100
145
|
return await this.getRecentEvents();
|
|
101
146
|
case "api://openapi":
|
|
102
147
|
return this.getOpenAPISpec();
|
|
148
|
+
case "ui://pica/upload":
|
|
149
|
+
return {
|
|
150
|
+
contents: [
|
|
151
|
+
{
|
|
152
|
+
uri: "ui://pica/upload",
|
|
153
|
+
mimeType: "text/html;profile=mcp-app",
|
|
154
|
+
text: UPLOAD_HTML,
|
|
155
|
+
_meta: {
|
|
156
|
+
ui: {
|
|
157
|
+
csp: {
|
|
158
|
+
connectDomains: PICA_STORAGE_CONNECT_DOMAINS,
|
|
159
|
+
},
|
|
160
|
+
},
|
|
161
|
+
},
|
|
162
|
+
},
|
|
163
|
+
],
|
|
164
|
+
};
|
|
165
|
+
case "ui://pica/download":
|
|
166
|
+
return {
|
|
167
|
+
contents: [
|
|
168
|
+
{
|
|
169
|
+
uri: "ui://pica/download",
|
|
170
|
+
mimeType: "text/html;profile=mcp-app",
|
|
171
|
+
text: DOWNLOAD_HTML,
|
|
172
|
+
_meta: {
|
|
173
|
+
ui: {
|
|
174
|
+
csp: {
|
|
175
|
+
connectDomains: PICA_STORAGE_CONNECT_DOMAINS,
|
|
176
|
+
},
|
|
177
|
+
},
|
|
178
|
+
},
|
|
179
|
+
},
|
|
180
|
+
],
|
|
181
|
+
};
|
|
103
182
|
default:
|
|
104
183
|
throw new ResourceError(`Resource not found: ${uri}`);
|
|
105
184
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/resources/index.ts"],"names":[],"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AAqB;oBAC1B,QAAQ,EAAE,kBAAkB;oBAC5B,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC;iBACvC;aACF;SACF,CAAC;IACJ,CAAC;IAED;;OAEG;IACK,KAAK,CAAC,eAAe;QAC3B,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,IAAK,CAAC,SAAS,CAAC,eAAe,CAAC,EAAE,CAAC,CAAC;QAE9D,OAAO;YACL,QAAQ,EAAE;gBACR;oBACE,GAAG,EAAE,iBAAiB;oBACtB,QAAQ,EAAE,kBAAkB;oBAC5B,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC;iBACtC;aACF;SACF,CAAC;IACJ,CAAC;CACF"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export declare const WITHPICA_PRIMER = "# PICA \u2014 Music Catalog Management Platform\n\nPICA helps music creators and publishers manage their catalog metadata,\ntrack royalties, and prepare works for registration with collection societies.\n\n## Core Entities\n\n### Work\nA musical composition (song, piece, library track). The central entity.\n- Has: title, ISWC, work_type (song/library/demo), genre, mood, BPM, key\n- Relationships: has many credits (writers/composers), has many recordings,\n has many agreements, may have audio files, may have multimedia\n- Identifiers: ISWC (global), Tunecode (PRS), CAE/IPI (writer)\n\n### Person\nA human involved in music \u2014 writer, composer, performer, producer, publisher.\n- Has: name, email, IPI number, ISNI, MusicBrainz ID, PRO affiliation\n- Relationships: credited on many works, may have recordings, may have agreements\n- Can be enriched via: ISNI, MusicBrainz, Wikidata\n\n### Recording\nA specific audio capture of a work \u2014 the master/sound recording side.\n- Has: title, ISRC, duration, artist, label\n- Relationships: belongs to one work, has credits (performers/producers)\n- Distinct from the work: a work is the composition, a recording is the performance\n\n### Agreement\nA contract governing rights to works \u2014 publishing, sync, distribution.\n- Has: title, type, parties, dates, territory, terms\n- Relationships: covers many works\n- Types: publishing_admin, co_publishing, master_recording, sub_publishing,\n admin_only, distribution, library_music, production, artist_contract,\n termination, report, other\n\n### Import Document\nA canonical representation of an ingested file (royalty statement, CSV import).\n- Has: source (16 formats \u2014 PROs: PRS, ASCAP, BMI, SESAC, SOCAN, APRA, GEMA, SACEM; NROs: PPL, SoundExchange, GVL; Mechanical: MCPS; Distributors: DistroKid, TuneCore, CD Baby; Revenue: YouTube Content ID), period, line items, field mappings, warnings\n- Immutable snapshot of the import event \u2014 not a live view\n- Use pica_import_documents_list to find them, pica_import_documents_get to read\n\n## First Connection\n\nIf you're connecting to this workspace for the first time or don't know where to start,\ninvoke the **workspace-autopilot** prompt. It reads the workspace state and routes you\nto the most valuable workflow automatically.\n\n## Recommended Workflows\n\n1. **Catalog audit**: pica_catalog_stats \u2192 pica_works_query({ health_filter: \"needs_attention\" }) \u2192 pica_works_inspect({ sections: [\"completeness\"] })\n2. **Enrichment**: pica_enrichment_candidates \u2192 pica_enrich_work_spotify/mlc/musicbrainz \u2192 pica_works_inspect (verify)\n3. **Statement reconciliation**: pica_import_documents_query \u2192 pica_import_documents_inspect({ sections: [\"diff\"] })\n4. **Duplicate cleanup**: pica_find_duplicates \u2192 review \u2192 pica_merge_duplicates\n5. **Registration readiness**: pica_works_inspect({ sections: [\"registration\"] }) \u2192 fix gaps \u2192 pica_export_song_registration\n\n## Key Concepts\n\n- **Organisation**: Multi-tenant \u2014 all data scoped to one org. Never cross org boundaries.\n- **PICA Score**: Composite catalog legibility index (0-100, grade A-F). Four pillars:\n identification, documentation, registration, completeness.\n- **Enrichment cascade**: When an identifier is added, external sources\n (MusicBrainz, ISNI, MLC) are queried automatically to fill gaps.\n- **Credits**: Work credits (writers/composers with splits) are distinct from\n recording credits (performers/producers). Different tables, different role enums.\n Work credit roles: writer, composer, arranger, lyricist, producer, performer.\n Recording credit roles: Writer, Composer, Producer, Performer (PascalCase).\n";
|
|
2
|
+
//# sourceMappingURL=llms-primer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"llms-primer.d.ts","sourceRoot":"","sources":["../../src/resources/llms-primer.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,eAAe,kpHAiE3B,CAAC"}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
// Copyright (c) 2024-2026 Withpica Ltd. All rights reserved.
|
|
2
|
+
export const WITHPICA_PRIMER = `# PICA — Music Catalog Management Platform
|
|
3
|
+
|
|
4
|
+
PICA helps music creators and publishers manage their catalog metadata,
|
|
5
|
+
track royalties, and prepare works for registration with collection societies.
|
|
6
|
+
|
|
7
|
+
## Core Entities
|
|
8
|
+
|
|
9
|
+
### Work
|
|
10
|
+
A musical composition (song, piece, library track). The central entity.
|
|
11
|
+
- Has: title, ISWC, work_type (song/library/demo), genre, mood, BPM, key
|
|
12
|
+
- Relationships: has many credits (writers/composers), has many recordings,
|
|
13
|
+
has many agreements, may have audio files, may have multimedia
|
|
14
|
+
- Identifiers: ISWC (global), Tunecode (PRS), CAE/IPI (writer)
|
|
15
|
+
|
|
16
|
+
### Person
|
|
17
|
+
A human involved in music — writer, composer, performer, producer, publisher.
|
|
18
|
+
- Has: name, email, IPI number, ISNI, MusicBrainz ID, PRO affiliation
|
|
19
|
+
- Relationships: credited on many works, may have recordings, may have agreements
|
|
20
|
+
- Can be enriched via: ISNI, MusicBrainz, Wikidata
|
|
21
|
+
|
|
22
|
+
### Recording
|
|
23
|
+
A specific audio capture of a work — the master/sound recording side.
|
|
24
|
+
- Has: title, ISRC, duration, artist, label
|
|
25
|
+
- Relationships: belongs to one work, has credits (performers/producers)
|
|
26
|
+
- Distinct from the work: a work is the composition, a recording is the performance
|
|
27
|
+
|
|
28
|
+
### Agreement
|
|
29
|
+
A contract governing rights to works — publishing, sync, distribution.
|
|
30
|
+
- Has: title, type, parties, dates, territory, terms
|
|
31
|
+
- Relationships: covers many works
|
|
32
|
+
- Types: publishing_admin, co_publishing, master_recording, sub_publishing,
|
|
33
|
+
admin_only, distribution, library_music, production, artist_contract,
|
|
34
|
+
termination, report, other
|
|
35
|
+
|
|
36
|
+
### Import Document
|
|
37
|
+
A canonical representation of an ingested file (royalty statement, CSV import).
|
|
38
|
+
- Has: source (16 formats — PROs: PRS, ASCAP, BMI, SESAC, SOCAN, APRA, GEMA, SACEM; NROs: PPL, SoundExchange, GVL; Mechanical: MCPS; Distributors: DistroKid, TuneCore, CD Baby; Revenue: YouTube Content ID), period, line items, field mappings, warnings
|
|
39
|
+
- Immutable snapshot of the import event — not a live view
|
|
40
|
+
- Use pica_import_documents_list to find them, pica_import_documents_get to read
|
|
41
|
+
|
|
42
|
+
## First Connection
|
|
43
|
+
|
|
44
|
+
If you're connecting to this workspace for the first time or don't know where to start,
|
|
45
|
+
invoke the **workspace-autopilot** prompt. It reads the workspace state and routes you
|
|
46
|
+
to the most valuable workflow automatically.
|
|
47
|
+
|
|
48
|
+
## Recommended Workflows
|
|
49
|
+
|
|
50
|
+
1. **Catalog audit**: pica_catalog_stats → pica_works_query({ health_filter: "needs_attention" }) → pica_works_inspect({ sections: ["completeness"] })
|
|
51
|
+
2. **Enrichment**: pica_enrichment_candidates → pica_enrich_work_spotify/mlc/musicbrainz → pica_works_inspect (verify)
|
|
52
|
+
3. **Statement reconciliation**: pica_import_documents_query → pica_import_documents_inspect({ sections: ["diff"] })
|
|
53
|
+
4. **Duplicate cleanup**: pica_find_duplicates → review → pica_merge_duplicates
|
|
54
|
+
5. **Registration readiness**: pica_works_inspect({ sections: ["registration"] }) → fix gaps → pica_export_song_registration
|
|
55
|
+
|
|
56
|
+
## Key Concepts
|
|
57
|
+
|
|
58
|
+
- **Organisation**: Multi-tenant — all data scoped to one org. Never cross org boundaries.
|
|
59
|
+
- **PICA Score**: Composite catalog legibility index (0-100, grade A-F). Four pillars:
|
|
60
|
+
identification, documentation, registration, completeness.
|
|
61
|
+
- **Enrichment cascade**: When an identifier is added, external sources
|
|
62
|
+
(MusicBrainz, ISNI, MLC) are queried automatically to fill gaps.
|
|
63
|
+
- **Credits**: Work credits (writers/composers with splits) are distinct from
|
|
64
|
+
recording credits (performers/producers). Different tables, different role enums.
|
|
65
|
+
Work credit roles: writer, composer, arranger, lyricist, producer, performer.
|
|
66
|
+
Recording credit roles: Writer, Composer, Producer, Performer (PascalCase).
|
|
67
|
+
`;
|
|
68
|
+
//# sourceMappingURL=llms-primer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"llms-primer.js","sourceRoot":"","sources":["../../src/resources/llms-primer.ts"],"names":[],"mappings":"AAAA,6DAA6D;AAE7D,MAAM,CAAC,MAAM,eAAe,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiE9B,CAAC"}
|