@withpica/mcp-server 2.11.0 → 2.23.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/CHANGELOG.md +639 -1
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +3 -2
- package/dist/config.js.map +1 -1
- package/dist/prompts/index.d.ts +48 -16
- package/dist/prompts/index.d.ts.map +1 -1
- package/dist/prompts/index.js +320 -607
- package/dist/prompts/index.js.map +1 -1
- package/dist/tools/agreement-types.d.ts.map +1 -1
- package/dist/tools/agreement-types.js +14 -129
- package/dist/tools/agreement-types.js.map +1 -1
- package/dist/tools/agreements.d.ts.map +1 -1
- package/dist/tools/agreements.js +11 -109
- package/dist/tools/agreements.js.map +1 -1
- package/dist/tools/assets.d.ts.map +1 -1
- package/dist/tools/assets.js +17 -257
- package/dist/tools/assets.js.map +1 -1
- package/dist/tools/audit.d.ts +19 -0
- package/dist/tools/audit.d.ts.map +1 -0
- package/dist/tools/audit.js +57 -0
- package/dist/tools/audit.js.map +1 -0
- package/dist/tools/bulk.d.ts +7 -1
- package/dist/tools/bulk.d.ts.map +1 -1
- package/dist/tools/bulk.js +24 -2
- package/dist/tools/bulk.js.map +1 -1
- package/dist/tools/credits.d.ts.map +1 -1
- package/dist/tools/credits.js +27 -13
- package/dist/tools/credits.js.map +1 -1
- package/dist/tools/discovery.d.ts.map +1 -1
- package/dist/tools/discovery.js +25 -0
- package/dist/tools/discovery.js.map +1 -1
- package/dist/tools/enrichment.d.ts +47 -0
- package/dist/tools/enrichment.d.ts.map +1 -1
- package/dist/tools/enrichment.js +416 -19
- package/dist/tools/enrichment.js.map +1 -1
- package/dist/tools/index.d.ts.map +1 -1
- package/dist/tools/index.js +17 -0
- package/dist/tools/index.js.map +1 -1
- package/dist/tools/labels.d.ts +20 -0
- package/dist/tools/labels.d.ts.map +1 -0
- package/dist/tools/labels.js +47 -0
- package/dist/tools/labels.js.map +1 -0
- package/dist/tools/metadata.d.ts.map +1 -1
- package/dist/tools/metadata.js +93 -0
- package/dist/tools/metadata.js.map +1 -1
- package/dist/tools/multimedia.d.ts.map +1 -1
- package/dist/tools/multimedia.js +86 -11
- package/dist/tools/multimedia.js.map +1 -1
- package/dist/tools/notes.d.ts.map +1 -1
- package/dist/tools/notes.js +4 -1
- package/dist/tools/notes.js.map +1 -1
- package/dist/tools/people.d.ts +228 -4
- package/dist/tools/people.d.ts.map +1 -1
- package/dist/tools/people.js +238 -262
- package/dist/tools/people.js.map +1 -1
- package/dist/tools/projects.d.ts +1 -0
- package/dist/tools/projects.d.ts.map +1 -1
- package/dist/tools/projects.js +188 -17
- package/dist/tools/projects.js.map +1 -1
- package/dist/tools/publishers.d.ts +15 -1
- package/dist/tools/publishers.d.ts.map +1 -1
- package/dist/tools/publishers.js +43 -9
- package/dist/tools/publishers.js.map +1 -1
- package/dist/tools/recordings.d.ts +53 -2
- package/dist/tools/recordings.d.ts.map +1 -1
- package/dist/tools/recordings.js +185 -122
- package/dist/tools/recordings.js.map +1 -1
- package/dist/tools/recovery-hints.d.ts.map +1 -1
- package/dist/tools/recovery-hints.js +49 -0
- package/dist/tools/recovery-hints.js.map +1 -1
- package/dist/tools/releases.d.ts +19 -1
- package/dist/tools/releases.d.ts.map +1 -1
- package/dist/tools/releases.js +538 -32
- package/dist/tools/releases.js.map +1 -1
- package/dist/tools/sessions.d.ts.map +1 -1
- package/dist/tools/sessions.js +42 -8
- package/dist/tools/sessions.js.map +1 -1
- package/dist/tools/settings.d.ts +4 -0
- package/dist/tools/settings.d.ts.map +1 -1
- package/dist/tools/settings.js +155 -1
- package/dist/tools/settings.js.map +1 -1
- package/dist/tools/share-links.d.ts.map +1 -1
- package/dist/tools/share-links.js +19 -53
- package/dist/tools/share-links.js.map +1 -1
- package/dist/tools/split-sheets.d.ts.map +1 -1
- package/dist/tools/split-sheets.js +3 -42
- package/dist/tools/split-sheets.js.map +1 -1
- package/dist/tools/team.d.ts.map +1 -1
- package/dist/tools/team.js +9 -4
- package/dist/tools/team.js.map +1 -1
- package/dist/tools/works.d.ts +27 -1
- package/dist/tools/works.d.ts.map +1 -1
- package/dist/tools/works.js +119 -219
- package/dist/tools/works.js.map +1 -1
- package/package.json +3 -2
- package/server.json +2 -2
package/dist/prompts/index.js
CHANGED
|
@@ -1,793 +1,506 @@
|
|
|
1
1
|
// Copyright (c) 2024-2026 Withpica Ltd. All rights reserved.
|
|
2
|
-
const SHARED_PREAMBLE = `You are guiding a music creator or professional through PICA, a catalog management platform.
|
|
3
|
-
|
|
4
|
-
Tone: knowledgeable friend (StoryBrand guide, Never Split the Difference empathy). You know the right order of things but you respect their autonomy. Soft nudge, never pushy, never passive. Say what you see, recommend what you'd do, let them choose. The creator is the hero of this story — you're the guide who helps them succeed.
|
|
5
|
-
|
|
6
|
-
Before starting this workflow:
|
|
7
|
-
1. Read workspace://context to understand where they are (catalog size, health, identifiers, integrations)
|
|
8
|
-
2. If a prerequisite for this skill is missing, name it plainly: "I notice you don't have [X] yet. We can continue, but [Y] will work better once [X] is in place. Want to set that up first, or carry on?"
|
|
9
|
-
3. Never block — always offer to continue anyway
|
|
10
|
-
|
|
11
|
-
After completing this workflow:
|
|
12
|
-
- Summarise what changed in one short paragraph
|
|
13
|
-
- Suggest the natural next step: "now that [X] is done, the next valuable thing would be [Y]. want to do that?"
|
|
14
|
-
- If they say no, that's fine. Don't ask twice.
|
|
15
|
-
|
|
16
|
-
Discovery principle: every creator's work has equal discoverability. Catalog quality determines visibility, not fame or follower count.`;
|
|
17
2
|
export class PromptRegistry {
|
|
18
3
|
/**
|
|
19
|
-
* List all available
|
|
4
|
+
* List all available prompts
|
|
20
5
|
*/
|
|
21
6
|
listPrompts() {
|
|
22
7
|
return [
|
|
23
8
|
{
|
|
24
|
-
name: "
|
|
25
|
-
description: "
|
|
9
|
+
name: "analyze-catalog",
|
|
10
|
+
description: "Analyze the music catalog and provide insights about completeness, quality, and opportunities",
|
|
26
11
|
arguments: [],
|
|
27
12
|
},
|
|
28
13
|
{
|
|
29
|
-
name: "
|
|
30
|
-
description: "
|
|
14
|
+
name: "find-duplicates",
|
|
15
|
+
description: "Find potential duplicate works or people that might need merging",
|
|
31
16
|
arguments: [],
|
|
32
17
|
},
|
|
33
18
|
{
|
|
34
|
-
name: "
|
|
35
|
-
description: "
|
|
19
|
+
name: "enrich-metadata",
|
|
20
|
+
description: "Suggest works and people that could be enriched from external sources (ISNI, MusicBrainz)",
|
|
36
21
|
arguments: [],
|
|
37
22
|
},
|
|
38
23
|
{
|
|
39
|
-
name: "
|
|
40
|
-
description: "
|
|
24
|
+
name: "verify-works",
|
|
25
|
+
description: "Review unverified works and suggest which ones are ready for verification",
|
|
41
26
|
arguments: [],
|
|
42
27
|
},
|
|
43
28
|
{
|
|
44
|
-
name: "
|
|
45
|
-
description: "
|
|
46
|
-
arguments: [
|
|
47
|
-
{
|
|
48
|
-
name: "work_id",
|
|
49
|
-
description: "Optional work ID to check completeness for a specific work",
|
|
50
|
-
required: false,
|
|
51
|
-
},
|
|
52
|
-
],
|
|
29
|
+
name: "assess-catalog-health",
|
|
30
|
+
description: "Get the PICA Score and provide a detailed assessment of catalog health with prioritized improvement actions",
|
|
31
|
+
arguments: [],
|
|
53
32
|
},
|
|
54
33
|
{
|
|
55
|
-
name: "
|
|
56
|
-
description: "Find
|
|
34
|
+
name: "audit-credits",
|
|
35
|
+
description: "Find works with missing or incomplete credits and flag potential split issues",
|
|
57
36
|
arguments: [],
|
|
58
37
|
},
|
|
59
38
|
{
|
|
60
|
-
name: "
|
|
61
|
-
description: "
|
|
39
|
+
name: "new-catalog-setup",
|
|
40
|
+
description: "Get started with PICA — import your music however you like (Spotify link, spreadsheet, screenshot, or just describe your songs)",
|
|
62
41
|
arguments: [],
|
|
63
42
|
},
|
|
64
43
|
{
|
|
65
|
-
name: "
|
|
66
|
-
description: "
|
|
44
|
+
name: "close-the-loop",
|
|
45
|
+
description: "Check what's missing on a specific work and offer to fix each gap",
|
|
46
|
+
arguments: [
|
|
47
|
+
{
|
|
48
|
+
name: "work_id",
|
|
49
|
+
description: "The work ID to check completeness for",
|
|
50
|
+
required: true,
|
|
51
|
+
},
|
|
52
|
+
],
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
name: "register-my-works",
|
|
56
|
+
description: "Check registration status across PROs and help prepare works for registration",
|
|
67
57
|
arguments: [],
|
|
68
58
|
},
|
|
69
59
|
{
|
|
70
|
-
name: "
|
|
71
|
-
description: "
|
|
60
|
+
name: "prepare-for-sync",
|
|
61
|
+
description: "Get your catalog sync-ready — check audio analysis, mood tags, and completeness",
|
|
72
62
|
arguments: [],
|
|
73
63
|
},
|
|
74
64
|
{
|
|
75
|
-
name: "
|
|
76
|
-
description: "
|
|
65
|
+
name: "workspace-autopilot",
|
|
66
|
+
description: "Assess the workspace state and route to the right workflow — use this when you first connect or don't know where to start",
|
|
77
67
|
arguments: [],
|
|
78
68
|
},
|
|
79
69
|
];
|
|
80
70
|
}
|
|
81
71
|
/**
|
|
82
|
-
* Get a
|
|
72
|
+
* Get a prompt by name
|
|
83
73
|
*/
|
|
84
74
|
async getPrompt(name, args) {
|
|
85
75
|
switch (name) {
|
|
86
|
-
case "
|
|
87
|
-
return this.
|
|
88
|
-
case "
|
|
89
|
-
return this.
|
|
90
|
-
case "
|
|
91
|
-
return this.
|
|
92
|
-
case "
|
|
93
|
-
return this.
|
|
76
|
+
case "analyze-catalog":
|
|
77
|
+
return this.getAnalyzeCatalogPrompt();
|
|
78
|
+
case "find-duplicates":
|
|
79
|
+
return this.getFindDuplicatesPrompt();
|
|
80
|
+
case "enrich-metadata":
|
|
81
|
+
return this.getEnrichMetadataPrompt();
|
|
82
|
+
case "verify-works":
|
|
83
|
+
return this.getVerifyWorksPrompt();
|
|
84
|
+
case "assess-catalog-health":
|
|
85
|
+
return this.getAssessCatalogHealthPrompt();
|
|
86
|
+
case "audit-credits":
|
|
87
|
+
return this.getAuditCreditsPrompt();
|
|
88
|
+
case "new-catalog-setup":
|
|
89
|
+
return this.getNewCatalogSetupPrompt();
|
|
94
90
|
case "close-the-loop":
|
|
95
|
-
return this.
|
|
96
|
-
case "
|
|
97
|
-
return this.
|
|
98
|
-
case "
|
|
99
|
-
return this.
|
|
100
|
-
case "
|
|
101
|
-
return this.
|
|
102
|
-
case "stay-connected":
|
|
103
|
-
return this.getStayConnectedSkill();
|
|
104
|
-
case "export-and-report":
|
|
105
|
-
return this.getExportAndReportSkill();
|
|
91
|
+
return this.getCloseTheLoopPrompt(args?.work_id);
|
|
92
|
+
case "register-my-works":
|
|
93
|
+
return this.getRegisterMyWorksPrompt();
|
|
94
|
+
case "prepare-for-sync":
|
|
95
|
+
return this.getPrepareForSyncPrompt();
|
|
96
|
+
case "workspace-autopilot":
|
|
97
|
+
return this.getWorkspaceAutopilotPrompt();
|
|
106
98
|
default:
|
|
107
99
|
throw new Error(`Prompt not found: ${name}`);
|
|
108
100
|
}
|
|
109
101
|
}
|
|
110
|
-
|
|
102
|
+
/**
|
|
103
|
+
* Analyze catalog prompt
|
|
104
|
+
*/
|
|
105
|
+
getAnalyzeCatalogPrompt() {
|
|
111
106
|
return {
|
|
112
107
|
messages: [
|
|
113
108
|
{
|
|
114
109
|
role: "user",
|
|
115
110
|
content: {
|
|
116
111
|
type: "text",
|
|
117
|
-
text:
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
→ Route to: catalog-your-music
|
|
135
|
-
|
|
136
|
-
If the catalog has works but 0 audio files:
|
|
137
|
-
→ "you've got [N] works catalogued but no audio attached. audio unlocks analysis, sync discovery, and richer metadata."
|
|
138
|
-
→ Route to: upload-and-analyse
|
|
139
|
-
|
|
140
|
-
If the catalog has works + audio but LOW completeness (PICA Score below 50 or many gaps):
|
|
141
|
-
→ Use pica_works_query({ health_filter: "low_completeness" }) to find the works that need the most attention.
|
|
142
|
-
→ "your catalog has [N] works but [X] have gaps worth closing. want to start with the ones that need the most attention?"
|
|
143
|
-
→ Route to: close-the-loop
|
|
144
|
-
|
|
145
|
-
If the catalog has works but 0 collaborators invited:
|
|
146
|
-
→ "we found [N] credited people on your works who aren't connected yet. linking them up means verified splits and shared visibility."
|
|
147
|
-
→ Route to: manage-collaborators
|
|
148
|
-
|
|
149
|
-
If ownership is not established on most works:
|
|
150
|
-
→ "your credits are in but ownership isn't clear on [N] works. knowing who owns what unlocks registration and licensing."
|
|
151
|
-
→ Route to: establish-ownership
|
|
152
|
-
|
|
153
|
-
If there are DUPLICATE signals (workspace context mentions duplicates):
|
|
154
|
-
→ "I noticed potential duplicate works. want to review them?"
|
|
155
|
-
→ Route to: close-the-loop (duplicate detection step)
|
|
156
|
-
|
|
157
|
-
If there are enrichment proposals pending:
|
|
158
|
-
→ Use pica_enrichment_proposals_list to check
|
|
159
|
-
→ "there are [N] enrichment suggestions waiting for your review."
|
|
160
|
-
→ Review proposals inline
|
|
161
|
-
|
|
162
|
-
If works are UNREGISTERED (registration coverage is low):
|
|
163
|
-
→ "many of your works aren't registered yet. want to see what's blocking them and prepare exports?"
|
|
164
|
-
→ Route to: export-and-report
|
|
165
|
-
|
|
166
|
-
If the catalog is HEALTHY (PICA Score above 70, few gaps):
|
|
167
|
-
→ "your catalog's in good shape. here's the quick health check..."
|
|
168
|
-
→ Offer: export-and-report, stay-connected, or "anything specific?"
|
|
169
|
-
|
|
170
|
-
Step 3 — Explain your routing:
|
|
171
|
-
Tell the user WHY you chose the skill you did, in one sentence. Example: "your catalog has 42 works but 28 are missing credits, so let's close those gaps first."
|
|
172
|
-
|
|
173
|
-
Step 4 — Offer alternatives:
|
|
174
|
-
After explaining, mention 1-2 other things they could do instead. Example: "or if you'd rather import more music first, I can help with that too."
|
|
175
|
-
|
|
176
|
-
Important: Don't run all workflows at once. Pick the single most valuable action and commit to it. You can always switch later.
|
|
177
|
-
|
|
178
|
-
Tools: workspace://context resource, pica_catalog_stats, pica_works_inspect (sections: score), pica_enrichment_proposals_list`,
|
|
112
|
+
text: `Please analyze my music catalog and provide a comprehensive report.
|
|
113
|
+
|
|
114
|
+
Use the following tools to gather data:
|
|
115
|
+
1. pica_catalog_stats - Get overall statistics
|
|
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
|
+
|
|
120
|
+
Analyze and report on:
|
|
121
|
+
- Overall catalog size and composition
|
|
122
|
+
- Data quality (missing ISWCs, ISRCs, metadata)
|
|
123
|
+
- Verification status (how many works are verified/unverified)
|
|
124
|
+
- Enrichment opportunities (people missing ISNI or MusicBrainz data)
|
|
125
|
+
- Completeness (works with recordings, people with credits, etc.)
|
|
126
|
+
- Recommendations for improvement
|
|
127
|
+
|
|
128
|
+
Please provide specific, actionable insights.`,
|
|
179
129
|
},
|
|
180
130
|
},
|
|
181
131
|
],
|
|
182
132
|
};
|
|
183
133
|
}
|
|
184
|
-
|
|
134
|
+
/**
|
|
135
|
+
* Find duplicates prompt
|
|
136
|
+
*/
|
|
137
|
+
getFindDuplicatesPrompt() {
|
|
185
138
|
return {
|
|
186
139
|
messages: [
|
|
187
140
|
{
|
|
188
141
|
role: "user",
|
|
189
142
|
content: {
|
|
190
143
|
type: "text",
|
|
191
|
-
text:
|
|
192
|
-
|
|
193
|
-
--- SKILL: establish-identity ---
|
|
194
|
-
|
|
195
|
-
Lock in the creator's professional identifiers. Everything downstream — enrichment, registration, discovery — depends on knowing who this person is in the industry's systems.
|
|
196
|
-
|
|
197
|
-
Check the user's person record using pica_people_inspect.
|
|
198
|
-
|
|
199
|
-
IPI check:
|
|
200
|
-
Has IPI? → great, move on
|
|
201
|
-
No IPI → "do you have an IPI number? it's the identifier your PRO assigned you. usually on royalty statements or your PRO's website."
|
|
202
|
-
- If provided → use pica_people_update to save it
|
|
203
|
-
- If unknown → "no worries. we can find it later when we check your works against MLC."
|
|
204
|
-
|
|
205
|
-
ISNI check:
|
|
206
|
-
Has ISNI? → great, move on
|
|
207
|
-
No ISNI → Search automatically using pica_people_enrich_isni
|
|
208
|
-
- Multiple results → present candidates with known works/roles. "which of these is you?"
|
|
209
|
-
- One strong match → "I found this — [name, works, roles]. is this you?"
|
|
210
|
-
- No match → "no ISNI found yet. as your catalog grows, you may become eligible. we'll move on."
|
|
144
|
+
text: `Please help me find potential duplicate works and people in my catalog.
|
|
211
145
|
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
- If provided → use pica_people_update to save it
|
|
216
|
-
- If not applicable → skip, no nudge
|
|
146
|
+
Use these tools:
|
|
147
|
+
1. pica_works_query - Get all works
|
|
148
|
+
2. pica_people_query - Get all people
|
|
217
149
|
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
150
|
+
Look for:
|
|
151
|
+
- Works with very similar or identical titles
|
|
152
|
+
- People with similar names (accounting for typos, different orderings)
|
|
153
|
+
- Works with the same ISWC (if ISWC exists)
|
|
154
|
+
- People with the same email address
|
|
222
155
|
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
156
|
+
For each potential duplicate found:
|
|
157
|
+
- List the IDs and key details
|
|
158
|
+
- Explain why you think they might be duplicates
|
|
159
|
+
- Suggest whether they should be merged or kept separate
|
|
226
160
|
|
|
227
|
-
|
|
228
|
-
- IPI is the most important identifier for publishing (PRO royalties depend on it)
|
|
229
|
-
- ISNI confirmation requires human judgment — multiple results are common for common names
|
|
230
|
-
- IPN is only relevant for performers, not pure songwriters — don't push it
|
|
231
|
-
- MusicBrainz lookup is best-effort, not worth blocking on
|
|
232
|
-
|
|
233
|
-
Tools: pica_people_inspect, pica_people_update, pica_people_enrich_isni, pica_people_enrich_musicbrainz, pica_people_query`,
|
|
161
|
+
Be thorough but conservative - only flag items that have a strong likelihood of being duplicates.`,
|
|
234
162
|
},
|
|
235
163
|
},
|
|
236
164
|
],
|
|
237
165
|
};
|
|
238
166
|
}
|
|
239
|
-
|
|
167
|
+
/**
|
|
168
|
+
* Enrich metadata prompt
|
|
169
|
+
*/
|
|
170
|
+
getEnrichMetadataPrompt() {
|
|
240
171
|
return {
|
|
241
172
|
messages: [
|
|
242
173
|
{
|
|
243
174
|
role: "user",
|
|
244
175
|
content: {
|
|
245
176
|
type: "text",
|
|
246
|
-
text:
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
→ Use pica_import_validate before committing
|
|
266
|
-
→ Use pica_import_execute to run the import
|
|
267
|
-
→ "I've imported [N] works. [X] had ISWCs, [Y] had complete credits."
|
|
268
|
-
|
|
269
|
-
Screenshot or photo:
|
|
270
|
-
→ Read the image directly (multimodal)
|
|
271
|
-
→ Extract titles, writers, roles from what's visible
|
|
272
|
-
→ Use pica_works_create and pica_people_create from extracted data
|
|
273
|
-
→ "I can see [N] tracks. I've created works for each one and added the credits I could read. want to check them?"
|
|
274
|
-
|
|
275
|
-
Just describe your songs:
|
|
276
|
-
→ Conversational — ask title, who wrote it, co-writers
|
|
277
|
-
→ Use pica_works_create as they talk
|
|
278
|
-
→ "got it — '[title]' by [writers]. anything else, or next one?"
|
|
279
|
-
|
|
280
|
-
PRO statement or registration document:
|
|
281
|
-
→ Use pica_documents_analyse to extract structured data
|
|
282
|
-
→ Cross-reference existing catalog
|
|
283
|
-
→ "I found [N] works in that document. [X] already exist, [Y] are new."
|
|
284
|
-
|
|
285
|
-
After any import:
|
|
286
|
-
→ Use pica_catalog_stats to show updated numbers
|
|
287
|
-
→ If duplicates detected → use pica_find_duplicates → "I notice [title] might already exist. want me to check?"
|
|
288
|
-
→ Nudge: "now that your music is in, attaching audio files unlocks analysis and sync discovery. got any masters or mixes to upload?"
|
|
289
|
-
|
|
290
|
-
Multiple imports in one session:
|
|
291
|
-
→ Don't re-explain. "got another one? paste it."
|
|
292
|
-
→ Running tally: "that's [N] works total now."
|
|
293
|
-
|
|
294
|
-
Domain knowledge:
|
|
295
|
-
- Streaming links are the fastest path — one link imports an entire album with ISRCs, credits, artwork
|
|
296
|
-
- Enrichment cascade fires automatically on streaming imports — no manual trigger needed
|
|
297
|
-
- CSV imports need validation before execution — field mapping errors are common
|
|
298
|
-
- Screenshots are surprisingly common — creators photograph liner notes, PRO statements, contract pages
|
|
299
|
-
- Duplicate detection after import catches double-imports
|
|
300
|
-
- PRO statements contain structured data but use inconsistent formats
|
|
301
|
-
|
|
302
|
-
Tools: pica_import_streaming_link, pica_import_analyze, pica_import_validate, pica_import_execute, pica_works_create, pica_people_create, pica_documents_analyse, pica_catalog_stats, pica_find_duplicates`,
|
|
177
|
+
text: `Please identify works and people that could benefit from metadata enrichment.
|
|
178
|
+
|
|
179
|
+
Use these tools:
|
|
180
|
+
1. pica_works_query - Get all works
|
|
181
|
+
2. pica_people_query - Get all people
|
|
182
|
+
|
|
183
|
+
Identify:
|
|
184
|
+
- People without ISNI identifiers who might have one
|
|
185
|
+
- People without MusicBrainz IDs who might have one
|
|
186
|
+
- Works missing ISWCs that could potentially be looked up
|
|
187
|
+
- People missing biographical information
|
|
188
|
+
|
|
189
|
+
For each enrichment opportunity:
|
|
190
|
+
- List the person/work details
|
|
191
|
+
- Explain what data is missing
|
|
192
|
+
- Suggest potential sources (ISNI, MusicBrainz, etc.)
|
|
193
|
+
- Prioritize the most impactful enrichment opportunities
|
|
194
|
+
|
|
195
|
+
Focus on people and works where enrichment would add the most value.`,
|
|
303
196
|
},
|
|
304
197
|
},
|
|
305
198
|
],
|
|
306
199
|
};
|
|
307
200
|
}
|
|
308
|
-
|
|
201
|
+
/**
|
|
202
|
+
* Verify works prompt
|
|
203
|
+
*/
|
|
204
|
+
getVerifyWorksPrompt() {
|
|
309
205
|
return {
|
|
310
206
|
messages: [
|
|
311
207
|
{
|
|
312
208
|
role: "user",
|
|
313
209
|
content: {
|
|
314
210
|
type: "text",
|
|
315
|
-
text:
|
|
316
|
-
|
|
317
|
-
--- SKILL: upload-and-analyse ---
|
|
318
|
-
|
|
319
|
-
Get audio files attached to works and run analysis. Renders the MCP App UI — the user stays in their conversation and drops files.
|
|
320
|
-
|
|
321
|
-
Prerequisite check: if no works exist, mention it: "you don't have any works yet. want to import your music first?"
|
|
322
|
-
|
|
323
|
-
Check which works have audio vs not using pica_works_inspect and pica_recordings_query.
|
|
324
|
-
|
|
325
|
-
"you've got [N] works but [X] don't have audio attached. audio unlocks BPM, key, mood detection, sync discoverability, and fingerprinting. want to upload some masters or mixes?"
|
|
326
|
-
|
|
327
|
-
If yes:
|
|
328
|
-
→ Render the upload card using pica_upload (accept: "audio")
|
|
329
|
-
→ MCP App UI appears — drag and drop inside the conversation
|
|
330
|
-
→ As files upload, link each to its work (match by filename, or ask)
|
|
331
|
-
→ Use pica_audio_presigned_upload and pica_audio_complete_upload for the upload flow
|
|
332
|
-
→ Confirm each link: "linked [filename] to '[work title]'"
|
|
333
|
-
|
|
334
|
-
After upload:
|
|
335
|
-
→ "want me to analyse these? I can detect BPM, key, energy, mood, and transcribe any lyrics."
|
|
336
|
-
|
|
337
|
-
If yes:
|
|
338
|
-
→ Run pica_audio_analyze on each file
|
|
339
|
-
→ Per result: "[title] — 120 BPM, key of C minor, high energy. lyrics transcribed."
|
|
340
|
-
→ If fingerprint match found: "this track was recognised as [match] — it's already in distribution databases."
|
|
341
|
-
→ If analysis fails: "couldn't analyse [filename] — file might be too short or unsupported format. try a different version?"
|
|
342
|
-
|
|
343
|
-
If no:
|
|
344
|
-
→ "no problem. audio is attached, you can analyse anytime."
|
|
211
|
+
text: `Please review unverified works and suggest which ones are ready for verification.
|
|
345
212
|
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
213
|
+
Use these tools:
|
|
214
|
+
1. pica_works_query with verified: false - Get unverified works
|
|
215
|
+
2. pica_recordings_by_work - Check if works have recordings
|
|
216
|
+
3. pica_people_query - Check for associated people/credits
|
|
349
217
|
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
218
|
+
For each unverified work, assess:
|
|
219
|
+
- Does it have complete metadata (title, type, duration)?
|
|
220
|
+
- Does it have an ISWC?
|
|
221
|
+
- Does it have associated recordings?
|
|
222
|
+
- Does it have proper credits/people assigned?
|
|
353
223
|
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
- Whisper transcription via Groq is fast but may need manual correction for sung lyrics
|
|
359
|
-
- Batch uploads need grouped feedback, not per-file confirmation spam
|
|
224
|
+
Categorize unverified works into:
|
|
225
|
+
1. Ready to verify - Has complete information
|
|
226
|
+
2. Needs minor updates - Missing 1-2 pieces of information
|
|
227
|
+
3. Needs significant work - Missing multiple key fields
|
|
360
228
|
|
|
361
|
-
|
|
229
|
+
Provide specific recommendations for each category, including what's needed to move works forward.`,
|
|
362
230
|
},
|
|
363
231
|
},
|
|
364
232
|
],
|
|
365
233
|
};
|
|
366
234
|
}
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
235
|
+
/**
|
|
236
|
+
* Assess catalog health prompt
|
|
237
|
+
*/
|
|
238
|
+
getAssessCatalogHealthPrompt() {
|
|
371
239
|
return {
|
|
372
240
|
messages: [
|
|
373
241
|
{
|
|
374
242
|
role: "user",
|
|
375
243
|
content: {
|
|
376
244
|
type: "text",
|
|
377
|
-
text:
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
3. Missing publisher data (blocks royalty collection)
|
|
396
|
-
4. Missing ISRC on recording (blocks neighbouring rights)
|
|
397
|
-
5. Missing audio (blocks analysis and sync discovery)
|
|
398
|
-
6. Missing mood/BPM/key (blocks sync search)
|
|
399
|
-
7. Missing agreements (important but not urgent)
|
|
400
|
-
|
|
401
|
-
For each gap, work through conversationally:
|
|
402
|
-
|
|
403
|
-
Missing credits:
|
|
404
|
-
→ "who wrote '[title]'? just you, or co-writers?"
|
|
405
|
-
→ Add credits with roles (composer, lyricist, arranger) via pica_credits_update
|
|
406
|
-
→ "what's the split?" — suggest equal split as starting point
|
|
407
|
-
|
|
408
|
-
Missing ISWC — enrichment decision tree:
|
|
409
|
-
→ Has IPI on credited writers? → try pica_enrich_work_mlc first
|
|
410
|
-
(gives ISWC + publisher + splits in one call)
|
|
411
|
-
→ No IPI but has title + writer name? → try pica_enrich_work_musicbrainz
|
|
412
|
-
(broader matcher, less publishing data)
|
|
413
|
-
→ MLC returns multiple matches? → present candidates with writer names and publisher info, let user confirm
|
|
414
|
-
→ No match anywhere? → "no ISWC found yet. your PRO will assign one when you register."
|
|
415
|
-
|
|
416
|
-
Missing publisher data:
|
|
417
|
-
→ If MLC wasn't tried → try pica_enrich_work_mlc now
|
|
418
|
-
→ If MLC returned data → "MLC shows [publisher] with [X]% share. does that look right?"
|
|
419
|
-
|
|
420
|
-
Missing ISRC:
|
|
421
|
-
→ Check if recording exists via pica_recordings_inspect and has ISRC
|
|
422
|
-
→ If exists without ISRC → "do you have the ISRC? usually from your distributor."
|
|
423
|
-
→ If no recording → "this work doesn't have a recording yet. want to upload audio?"
|
|
424
|
-
|
|
425
|
-
After each gap:
|
|
426
|
-
→ Don't re-read the full list. Move to next: "nice. next — [gap]..."
|
|
427
|
-
→ If skip: "no problem." Move on, no follow-up.
|
|
428
|
-
|
|
429
|
-
After closing gaps on 3+ works in one session:
|
|
430
|
-
→ Run pica_catalog_diligence for aggregate impact
|
|
431
|
-
→ "you've closed [N] gaps across [X] works. diligence score moved from [before] to [after]. biggest remaining area is [pillar]."
|
|
432
|
-
|
|
433
|
-
Duplicate detection (inline):
|
|
434
|
-
→ If during gap closure a duplicate is found (same ISWC, similar title + artist): surface it
|
|
435
|
-
→ "this looks like it might be the same work as '[other title]'. want me to compare them side by side?"
|
|
436
|
-
→ If confirmed → use pica_merge_duplicates, preserving the richer record
|
|
437
|
-
|
|
438
|
-
After all gaps addressed (or user stops):
|
|
439
|
-
→ Summary: "closed [N] gaps on '[title]'. PICA score went from [X] to [Y]."
|
|
440
|
-
→ Offer: "want to do the next work, or take a break?"
|
|
441
|
-
|
|
442
|
-
Domain knowledge:
|
|
443
|
-
- Enrichment source priority: MLC first if IPI available (ISWC + publisher + splits), MusicBrainz second (broadest matcher), Spotify third (genre/mood only)
|
|
444
|
-
- MLC field gotchas: uses mlcsongCode (lowercase s), writer fields are writer-prefixed, no ISWC lookup (only songCode)
|
|
445
|
-
- Credits before enrichment: adding credits with IPI unlocks MLC lookups. Without credits, enrichment is limited to title+artist matching
|
|
446
|
-
- Gap order matters: credits and ISWC are structural (everything else depends on them); audio and mood are additive
|
|
447
|
-
- Duplicate detection during gap closure catches cases where enrichment reveals two records are the same work
|
|
448
|
-
- Catalog diligence as feedback loop: after closing several gaps, show aggregate impact to motivate continued effort
|
|
449
|
-
|
|
450
|
-
Tools: pica_works_inspect, pica_works_query, pica_credits_list, pica_credits_update, pica_enrich_work_mlc, pica_enrich_work_musicbrainz, pica_enrich_work_spotify, pica_recordings_inspect, pica_find_duplicates, pica_merge_duplicates, pica_catalog_diligence`,
|
|
245
|
+
text: `Please assess the health of my music catalog using the PICA Score.
|
|
246
|
+
|
|
247
|
+
Use these tools:
|
|
248
|
+
1. pica_works_inspect({ sections: ["score"] }) - Get the PICA Score with pillar breakdown
|
|
249
|
+
2. pica_catalog_stats - Get raw catalog statistics for additional context
|
|
250
|
+
3. pica_works_query - Sample works data to understand quality
|
|
251
|
+
|
|
252
|
+
Analyze:
|
|
253
|
+
- The composite score and grade — is this catalog ready for commercial use?
|
|
254
|
+
- Each pillar (income, ownership, asset, verification) — which is weakest?
|
|
255
|
+
- The top actions — prioritize them by effort vs impact
|
|
256
|
+
- Compare pillar scores to identify the biggest gaps
|
|
257
|
+
|
|
258
|
+
Provide:
|
|
259
|
+
- A plain-language summary of catalog health (suitable for a non-technical stakeholder)
|
|
260
|
+
- The top 3 highest-impact improvements with specific steps
|
|
261
|
+
- An estimate of where the score could reach after those improvements
|
|
262
|
+
- Any urgent issues that need immediate attention (e.g., missing ownership data, unverified high-value works)`,
|
|
451
263
|
},
|
|
452
264
|
},
|
|
453
265
|
],
|
|
454
266
|
};
|
|
455
267
|
}
|
|
456
|
-
|
|
268
|
+
/**
|
|
269
|
+
* Audit credits prompt
|
|
270
|
+
*/
|
|
271
|
+
getAuditCreditsPrompt() {
|
|
457
272
|
return {
|
|
458
273
|
messages: [
|
|
459
274
|
{
|
|
460
275
|
role: "user",
|
|
461
276
|
content: {
|
|
462
277
|
type: "text",
|
|
463
|
-
text:
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
→ "want me to send them an invite? they'll get a link to confirm their credits and set up their own workspace."
|
|
485
|
-
→ If yes → use pica_collaborators_invite
|
|
486
|
-
→ "invite sent. they've got 7 days to accept."
|
|
487
|
-
|
|
488
|
-
If no:
|
|
489
|
-
→ "no worries. we can come back to this." Move on.
|
|
490
|
-
|
|
491
|
-
After invites:
|
|
492
|
-
→ "want to check the splits on works you share with [name]?"
|
|
493
|
-
|
|
494
|
-
Split review:
|
|
495
|
-
→ Show current splits per work using pica_credits_list
|
|
496
|
-
→ "do these look right?"
|
|
497
|
-
→ If adjustment → use pica_credits_update
|
|
498
|
-
→ If splits don't total 100% → "these add up to [X]%. want to adjust, or is the remaining [Y]% assigned to a publisher?"
|
|
499
|
-
|
|
500
|
-
Bulk invites:
|
|
501
|
-
→ Many collaborators → "want to give me all the emails at once?"
|
|
502
|
-
→ Use pica_collaborators_invite_bulk for batch send
|
|
503
|
-
|
|
504
|
-
Warm-path note:
|
|
505
|
-
→ "when [name] accepts, their credits become verified and their identifiers will automatically link to your shared works."
|
|
506
|
-
|
|
507
|
-
After session:
|
|
508
|
-
→ Summary: "invited [N] collaborators, confirmed splits on [X] works."
|
|
509
|
-
→ Nudge: "next — who actually owns these works? that determines licensing and registration rights."
|
|
510
|
-
|
|
511
|
-
Domain knowledge:
|
|
512
|
-
- Collaborator connection is social, not technical — needs emails and invitations
|
|
513
|
-
- Split verification is best done while context is fresh
|
|
514
|
-
- 100% split check is important but missing percentage often belongs to a publisher
|
|
515
|
-
- Bulk invites are critical for large catalogs
|
|
516
|
-
- Warm-path acceptance auto-links identifiers and verifies credits
|
|
517
|
-
- 7-day invite expiry
|
|
518
|
-
|
|
519
|
-
Tools: pica_people_query, pica_people_inspect, pica_people_update, pica_collaborators_invite, pica_collaborators_invite_bulk, pica_collaborators_invites_list, pica_credits_list, pica_credits_update, pica_recording_splits_list, pica_recording_splits_create`,
|
|
278
|
+
text: `Please audit the credits across my music catalog to find gaps and issues.
|
|
279
|
+
|
|
280
|
+
Use these tools:
|
|
281
|
+
1. pica_works_query - Get all works
|
|
282
|
+
2. pica_credits_list - Check credits for each work (sample at least 20 works, prioritizing recent ones)
|
|
283
|
+
3. pica_people_query - Cross-reference credited people
|
|
284
|
+
|
|
285
|
+
Look for:
|
|
286
|
+
- Works with no credits at all (no collaborators assigned)
|
|
287
|
+
- Works where splits don't total 100%
|
|
288
|
+
- Works with only one credited person (potential missing collaborators)
|
|
289
|
+
- People who appear in multiple works — are their roles consistent?
|
|
290
|
+
- Credits with generic roles (just "writer") vs specific roles ("composer", "lyricist")
|
|
291
|
+
- People credited on works but missing key identifiers (IPI, ISNI)
|
|
292
|
+
|
|
293
|
+
Report:
|
|
294
|
+
- Summary statistics (% of works with credits, average collaborators per work)
|
|
295
|
+
- List of works with no credits (highest priority to fix)
|
|
296
|
+
- List of works with potential split issues
|
|
297
|
+
- Recommendations for improving credit completeness
|
|
298
|
+
- People who should be enriched with external identifiers for royalty collection`,
|
|
520
299
|
},
|
|
521
300
|
},
|
|
522
301
|
],
|
|
523
302
|
};
|
|
524
303
|
}
|
|
525
|
-
|
|
304
|
+
/**
|
|
305
|
+
* New catalog setup prompt — first-time onboarding
|
|
306
|
+
*/
|
|
307
|
+
getNewCatalogSetupPrompt() {
|
|
526
308
|
return {
|
|
527
309
|
messages: [
|
|
528
310
|
{
|
|
529
311
|
role: "user",
|
|
530
312
|
content: {
|
|
531
313
|
type: "text",
|
|
532
|
-
text:
|
|
533
|
-
|
|
534
|
-
--- SKILL: establish-ownership ---
|
|
535
|
-
|
|
536
|
-
Determine and record who owns each work. This is the custody and agreements layer — who can license, register, collect, and transfer.
|
|
537
|
-
|
|
538
|
-
Prerequisite check: if works don't have credits, mention it: "credits help clarify ownership. want to add those first?"
|
|
539
|
-
|
|
540
|
-
"now that your works have credits and collaborators, the next important thing is ownership. who actually owns these songs? that determines who can license, register, and collect."
|
|
541
|
-
|
|
542
|
-
For each work (or batch if uniform):
|
|
543
|
-
|
|
544
|
-
Role declaration:
|
|
545
|
-
→ "what's your role on '[title]'? songwriter, producer, performer, publisher, or a combination?"
|
|
546
|
-
→ This clarifies whether they hold publishing rights, master rights, or both
|
|
547
|
-
|
|
548
|
-
Publishing rights (composition):
|
|
549
|
-
→ "do you own the publishing outright, or is there a deal?"
|
|
314
|
+
text: `I just connected to PICA. Help me get started with my music catalog.
|
|
550
315
|
|
|
551
|
-
|
|
552
|
-
→ "you control 100% of the publishing?"
|
|
553
|
-
→ If co-writers → "do they control their shares, or does anyone have a publisher?"
|
|
554
|
-
→ Record custody via pica_custody_claim
|
|
316
|
+
First, read the workspace://context resource to understand my current catalog state (is it empty or do I already have works?).
|
|
555
317
|
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
→ If yes → use pica_documents_analyse
|
|
318
|
+
If the catalog is empty, welcome me and explain that I can get my music into PICA however I like:
|
|
319
|
+
1. Paste a Spotify or Deezer link — use pica_import_streaming_link to import tracks with ISRCs, credits, and artwork automatically
|
|
320
|
+
2. Share a spreadsheet or PRO statement — use pica_import_analyze to read columns and import in bulk
|
|
321
|
+
3. Send a screenshot of a track listing or release — you can read it and create the works from what you see
|
|
322
|
+
4. Just describe my songs — use pica_works_create to add them as we talk
|
|
562
323
|
|
|
563
|
-
|
|
564
|
-
→ "who owns the recordings? you, a label, or self-released?"
|
|
565
|
-
→ If label → "what's the deal? do they own the masters outright, or is there a reversion clause?"
|
|
566
|
-
→ Record master ownership separately from publishing
|
|
324
|
+
Ask me what I've got and help me get started with whichever method I choose.
|
|
567
325
|
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
326
|
+
After importing, guide me through closing the loop on each work:
|
|
327
|
+
- Who wrote these songs? (pica_credits_update — add writers and set splits)
|
|
328
|
+
- Are there publishing details registered? (pica_enrich_work_mlc — check MLC)
|
|
329
|
+
- Do I have audio files to upload? (pica_audio_presigned_upload — for analysis)
|
|
330
|
+
- What identifiers are missing? (pica_works_inspect with sections: ["enrichment"] — check coverage)
|
|
571
331
|
|
|
572
|
-
|
|
573
|
-
→ If work appears in another org's catalog:
|
|
574
|
-
"this work also appears in [org name]'s catalog. that might be your publisher or distributor. want me to check, or start a custody conversation?"
|
|
575
|
-
→ If yes → use pica_custody_claim
|
|
576
|
-
→ "they'll have 7 days to respond. if they accept, the ownership chain is verified."
|
|
332
|
+
Don't push — let me stop whenever I want. But always let me know what the next valuable step would be.
|
|
577
333
|
|
|
578
|
-
|
|
579
|
-
→ Summary: "[N] works have clear ownership. [X] pending co-writer confirmation. [Y] have publisher agreements recorded."
|
|
580
|
-
→ Nudge: "now we know who owns what. want to capture what gear was used on these recordings?"
|
|
334
|
+
Also check pica_integrations_status to see if Google Calendar, Spotify, Gmail, or Telegram are connected. If not, mention that they can connect services at withpica.com/admin/settings to unlock calendar sync, email search, and notifications.
|
|
581
335
|
|
|
582
|
-
|
|
583
|
-
- Ownership and credits are different things — you can write a song and not own it
|
|
584
|
-
- Publishing rights (composition) and master rights (recording) often have different owners
|
|
585
|
-
- Admin deals vs traditional publishing have fundamentally different ownership structures
|
|
586
|
-
- Role declaration (songwriter/producer/performer/publisher) determines which rights are relevant
|
|
587
|
-
- Co-writer ownership often can't be fully resolved until the co-writer confirms
|
|
588
|
-
- Document analysis can extract agreement terms but user should verify
|
|
589
|
-
- Custody claims are the mechanism for cross-org ownership verification
|
|
590
|
-
- Batch-apply is essential when one deal covers the whole catalog
|
|
336
|
+
If the catalog already has works, summarise what's there and ask what I'd like to do — import more, check health, or work on what's missing.
|
|
591
337
|
|
|
592
|
-
|
|
338
|
+
Important: I can always log in at withpica.com to see, verify, and manage everything you create. The dashboard and MCP see the same catalog.`,
|
|
593
339
|
},
|
|
594
340
|
},
|
|
595
341
|
],
|
|
596
342
|
};
|
|
597
343
|
}
|
|
598
|
-
|
|
344
|
+
/**
|
|
345
|
+
* Close the loop — check a specific work's gaps and offer to fix each one
|
|
346
|
+
*/
|
|
347
|
+
getCloseTheLoopPrompt(workId) {
|
|
348
|
+
const workInstruction = workId
|
|
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.`;
|
|
599
351
|
return {
|
|
600
352
|
messages: [
|
|
601
353
|
{
|
|
602
354
|
role: "user",
|
|
603
355
|
content: {
|
|
604
356
|
type: "text",
|
|
605
|
-
text:
|
|
606
|
-
|
|
607
|
-
--- SKILL: production-assets ---
|
|
608
|
-
|
|
609
|
-
Capture what gear was used, who owns it, and link to recordings. Builds the provenance layer.
|
|
610
|
-
|
|
611
|
-
Prerequisite check: if no recordings exist, mention it: "you don't have recordings yet. want to upload audio first?"
|
|
612
|
-
|
|
613
|
-
"did you use any specific gear to make these recordings? instruments, microphones, synths, drum machines — anything you want on the record."
|
|
614
|
-
|
|
615
|
-
If yes:
|
|
616
|
-
→ Conversational: "what did you use on '[title]'?"
|
|
617
|
-
→ For each piece of gear:
|
|
618
|
-
- What is it? (type, make, model)
|
|
619
|
-
- Do you own it?
|
|
620
|
-
- Used on specific recordings, or across everything?
|
|
621
|
-
→ Use pica_physical_assets_create and pica_physical_assets_link_recording
|
|
622
|
-
→ "logged [instrument] — linked to [N] recordings."
|
|
623
|
-
→ If studio mentioned: "recorded at a specific studio? I can note that too."
|
|
624
|
-
|
|
625
|
-
If many recordings with similar setups:
|
|
626
|
-
→ "sounds like you use [gear list] across most of your work. want me to link these to all recordings, or just specific ones?"
|
|
357
|
+
text: `Help me close the loop on a work — find what's missing and offer to fix each gap.
|
|
627
358
|
|
|
628
|
-
|
|
629
|
-
→ Check if producer is a connected collaborator
|
|
630
|
-
→ If connected: "want me to ask [producer name] to fill in the production details from their side?"
|
|
631
|
-
→ If not connected: "do you have their email? once they're connected, they can capture the production details."
|
|
632
|
-
→ Don't block — move on
|
|
359
|
+
${workInstruction}
|
|
633
360
|
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
361
|
+
For the work, check every aspect of completeness:
|
|
362
|
+
1. pica_works_inspect with sections: ["completeness"] — get the full gap analysis
|
|
363
|
+
2. pica_credits_list — check if credits and splits are assigned
|
|
364
|
+
3. pica_works_inspect with sections: ["enrichment"] — check what enrichment sources have been tried
|
|
637
365
|
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
366
|
+
For each gap found, offer a specific action:
|
|
367
|
+
- Missing credits → "Want me to add writers? Who wrote this song?"
|
|
368
|
+
- Splits not set → "What's the split between the writers?"
|
|
369
|
+
- No ISWC → "Want me to check MLC for this work?" (pica_enrich_work_mlc)
|
|
370
|
+
- No ISRC → "Do you have a recording with an ISRC for this?"
|
|
371
|
+
- No audio → "Got a master recording to upload?"
|
|
372
|
+
- Audio not analysed → "Want me to analyse the audio for BPM, key, and mood?"
|
|
373
|
+
- No agreements → "Is there a publishing agreement for this work?"
|
|
374
|
+
- Not registered → "Want me to check registration status?" (pica_works_inspect with sections: ["registration"])
|
|
641
375
|
|
|
642
|
-
|
|
643
|
-
- Production assets are provenance evidence — prove how music was made
|
|
644
|
-
- Ownership of gear matters for insurance and lending documentation
|
|
645
|
-
- Most creators use a core set of gear — batch linking saves time
|
|
646
|
-
- This is the most skippable step — never push it
|
|
647
|
-
- Producers often know gear details that performers don't — route to them
|
|
648
|
-
- Studio attribution is valuable but optional
|
|
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.
|
|
649
377
|
|
|
650
|
-
|
|
378
|
+
Keep it conversational — don't list all gaps at once. Start with the most important one and work down.`,
|
|
651
379
|
},
|
|
652
380
|
},
|
|
653
381
|
],
|
|
654
382
|
};
|
|
655
383
|
}
|
|
656
|
-
|
|
384
|
+
/**
|
|
385
|
+
* Register my works — check registration status and prepare for PRO submission
|
|
386
|
+
*/
|
|
387
|
+
getRegisterMyWorksPrompt() {
|
|
657
388
|
return {
|
|
658
389
|
messages: [
|
|
659
390
|
{
|
|
660
391
|
role: "user",
|
|
661
392
|
content: {
|
|
662
393
|
type: "text",
|
|
663
|
-
text:
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
394
|
+
text: `Help me check which of my works are registered and which still need registration.
|
|
395
|
+
|
|
396
|
+
Steps:
|
|
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
|
+
3. Identify common blockers:
|
|
400
|
+
- Missing ISWC (needed for PRS/MCPS) → suggest pica_enrich_work_mlc
|
|
401
|
+
- Missing ISRC (needed for PPL) → check if recordings have ISRCs
|
|
402
|
+
- Missing credits (needed for all) → suggest adding writers
|
|
403
|
+
- Missing identifiers on people (IPI needed for PRO registration) → suggest enrichment
|
|
404
|
+
|
|
405
|
+
Report:
|
|
406
|
+
- How many works are fully registered vs partially vs not at all
|
|
407
|
+
- The most common blocker and how to fix it
|
|
408
|
+
- Which works are closest to being registration-ready (fewest gaps)
|
|
409
|
+
|
|
410
|
+
Then offer:
|
|
411
|
+
- "Want me to try enriching the works missing ISWCs from MLC?"
|
|
412
|
+
- "Want me to export a CWR file for the works that are ready?" (pica_export_song_registration)
|
|
413
|
+
- "Want me to check registration status for a specific work?"
|
|
414
|
+
|
|
415
|
+
Focus on practical next steps, not just reporting.`,
|
|
416
|
+
},
|
|
417
|
+
},
|
|
418
|
+
],
|
|
419
|
+
};
|
|
420
|
+
}
|
|
421
|
+
/**
|
|
422
|
+
* Workspace autopilot — assess state and route to the right workflow
|
|
423
|
+
*/
|
|
424
|
+
getWorkspaceAutopilotPrompt() {
|
|
425
|
+
return {
|
|
426
|
+
messages: [
|
|
427
|
+
{
|
|
428
|
+
role: "user",
|
|
429
|
+
content: {
|
|
430
|
+
type: "text",
|
|
431
|
+
text: `You've just connected to a PICA workspace. Assess its current state and guide me to the most valuable next action.
|
|
668
432
|
|
|
669
|
-
|
|
433
|
+
Step 1 — Orient:
|
|
434
|
+
Read the workspace://context resource to get a snapshot of the catalog: org info, catalog size, health score, and top priorities.
|
|
670
435
|
|
|
671
|
-
|
|
436
|
+
Step 2 — Route based on what you find:
|
|
672
437
|
|
|
673
|
-
|
|
438
|
+
If the catalog is EMPTY (0 works):
|
|
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.
|
|
674
440
|
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
441
|
+
If the catalog has works but LOW completeness (PICA Score below 50 or many gaps):
|
|
442
|
+
→ Use pica_works_query({ health_filter: "low_completeness" }) to find the works that need the most attention.
|
|
443
|
+
→ Pick the top 3 and offer to run close-the-loop on them one at a time.
|
|
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?"
|
|
679
445
|
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
→ Configurable categories: catalog_alerts, custody_events, collaborator_updates, enrichment_results
|
|
683
|
-
→ Guide through bot setup if not connected using pica_telegram_connect
|
|
684
|
-
→ Check status with pica_telegram_status
|
|
685
|
-
→ "what do you want to hear about? everything, or just the important stuff?"
|
|
446
|
+
If there are DUPLICATE signals (workspace context mentions duplicates):
|
|
447
|
+
→ Use the find-duplicates workflow. Tell me how many potential duplicates exist and offer to review them.
|
|
686
448
|
|
|
687
|
-
|
|
688
|
-
|
|
449
|
+
If works are UNREGISTERED (registration coverage is low):
|
|
450
|
+
→ Use the register-my-works workflow. Tell me how many works aren't registered and what's blocking them.
|
|
689
451
|
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
→ If connected: "want me to add upcoming deadlines?" using pica_calendar_events
|
|
693
|
-
→ If not: "connecting Google Calendar lets me add custody deadlines, agreement expirations, and registration dates."
|
|
452
|
+
If the catalog is HEALTHY (score above 70, few gaps):
|
|
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."
|
|
694
454
|
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
→ Use pica_notify_user_at for scheduled notifications
|
|
698
|
-
→ Use pica_notify_user_list_pending to show existing reminders
|
|
455
|
+
If none of the above clearly applies:
|
|
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.
|
|
699
457
|
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
→ Nudge: "your catalog is in good shape now. want to see a full report, or generate a catalog asset report?"
|
|
458
|
+
Step 3 — Explain your routing:
|
|
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."
|
|
703
460
|
|
|
704
|
-
|
|
705
|
-
-
|
|
706
|
-
- Telegram is fastest (real-time push), email is for digests and critical alerts
|
|
707
|
-
- Calendar integration turns deadlines into calendar events
|
|
708
|
-
- Notification density matters — too many alerts get ignored
|
|
709
|
-
- Scheduled reminders are for specific follow-ups, not ongoing alerts
|
|
461
|
+
Step 4 — Offer alternatives:
|
|
462
|
+
After explaining, mention 1-2 other things I could do instead. Example: "Or if you'd rather import more music first, I can help with that too."
|
|
710
463
|
|
|
711
|
-
|
|
464
|
+
Important: Don't run all workflows at once. Pick the single most valuable action and commit to it. You can always switch later.`,
|
|
712
465
|
},
|
|
713
466
|
},
|
|
714
467
|
],
|
|
715
468
|
};
|
|
716
469
|
}
|
|
717
|
-
|
|
470
|
+
/**
|
|
471
|
+
* Prepare for sync — get catalog sync-ready
|
|
472
|
+
*/
|
|
473
|
+
getPrepareForSyncPrompt() {
|
|
718
474
|
return {
|
|
719
475
|
messages: [
|
|
720
476
|
{
|
|
721
477
|
role: "user",
|
|
722
478
|
content: {
|
|
723
479
|
type: "text",
|
|
724
|
-
text:
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
→ Check which works are registration-ready
|
|
749
|
-
→ If some aren't: "out of [N] works, [X] are ready. [Y] are missing [what]. want to export what's ready?"
|
|
750
|
-
→ Use pica_export_song_registration to generate CWR file
|
|
751
|
-
→ "here's your CWR file. you'll need to submit this to your PRO — PICA prepares the file in the format they accept."
|
|
752
|
-
|
|
753
|
-
Catalog CSV:
|
|
754
|
-
→ "want a spreadsheet of your full catalog?"
|
|
755
|
-
→ Use pica_export_catalog_csv and deliver via download card
|
|
756
|
-
|
|
757
|
-
Provenance certificate:
|
|
758
|
-
→ Per-work chain-of-title certificate
|
|
759
|
-
→ Use pica_provenance_certificate and pica_provenance_work
|
|
760
|
-
→ "documents ownership history and attestations for [title]."
|
|
761
|
-
|
|
762
|
-
Industry-ready package:
|
|
763
|
-
→ "pitching to a distributor or publisher? I can generate a metadata package in their format."
|
|
764
|
-
→ Use pica_export_industry_ready
|
|
765
|
-
|
|
766
|
-
Sync readiness check:
|
|
767
|
-
→ "how many works have analysed audio, mood tags, and genre set?"
|
|
768
|
-
→ Show readiness breakdown
|
|
769
|
-
→ Offer to trigger analysis on tracks with uploads but no analysis
|
|
770
|
-
→ Use pica_search_for_sync to find sync-ready tracks
|
|
771
|
-
|
|
772
|
-
Carbon footprint:
|
|
773
|
-
→ Streaming + distribution carbon metrics
|
|
774
|
-
→ Use pica_carbon_footprint and pica_carbon_live
|
|
775
|
-
→ "your catalog's estimated footprint is [X]. here's the breakdown."
|
|
776
|
-
|
|
777
|
-
After any export:
|
|
778
|
-
→ "anything else, or are you good for now?"
|
|
779
|
-
→ No nudge — this is often the end of a session
|
|
780
|
-
|
|
781
|
-
Domain knowledge:
|
|
782
|
-
- CAR is the flagship output — maps creative portfolios to property-lending equivalents
|
|
783
|
-
- CWR is the registration format but PICA doesn't submit — user takes it to their PRO
|
|
784
|
-
- Attestation is a legal step — user is declaring accuracy
|
|
785
|
-
- Export quality depends on catalog quality — a CAR with gaps is less useful but still valid
|
|
786
|
-
- Provenance certificates are per-work — useful for licensing negotiations
|
|
787
|
-
- Carbon footprint is a differentiator — few platforms track this
|
|
788
|
-
- Sync readiness is about audio analysis data (BPM, key, mood), not metadata
|
|
789
|
-
|
|
790
|
-
Tools: pica_catalog_stats, pica_catalog_diligence, pica_works_inspect, pica_export_catalog_asset_report, pica_export_song_registration, pica_export_catalog_csv, pica_export_industry_ready, pica_export_ai_consent, pica_provenance_stats, pica_provenance_certificate, pica_provenance_work, pica_carbon_footprint, pica_carbon_live, pica_search_for_sync, pica_download`,
|
|
480
|
+
text: `Help me get my catalog ready for sync licensing — make sure my works are discoverable and attractive to music supervisors.
|
|
481
|
+
|
|
482
|
+
Steps:
|
|
483
|
+
1. pica_catalog_stats — get an overview of the catalog
|
|
484
|
+
2. pica_works_query — sample works to check what's missing for sync readiness
|
|
485
|
+
3. For each work, check:
|
|
486
|
+
- Has audio been uploaded? (supervisors need to hear it)
|
|
487
|
+
- Has audio been analysed? (BPM, key, energy, mood — needed for search)
|
|
488
|
+
- Are mood tags and genre set? (how supervisors search)
|
|
489
|
+
- Is duration recorded? (supervisors filter by length)
|
|
490
|
+
- Are lyrics transcribed? (for lyrical content search)
|
|
491
|
+
- Is there a Spotify/YouTube link? (supervisors check existing presence)
|
|
492
|
+
|
|
493
|
+
Report:
|
|
494
|
+
- How many works have analysed audio vs unanalysed vs no audio at all
|
|
495
|
+
- How many have mood tags and genre vs missing
|
|
496
|
+
- The fastest path to sync-readiness (which works are closest)
|
|
497
|
+
|
|
498
|
+
Then offer:
|
|
499
|
+
- "Want me to trigger audio analysis on the tracks that have uploads but no analysis?"
|
|
500
|
+
- "Want me to search for sync-ready tracks you already have?" (pica_search_for_sync)
|
|
501
|
+
- "Want me to enrich works from Spotify to pull in genre and mood data?"
|
|
502
|
+
|
|
503
|
+
The goal is making works findable by mood, BPM, key, and energy — that's what sync supervisors search by.`,
|
|
791
504
|
},
|
|
792
505
|
},
|
|
793
506
|
],
|