@withpica/mcp-server 2.99.0 → 2.100.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 (91) hide show
  1. package/CHANGELOG.md +156 -0
  2. package/README.md +6 -6
  3. package/dist/lib/changelog.generated.d.ts +2 -2
  4. package/dist/lib/changelog.generated.d.ts.map +1 -1
  5. package/dist/lib/changelog.generated.js +2 -2
  6. package/dist/lib/changelog.generated.js.map +1 -1
  7. package/dist/prompts/creator-question-atlas.d.ts.map +1 -1
  8. package/dist/prompts/creator-question-atlas.js +11 -0
  9. package/dist/prompts/creator-question-atlas.js.map +1 -1
  10. package/dist/prompts/index.js +1 -1
  11. package/dist/resources/agent-guide.d.ts.map +1 -1
  12. package/dist/resources/agent-guide.js +38 -7
  13. package/dist/resources/agent-guide.js.map +1 -1
  14. package/dist/resources/required-schemas.generated.d.ts +16 -10
  15. package/dist/resources/required-schemas.generated.d.ts.map +1 -1
  16. package/dist/resources/required-schemas.generated.js +29 -15
  17. package/dist/resources/required-schemas.generated.js.map +1 -1
  18. package/dist/resources/required-schemas.source.d.ts.map +1 -1
  19. package/dist/resources/required-schemas.source.js +15 -11
  20. package/dist/resources/required-schemas.source.js.map +1 -1
  21. package/dist/server-instructions.d.ts +2 -2
  22. package/dist/server-instructions.d.ts.map +1 -1
  23. package/dist/server-instructions.js +2 -2
  24. package/dist/server-instructions.js.map +1 -1
  25. package/dist/skills/skills.generated.js +2 -2
  26. package/dist/skills/skills.generated.js.map +1 -1
  27. package/dist/tools/api-error-body.d.ts +16 -4
  28. package/dist/tools/api-error-body.d.ts.map +1 -1
  29. package/dist/tools/api-error-body.js +40 -1
  30. package/dist/tools/api-error-body.js.map +1 -1
  31. package/dist/tools/approvals.d.ts.map +1 -1
  32. package/dist/tools/approvals.js +12 -1
  33. package/dist/tools/approvals.js.map +1 -1
  34. package/dist/tools/assets.d.ts.map +1 -1
  35. package/dist/tools/assets.js +15 -3
  36. package/dist/tools/assets.js.map +1 -1
  37. package/dist/tools/credits.d.ts.map +1 -1
  38. package/dist/tools/credits.js +198 -44
  39. package/dist/tools/credits.js.map +1 -1
  40. package/dist/tools/discovery.d.ts.map +1 -1
  41. package/dist/tools/discovery.js +13 -2
  42. package/dist/tools/discovery.js.map +1 -1
  43. package/dist/tools/documents.d.ts.map +1 -1
  44. package/dist/tools/documents.js +6 -4
  45. package/dist/tools/documents.js.map +1 -1
  46. package/dist/tools/duplicates.d.ts +13 -0
  47. package/dist/tools/duplicates.d.ts.map +1 -1
  48. package/dist/tools/duplicates.js +178 -1
  49. package/dist/tools/duplicates.js.map +1 -1
  50. package/dist/tools/import-documents.d.ts +1 -0
  51. package/dist/tools/import-documents.d.ts.map +1 -1
  52. package/dist/tools/import-documents.js +67 -0
  53. package/dist/tools/import-documents.js.map +1 -1
  54. package/dist/tools/import.d.ts.map +1 -1
  55. package/dist/tools/import.js +14 -0
  56. package/dist/tools/import.js.map +1 -1
  57. package/dist/tools/index.d.ts +2 -1
  58. package/dist/tools/index.d.ts.map +1 -1
  59. package/dist/tools/index.js +38 -0
  60. package/dist/tools/index.js.map +1 -1
  61. package/dist/tools/memory.d.ts.map +1 -1
  62. package/dist/tools/memory.js +24 -6
  63. package/dist/tools/memory.js.map +1 -1
  64. package/dist/tools/metadata.d.ts.map +1 -1
  65. package/dist/tools/metadata.js +42 -0
  66. package/dist/tools/metadata.js.map +1 -1
  67. package/dist/tools/people.d.ts +54 -22
  68. package/dist/tools/people.d.ts.map +1 -1
  69. package/dist/tools/people.js +236 -27
  70. package/dist/tools/people.js.map +1 -1
  71. package/dist/tools/profile-claims.d.ts +31 -0
  72. package/dist/tools/profile-claims.d.ts.map +1 -0
  73. package/dist/tools/profile-claims.js +188 -0
  74. package/dist/tools/profile-claims.js.map +1 -0
  75. package/dist/tools/public-filter.js +1 -1
  76. package/dist/tools/public-filter.js.map +1 -1
  77. package/dist/tools/recovery-hints.d.ts.map +1 -1
  78. package/dist/tools/recovery-hints.js +140 -7
  79. package/dist/tools/recovery-hints.js.map +1 -1
  80. package/dist/tools/rights.d.ts.map +1 -1
  81. package/dist/tools/rights.js +3 -0
  82. package/dist/tools/rights.js.map +1 -1
  83. package/dist/tools/shows.d.ts.map +1 -1
  84. package/dist/tools/shows.js +25 -2
  85. package/dist/tools/shows.js.map +1 -1
  86. package/dist/tools/split-sheets.d.ts +8 -0
  87. package/dist/tools/split-sheets.d.ts.map +1 -1
  88. package/dist/tools/split-sheets.js +178 -1
  89. package/dist/tools/split-sheets.js.map +1 -1
  90. package/package.json +2 -2
  91. package/server.json +2 -2
package/CHANGELOG.md CHANGED
@@ -11,6 +11,150 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
11
11
 
12
12
  ## [Unreleased]
13
13
 
14
+ ## [2.100.0] - 2026-10-04
15
+
16
+ ### Added
17
+
18
+ - **`pica_recording_splits_update` and `pica_recording_splits_end` — fix a
19
+ wrong ownership share.** Before, a recording split could only be created
20
+ through the API, so a wrong row (a holder-less "unknown" share, the wrong
21
+ percentage or role) blocked adding the right owner with
22
+ `RECORDING_SPLIT_TOTAL_EXCEEDED` and had to be fixed by hand in /inspect.
23
+ `_update` changes `person_id` (relink to a person in the organisation, not
24
+ deleted), percentage, role, `split_type`, territory, dates or notes; the 100%
25
+ total is checked after the change with the row's old value left out.
26
+ `_end` sets `end_date` (default today) so the share stops counting, keeping the
27
+ row as history. Both report `verification_cleared: true` when the change
28
+ cleared the holder's confirmation. Typed refusals: `SPLIT_NOT_FOUND`,
29
+ `PERSON_NOT_FOUND`, `PERSON_DELETED`, `SPLIT_ALREADY_ENDED`,
30
+ `INVALID_SPLIT_PERCENTAGE`, `INVALID_SPLIT_ROLE`, `INVALID_SPLIT_TYPE`,
31
+ `INVALID_SPLIT_TERRITORY`, `INVALID_SPLIT_DATES`, plus the existing split total / exists / locked codes.
32
+ - **`pica_merge_duplicates` takes a list — one approval for a whole cleanup.**
33
+ Send several confirmed duplicate groups as `merges` (up to 50 items of
34
+ `{entity_type, winner_id, loser_ids}`) instead of one call per group. A
35
+ delegated agent (OAuth connector / `pica_grant_*`) then raises ONE human
36
+ approval and the owner gets ONE email listing every pair, approved or
37
+ denied as a whole — before this, a 15-merge cleanup sent 15 emails, each
38
+ expiring on its own. Every pair is checked before the email goes out; one
39
+ bad pair refuses the list. Once approved, `pica_approval_status` returns a
40
+ per-pair outcome (`merged` / `skipped` because already merged or deleted /
41
+ `failed` with the reason); one failed pair does not stop the others, and the
42
+ approval reads `failed` if any pair failed. Callers that execute directly
43
+ get the same per-pair result. The single-merge fields work exactly as
44
+ before; send one shape or the other, never both. The tool's input schema no
45
+ longer lists a top-level `required`, because the two shapes cannot share
46
+ one.
47
+ - **`pica_people_split_identity` — give one person their own identity when
48
+ two different people share one** (ops 482424b7). The opposite of a merge:
49
+ when a wrong match (e.g. someone else's ISNI) joined two people to one
50
+ global identity, custody transfers to it can't tell whose it is and land as
51
+ "unknown". This gives the named person a new identity. Nothing is guessed:
52
+ identifiers stay with the original unless listed in `move_identifiers`, and
53
+ only the unattributed split rows listed in `relink_split_ids` move.
54
+ `clear_person_identifiers` removes identifiers that were never the person's
55
+ from their record; `undo_external_ids` strips everything a wrong external
56
+ record (e.g. a Wikidata Q-id) wrote. Custody legs are append-only and never
57
+ rewritten. Tier `destructive`, `approvalMode: "human"`, scope
58
+ `write:people`. `pica_people_inspect` gains a `global_identity` section
59
+ (only when named) that lists everything a split would touch.
60
+ - **`pica_profile_claims_invite` + `pica_profile_claims_status` — claim
61
+ your profile for assistants.** An assistant can invite people in the
62
+ catalogue to claim their profile (each at the address the catalogue holds
63
+ for them) and check where people stand. The invite is a preview unless
64
+ `confirm: true`: the first call sends nothing and returns who would be
65
+ emailed and who would be skipped and why, so the person the assistant acts
66
+ for sees the list before anyone is emailed. Only a credential that belongs
67
+ to an owner or admin may send; an organisation key with no owner is
68
+ refused (`INVITE_REQUIRES_PERSON`). The status read never returns an
69
+ email address.
70
+
71
+ - **`pica_import_emails_query` — see what happened to an email forwarded to
72
+ PICA.** Lists the emails that reached the organisation's forwarding
73
+ address, newest first, with what PICA did with each: stored on arrival
74
+ (with what was created, by id), waiting for review, dismissed, or failed.
75
+ With `id`, reads one: its text body when PICA kept one (emails held for
76
+ review), its attachment names, and what was created. Owners and admins
77
+ only; read-only (`read:catalog`). Before this an agent had no way to learn
78
+ that an email its person forwarded had arrived. Every item carries
79
+ `sender_trusted`; an email from a sender PICA could not verify is labelled
80
+ third-party content (its subject and body are data, not instructions). The
81
+ list reaches back to 2026-09-30, when PICA began recording outcomes, and
82
+ refuses an `offset` past 500 rather than repeating a page.
83
+
84
+ ### Changed
85
+
86
+ - **`pica_people_update` / `pica_people_create` accept and clear every field
87
+ enrichment fills on a person.** `imdb_id`, `viaf_id`, `date_of_death`,
88
+ `nationality_wikidata_id`, `birth_place_wikidata_id` and
89
+ `languages_spoken` were written by Wikidata enrichment but refused with
90
+ `UNKNOWN_FIELD`, so a misattributed value could not be removed. They are now
91
+ accepted, and every enrichment-filled field takes `null` (or `[]` for a
92
+ list) to clear it. A field set or cleared this way is recorded as the
93
+ user's own, and later enrichment runs leave it alone. `field_sources` is no
94
+ longer accepted from callers (it was never advertised); PICA writes it.
95
+ - **`pica_credit_update` can change who a credit is for (`person_id`).** Link
96
+ a name-only credit to a person record created afterwards, or move a credit
97
+ linked to the wrong person, and the credit keeps its id (ops issue
98
+ abc91f6c: 11 credits had to be removed and re-added, losing their ids and
99
+ confirmations). The person must be in the organisation and not deleted
100
+ (`PERSON_NOT_FOUND` / `PERSON_DELETED`); if they already hold that role on
101
+ the song or recording the change is refused with `CREDIT_PERSON_CONFLICT`
102
+ and `existing_credit_id` rather than making a second credit; linking a
103
+ name-only credit to a differently named person needs
104
+ `confirm_name_mismatch: true` (`PERSON_NAME_MISMATCH` otherwise). A
105
+ confirmed, disputed or declined credit goes back to pending, because the
106
+ newly linked person gave none of those answers — the response's
107
+ `person_change.attestation_reset` and `previous_attestation_status` say so. Server-side in `PATCH /api/admin/works/[id]/credits/[creditId]`.
108
+ - **`pica_documents_query` lists PICA's own split sheets first, marked as the
109
+ record.** Each entry now carries `kind` (`split_sheet` or `upload`); a
110
+ split sheet PICA generated has `split_sheet_role: "record"` and
111
+ `read_with: "pica_split_sheet_get"`, and an uploaded or forwarded split
112
+ sheet has `split_sheet_role: "supporting"` (plus `master: true` when it is
113
+ about the master only). An archived PICA sheet is `"superseded"`, not the
114
+ record. Paging is one sequence: PICA's sheets, then uploads, with `total`
115
+ covering both. With `parsed_status` `pending` or `completed`, only uploads
116
+ are listed. `pica_documents_link` / `_delete` take an entry with
117
+ `kind: "upload"`. Server-side change in `/api/admin/documents/catalog`;
118
+ the tool description says how to read each kind.
119
+
120
+ ### Fixed
121
+
122
+ - `pica_recording_credits_update` no longer advertises or forwards
123
+ `attestation_status`. A caller could create a producer or performer
124
+ credit already marked "attested" without the credited person ever
125
+ confirming it. The field is gone from the input schema, and a call that
126
+ sends any attestation field (`attestation_status`, `attested_at`,
127
+ `attested_by`, `attestation_source_type`, `attestation_source_id`), in
128
+ the single form or on any `credits[]` entry, is refused before anything
129
+ is written with `ATTESTATION_NOT_SETTABLE`. The refusal points at the way
130
+ a recording credit actually gets confirmed: `pica_collaborators_invite`
131
+ with the `recording_id`, or `pica_credits_send_for_attestation` on the
132
+ recording's song. The server refuses the same fields on
133
+ `POST /api/admin/recordings/[id]/credits` and the bulk route.
134
+ - `pica_credit_add` on a work now treats `share_pct: null` like an
135
+ omitted share: stored as unknown. The server refused an explicit `null`
136
+ with a 400, so a client that sends `null` for an empty optional field
137
+ (ChatGPT's connector does) could not add a credit without a share.
138
+ Server-side fix in `/api/admin/works/[id]/credits/atomic-add`; it reaches
139
+ every client on deploy. The input schema now declares `share_pct` as
140
+ number-or-null, matching `pica_credit_update`.
141
+ - When the server refuses `pica_credit_add` with a machine code
142
+ (`VALIDATION_ERROR`, `PERSON_ORG_MISMATCH`, `RECORDING_TARGET_REQUIRED`,
143
+ `INSUFFICIENT_SCOPE`, …), the tool now returns that code and message,
144
+ plus the fields the server put beside them (`remedy`, `person_ids`,
145
+ `next_tool`). It no longer reports those refusals as `CREDIT_ADD_FAILED`,
146
+ which read as a transport failure and invited a blind retry. A server
147
+ error (5xx), or a refusal with no code, is still `CREDIT_ADD_FAILED`.
148
+ - `pica_credits_update` no longer advertises `attestation_status`. The
149
+ server stopped accepting it on 2026-09-29 (a caller could mark a credit
150
+ "attested" with no one ever confirming it), but the tool kept offering
151
+ it, so agents sent it and the whole save failed with `UNKNOWN_FIELD`. The
152
+ field is gone from the input schema, the description and the
153
+ `work-credits-required` resource. A call that still sends it is refused
154
+ before anything is written with `ATTESTATION_NOT_SETTABLE`, naming the
155
+ entry and pointing at `pica_credits_send_for_attestation` — the way a
156
+ credit actually gets confirmed.
157
+
14
158
  ## [2.99.0] - 2026-09-30
15
159
 
16
160
  ### Added
@@ -95,6 +239,18 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
95
239
 
96
240
  ### Fixed
97
241
 
242
+ - `pica_sync_placements_cite` no longer answers 404 on every call: the SDK
243
+ posted to `/sync-placements/{id}/sources`, a route that never existed; it
244
+ now posts to `/cite` (needs the matching `@withpica/mcp-sdk` fix). The
245
+ sync-placement item routes also required `read:sync_placements` /
246
+ `write:sync_placements`, scopes no key can hold, so only `admin` keys got
247
+ through; they now require `read:agreements` / `write:agreements`, the
248
+ scopes these tools declare.
249
+ - `pica_physical_assets_inspect`'s `market` section no longer fails on every
250
+ call (the SDK sent GET to a POST-only route). Because that section asks an
251
+ AI model for a price estimate each time it runs, it is no longer part of
252
+ "omit sections for everything": it runs only when `sections` names
253
+ `market`, and needs a key with `write:catalog` (or `admin`).
98
254
  - `pica_integrity_waive`'s `gap_code` enum now lists `WORK_SPLITS_ABSENT` and
99
255
  `WORK_SPLITS_INVALID`, which the app has accepted since 2026-08-16.
100
256
  - **`pica_rights_statements`** (read:finances) — ADR-321 Phase 3, COMPUTED NOT
package/README.md CHANGED
@@ -65,7 +65,7 @@ Read tools are annotated read-only and are safe to call freely. Write tools repo
65
65
 
66
66
  ## Tools
67
67
 
68
- 343 tools, grouped below by the taxonomy `pica_discover` uses. The server's own `tools/list` is authoritative — not every registered tool is filed under a category yet, so the names below are a map, not a census.
68
+ 349 tools, grouped below by the taxonomy `pica_discover` uses. The server's own `tools/list` is authoritative — not every registered tool is filed under a category yet, so the names below are a map, not a census.
69
69
 
70
70
  **works** — manage your musical works
71
71
 
@@ -73,7 +73,7 @@ Read tools are annotated read-only and are safe to call freely. Write tools repo
73
73
 
74
74
  **people** — manage people in your catalog
75
75
 
76
- `pica_people_query`, `pica_people_inspect`, `pica_people_create`, `pica_people_update`, `pica_people_delete`, `pica_people_bulk_delete`, `pica_people_bulk_update_roles`, `pica_people_bulk_add_tags`, `pica_group_add_member`, `pica_group_remove_member`, `pica_group_list_members`, `pica_person_list_groups`, `pica_artist_projects`
76
+ `pica_people_query`, `pica_people_inspect`, `pica_people_create`, `pica_people_update`, `pica_people_delete`, `pica_people_bulk_delete`, `pica_people_split_identity`, `pica_people_bulk_update_roles`, `pica_people_bulk_add_tags`, `pica_group_add_member`, `pica_group_remove_member`, `pica_group_list_members`, `pica_person_list_groups`, `pica_artist_projects`, `pica_profile_claims_invite`, `pica_profile_claims_status`
77
77
 
78
78
  **groups** — manage group → member relationships on people
79
79
 
@@ -123,9 +123,9 @@ Read tools are annotated read-only and are safe to call freely. Write tools repo
123
123
 
124
124
  `pica_find_duplicates`, `pica_merge_duplicates`
125
125
 
126
- **import** — import catalog data from files and streaming services
126
+ **import** — import catalog data from files and streaming services, and see what happened to emails forwarded to PICA
127
127
 
128
- `pica_import_fields`, `pica_import_template`, `pica_import_analyze`, `pica_import_validate`, `pica_import_execute`, `pica_import_streaming_link`, `pica_import_documents_query`, `pica_import_documents_inspect`, `pica_import_youtube_link`, `pica_ingest_statement`
128
+ `pica_import_fields`, `pica_import_template`, `pica_import_analyze`, `pica_import_validate`, `pica_import_execute`, `pica_import_streaming_link`, `pica_import_documents_query`, `pica_import_documents_inspect`, `pica_import_emails_query`, `pica_import_youtube_link`, `pica_ingest_statement`
129
129
 
130
130
  **export** — export catalog data in various formats
131
131
 
@@ -229,7 +229,7 @@ Read tools are annotated read-only and are safe to call freely. Write tools repo
229
229
 
230
230
  **recording splits** — manage recording (master) splits between contributors
231
231
 
232
- `pica_recording_splits_list`, `pica_recording_splits_create`, `pica_recording_splits_verify`, `pica_split_sheet_generate`, `pica_recording_credits_update`
232
+ `pica_recording_splits_list`, `pica_recording_splits_create`, `pica_recording_splits_update`, `pica_recording_splits_end`, `pica_recording_splits_verify`, `pica_split_sheet_generate`, `pica_recording_credits_update`
233
233
 
234
234
  **royalties statements** — view royalties and ingested statements
235
235
 
@@ -293,4 +293,4 @@ Read tools are annotated read-only and are safe to call freely. Write tools repo
293
293
 
294
294
  ---
295
295
 
296
- Generated for `@withpica/mcp-server@2.99.0`. © 2024-2026 Withpica Ltd. All rights reserved. MIT licensed.
296
+ Generated for `@withpica/mcp-server@2.100.0`. © 2024-2026 Withpica Ltd. All rights reserved. MIT licensed.