@withpica/mcp-server 2.22.0 → 2.24.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (78) hide show
  1. package/CHANGELOG.md +43 -0
  2. package/dist/config.d.ts +10 -9
  3. package/dist/config.d.ts.map +1 -1
  4. package/dist/config.js +10 -7
  5. package/dist/config.js.map +1 -1
  6. package/dist/index.d.ts +1 -1
  7. package/dist/prompts/index.d.ts +64 -64
  8. package/dist/prompts/index.d.ts.map +1 -1
  9. package/dist/prompts/index.js +3 -1
  10. package/dist/prompts/index.js.map +1 -1
  11. package/dist/resources/index.d.ts +53 -53
  12. package/dist/server-instructions.d.ts +1 -1
  13. package/dist/server-instructions.d.ts.map +1 -1
  14. package/dist/server-instructions.js +13 -15
  15. package/dist/server-instructions.js.map +1 -1
  16. package/dist/server.d.ts +49 -49
  17. package/dist/tools/agent-identity.d.ts +36 -0
  18. package/dist/tools/agent-identity.d.ts.map +1 -0
  19. package/dist/tools/agent-identity.js +269 -0
  20. package/dist/tools/agent-identity.js.map +1 -0
  21. package/dist/tools/agreements.d.ts.map +1 -1
  22. package/dist/tools/agreements.js +6 -2
  23. package/dist/tools/agreements.js.map +1 -1
  24. package/dist/tools/audit.d.ts +19 -0
  25. package/dist/tools/audit.d.ts.map +1 -0
  26. package/dist/tools/audit.js +57 -0
  27. package/dist/tools/audit.js.map +1 -0
  28. package/dist/tools/discovery.d.ts.map +1 -1
  29. package/dist/tools/discovery.js +17 -0
  30. package/dist/tools/discovery.js.map +1 -1
  31. package/dist/tools/enrichment.d.ts.map +1 -1
  32. package/dist/tools/enrichment.js +13 -1
  33. package/dist/tools/enrichment.js.map +1 -1
  34. package/dist/tools/feedback.d.ts +22 -0
  35. package/dist/tools/feedback.d.ts.map +1 -0
  36. package/dist/tools/feedback.js +99 -0
  37. package/dist/tools/feedback.js.map +1 -0
  38. package/dist/tools/gap-hints.d.ts +53 -0
  39. package/dist/tools/gap-hints.d.ts.map +1 -0
  40. package/dist/tools/gap-hints.js +245 -0
  41. package/dist/tools/gap-hints.js.map +1 -0
  42. package/dist/tools/index.d.ts +72 -88
  43. package/dist/tools/index.d.ts.map +1 -1
  44. package/dist/tools/index.js +34 -0
  45. package/dist/tools/index.js.map +1 -1
  46. package/dist/tools/integrations.d.ts +5 -1
  47. package/dist/tools/integrations.d.ts.map +1 -1
  48. package/dist/tools/integrations.js +44 -25
  49. package/dist/tools/integrations.js.map +1 -1
  50. package/dist/tools/metadata.d.ts.map +1 -1
  51. package/dist/tools/metadata.js +265 -0
  52. package/dist/tools/metadata.js.map +1 -1
  53. package/dist/tools/notes.d.ts.map +1 -1
  54. package/dist/tools/notes.js +1 -1
  55. package/dist/tools/notes.js.map +1 -1
  56. package/dist/tools/people.d.ts +262 -38
  57. package/dist/tools/people.d.ts.map +1 -1
  58. package/dist/tools/people.js +258 -265
  59. package/dist/tools/people.js.map +1 -1
  60. package/dist/tools/recordings.d.ts +82 -31
  61. package/dist/tools/recordings.d.ts.map +1 -1
  62. package/dist/tools/recordings.js +186 -123
  63. package/dist/tools/recordings.js.map +1 -1
  64. package/dist/tools/releases.d.ts +5 -0
  65. package/dist/tools/releases.d.ts.map +1 -1
  66. package/dist/tools/releases.js +295 -0
  67. package/dist/tools/releases.js.map +1 -1
  68. package/dist/tools/search.d.ts +20 -20
  69. package/dist/tools/settings.d.ts +5 -0
  70. package/dist/tools/settings.d.ts.map +1 -1
  71. package/dist/tools/settings.js +197 -1
  72. package/dist/tools/settings.js.map +1 -1
  73. package/dist/tools/works.d.ts +65 -39
  74. package/dist/tools/works.d.ts.map +1 -1
  75. package/dist/tools/works.js +125 -220
  76. package/dist/tools/works.js.map +1 -1
  77. package/package.json +3 -2
  78. package/server.json +2 -2
@@ -1,45 +1,269 @@
1
1
  /**
2
2
  * People Tools - MCP tools for managing people (artists, composers, etc.)
3
+ *
4
+ * ADR-174 Phase 2 item 4 — pica_people_create / pica_people_update
5
+ * write surfaces are now reconciled against public.people +
6
+ * public.person_enrichment. `additionalProperties: true` is off;
7
+ * unknown keys 400 at the route layer. Fields listed under
8
+ * SATELLITE_ROUTED live on public.person_enrichment and are fanned
9
+ * out from the service via syncPersonEnrichmentSatellite (see
10
+ * lib/services/people-admin/enrichment-satellite.ts).
3
11
  */
4
12
  import { PicaClient } from "@withpica/mcp-sdk";
5
13
  import { ToolDefinition, ToolExecutor } from "./index.js";
14
+ /**
15
+ * Canonical source for the pica_people_create / pica_people_update input
16
+ * shape. Mirror of PEOPLE_CORE_WRITE_FIELDS + PEOPLE_SATELLITE_ROUTED_FIELDS
17
+ * in lib/services/people-admin/write-constants.ts. Keep these two in sync:
18
+ * if a property is added here it must be added to the allow-list (so the
19
+ * HTTP route lets it through) and — if it's a satellite field — to
20
+ * ENRICHMENT_SATELLITE_FIELDS (so the service routes it to person_enrichment).
21
+ *
22
+ * Exported for future bulk-tool reuse.
23
+ */
24
+ export declare const PEOPLE_WRITE_PROPERTIES: {
25
+ readonly first_name: {
26
+ readonly type: "string";
27
+ readonly description: "First name";
28
+ };
29
+ readonly last_name: {
30
+ readonly type: "string";
31
+ readonly description: "Last name";
32
+ };
33
+ readonly middle_name: {
34
+ readonly type: "string";
35
+ readonly description: "Middle name";
36
+ };
37
+ readonly name: {
38
+ readonly type: "string";
39
+ readonly description: "Full name. Normally derived from first_name + last_name; set explicitly only for imports where the parts aren't separable.";
40
+ };
41
+ readonly stage_name: {
42
+ readonly type: "string";
43
+ readonly description: "Primary stage / artist name (legacy singular)";
44
+ };
45
+ readonly stage_names: {
46
+ readonly type: "array";
47
+ readonly items: {
48
+ readonly type: "string";
49
+ };
50
+ readonly description: "All stage / artist names (canonical plural)";
51
+ };
52
+ readonly person_type: {
53
+ readonly type: "array";
54
+ readonly items: {
55
+ readonly type: "string";
56
+ };
57
+ readonly description: "Person classification array (e.g. ['individual'], ['business']). Canonical column — `type` is a deprecated duplicate and will be rejected.";
58
+ };
59
+ readonly biography: {
60
+ readonly type: "string";
61
+ readonly description: "Biography text";
62
+ };
63
+ readonly email: {
64
+ readonly type: "string";
65
+ readonly description: "Primary email address";
66
+ };
67
+ readonly emails: {
68
+ readonly type: "array";
69
+ readonly items: {
70
+ readonly type: "object";
71
+ readonly properties: {
72
+ readonly email: {
73
+ readonly type: "string";
74
+ };
75
+ readonly label: {
76
+ readonly type: "string";
77
+ };
78
+ readonly primary: {
79
+ readonly type: "boolean";
80
+ };
81
+ };
82
+ };
83
+ readonly description: "Additional emails with label/primary metadata";
84
+ };
85
+ readonly phone: {
86
+ readonly type: "string";
87
+ readonly description: "Phone number";
88
+ };
89
+ readonly website: {
90
+ readonly type: "string";
91
+ readonly description: "Website URL";
92
+ };
93
+ readonly social_media: {
94
+ readonly type: "object";
95
+ readonly description: "Social handles keyed by platform, e.g. { twitter: '@ada', instagram: 'ada_lovelace' }";
96
+ };
97
+ readonly roles: {
98
+ readonly type: "array";
99
+ readonly items: {
100
+ readonly type: "string";
101
+ };
102
+ readonly description: "Roles (e.g. ['artist', 'songwriter', 'producer']). Canonical column — `role` singular is a deprecated duplicate and will be rejected. Defaults to ['collaborator'] on create if omitted.";
103
+ };
104
+ readonly tags: {
105
+ readonly type: "array";
106
+ readonly items: {
107
+ readonly type: "string";
108
+ };
109
+ readonly description: "Tags for categorisation";
110
+ };
111
+ readonly cae_ipi_number: {
112
+ readonly type: "string";
113
+ readonly description: "CAE/IPI number (songwriter/publisher identifier, 9-11 digits)";
114
+ };
115
+ readonly ipn_number: {
116
+ readonly type: "string";
117
+ readonly description: "IPN number (performer identifier)";
118
+ };
119
+ readonly prs_number: {
120
+ readonly type: "string";
121
+ readonly description: "PRS member number";
122
+ };
123
+ readonly ppl_number: {
124
+ readonly type: "string";
125
+ readonly description: "PPL member number";
126
+ };
127
+ readonly mcps_member_number: {
128
+ readonly type: "string";
129
+ readonly description: "MCPS member number";
130
+ };
131
+ readonly pro_name: {
132
+ readonly type: "string";
133
+ readonly description: "Performing rights organisation name (e.g. PRS, ASCAP, BMI, SACEM)";
134
+ };
135
+ readonly pro_member_number: {
136
+ readonly type: "string";
137
+ readonly description: "Member number at the PRO named in pro_name";
138
+ };
139
+ readonly default_publisher: {
140
+ readonly type: "string";
141
+ readonly description: "Default publisher name for this person";
142
+ };
143
+ readonly default_publisher_ipi: {
144
+ readonly type: "string";
145
+ readonly description: "Default publisher's IPI number";
146
+ };
147
+ readonly company: {
148
+ readonly type: "string";
149
+ readonly description: "Company / organisation name";
150
+ };
151
+ readonly position: {
152
+ readonly type: "string";
153
+ readonly description: "Job title / position at the company";
154
+ };
155
+ readonly territory: {
156
+ readonly type: "string";
157
+ readonly description: "Primary territory / market (e.g. 'UK', 'US East Coast')";
158
+ };
159
+ readonly relationship_strength: {
160
+ readonly type: "integer";
161
+ readonly description: "Relationship strength score (caller-defined scale)";
162
+ };
163
+ readonly email_preferences: {
164
+ readonly type: "object";
165
+ readonly description: "Email opt-in preferences, e.g. { monthly_digest: true, news_announcements: false }";
166
+ };
167
+ readonly profile_image_url: {
168
+ readonly type: "string";
169
+ readonly description: "URL to profile image";
170
+ };
171
+ readonly notes: {
172
+ readonly type: "string";
173
+ readonly description: "Internal notes";
174
+ };
175
+ readonly isni: {
176
+ readonly type: "string";
177
+ readonly description: "ISNI identifier (16 digits). Stored on person_enrichment satellite.";
178
+ };
179
+ readonly musicbrainz_id: {
180
+ readonly type: "string";
181
+ readonly description: "MusicBrainz artist ID (UUID). Stored on person_enrichment satellite.";
182
+ };
183
+ readonly wikidata_id: {
184
+ readonly type: "string";
185
+ readonly description: "Wikidata entity ID (e.g. Q7259). Stored on person_enrichment satellite.";
186
+ };
187
+ readonly discogs_artist_id: {
188
+ readonly type: "string";
189
+ readonly description: "Discogs artist ID. Stored on person_enrichment satellite.";
190
+ };
191
+ readonly deezer_artist_id: {
192
+ readonly type: "string";
193
+ readonly description: "Deezer artist ID. Stored on person_enrichment satellite.";
194
+ };
195
+ readonly date_of_birth: {
196
+ readonly type: "string";
197
+ readonly description: "Date of birth (ISO 8601, YYYY-MM-DD). Stored on person_enrichment satellite.";
198
+ };
199
+ readonly gender: {
200
+ readonly type: "string";
201
+ readonly description: "Gender (free text; commonly 'male' / 'female' / 'non_binary'). Stored on person_enrichment satellite.";
202
+ };
203
+ readonly nationality: {
204
+ readonly type: "string";
205
+ readonly description: "Nationality (free text; ISO country name preferred). Stored on person_enrichment satellite.";
206
+ };
207
+ readonly birth_place: {
208
+ readonly type: "string";
209
+ readonly description: "Place of birth (free text). Stored on person_enrichment satellite.";
210
+ };
211
+ readonly instruments: {
212
+ readonly type: "array";
213
+ readonly items: {
214
+ readonly type: "string";
215
+ };
216
+ readonly description: "Instruments played. Stored on person_enrichment satellite.";
217
+ };
218
+ readonly career_start_year: {
219
+ readonly type: "integer";
220
+ readonly description: "Year career started (4-digit). Stored on person_enrichment satellite.";
221
+ };
222
+ };
6
223
  export declare class PeopleTools {
7
- private pica;
8
- constructor(pica: PicaClient);
9
- /**
10
- * Get all people tools
11
- */
12
- getTools(): Array<{
13
- definition: ToolDefinition;
14
- executor: ToolExecutor;
15
- }>;
16
- /**
17
- * Query people — unified list + search
18
- */
19
- private queryPeople;
20
- /**
21
- * Inspect person — unified get + get_full with section filtering
22
- */
23
- private inspectPerson;
24
- /**
25
- * Create person
26
- */
27
- private createPerson;
28
- /**
29
- * Update person
30
- */
31
- private updatePerson;
32
- /**
33
- * Delete person
34
- */
35
- private deletePerson;
36
- /**
37
- * Enrich from ISNI
38
- */
39
- private enrichFromISNI;
40
- /**
41
- * Enrich from MusicBrainz
42
- */
43
- private enrichFromMusicBrainz;
224
+ private pica;
225
+ constructor(pica: PicaClient);
226
+ /**
227
+ * Get all people tools
228
+ */
229
+ getTools(): Array<{
230
+ definition: ToolDefinition;
231
+ executor: ToolExecutor;
232
+ }>;
233
+ /**
234
+ * Query people — unified list + search
235
+ */
236
+ private queryPeople;
237
+ /**
238
+ * Inspect person — unified get + get_full with section filtering
239
+ */
240
+ private inspectPerson;
241
+ /**
242
+ * Create person
243
+ */
244
+ private createPerson;
245
+ /**
246
+ * Update person
247
+ */
248
+ private updatePerson;
249
+ /**
250
+ * Delete person
251
+ */
252
+ private deletePerson;
253
+ /**
254
+ * ADR-179 Phase 2 deprecation path for the two per-source person
255
+ * enrichment tools. The tool definitions stay registered (so
256
+ * `tools/list` responses still surface them) but every call returns
257
+ * a structured `TOOL_DEPRECATED` error pointing at
258
+ * `pica_resolve_person`. This is the one-minor-version window
259
+ * described in ADR-179 Decision 2 — downstream clients with
260
+ * hardcoded names get a typed error and a suggested replacement
261
+ * call, not silent removal.
262
+ *
263
+ * Removal is scheduled for the next `@withpica/mcp-server` minor
264
+ * after Phase 4's publish; see the ADR's Phase 4 entry.
265
+ */
266
+ private enrichFromISNI;
267
+ private enrichFromMusicBrainz;
44
268
  }
45
- //# sourceMappingURL=people.d.ts.map
269
+ //# sourceMappingURL=people.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"people.d.ts","sourceRoot":"","sources":["../../src/tools/people.ts"],"names":[],"mappings":"AAEA;;GAEG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,cAAc,EAAE,YAAY,EAAc,MAAM,YAAY,CAAC;AAStE,qBAAa,WAAW;IACtB,OAAO,CAAC,IAAI,CAAa;gBAEb,IAAI,EAAE,UAAU;IAI5B;;OAEG;IACH,QAAQ,IAAI,KAAK,CAAC;QAAE,UAAU,EAAE,cAAc,CAAC;QAAC,QAAQ,EAAE,YAAY,CAAA;KAAE,CAAC;IAgazE;;OAEG;YACW,WAAW;IAwCzB;;OAEG;YACW,aAAa;IAsE3B;;OAEG;YACW,YAAY;IAkC1B;;OAEG;YACW,YAAY;IAM1B;;OAEG;YACW,YAAY;IAK1B;;OAEG;YACW,cAAc;IAK5B;;OAEG;YACW,qBAAqB;CASpC"}
1
+ {"version":3,"file":"people.d.ts","sourceRoot":"","sources":["../../src/tools/people.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,cAAc,EAAE,YAAY,EAAc,MAAM,YAAY,CAAC;AActE;;;;;;;;;GASG;AACH,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2L1B,CAAC;AAEX,qBAAa,WAAW;IACtB,OAAO,CAAC,IAAI,CAAa;gBAEb,IAAI,EAAE,UAAU;IAI5B;;OAEG;IACH,QAAQ,IAAI,KAAK,CAAC;QAAE,UAAU,EAAE,cAAc,CAAC;QAAC,QAAQ,EAAE,YAAY,CAAA;KAAE,CAAC;IA0KzE;;OAEG;YACW,WAAW;IAwCzB;;OAEG;YACW,aAAa;IA0F3B;;OAEG;YACW,YAAY;IAkC1B;;OAEG;YACW,YAAY;IAM1B;;OAEG;YACW,YAAY;IAK1B;;;;;;;;;;;;OAYG;YACW,cAAc;YAQd,qBAAqB;CASpC"}