@withpica/mcp-server 2.97.1 → 2.97.2

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 (63) hide show
  1. package/CHANGELOG.md +102 -0
  2. package/README.md +3 -3
  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/resources/agent-guide.d.ts.map +1 -1
  8. package/dist/resources/agent-guide.js +26 -11
  9. package/dist/resources/agent-guide.js.map +1 -1
  10. package/dist/resources/required-schemas.generated.d.ts +10 -1
  11. package/dist/resources/required-schemas.generated.d.ts.map +1 -1
  12. package/dist/resources/required-schemas.generated.js +19 -2
  13. package/dist/resources/required-schemas.generated.js.map +1 -1
  14. package/dist/resources/required-schemas.source.d.ts.map +1 -1
  15. package/dist/resources/required-schemas.source.js +19 -1
  16. package/dist/resources/required-schemas.source.js.map +1 -1
  17. package/dist/skills/skills.generated.js +1 -1
  18. package/dist/skills/skills.generated.js.map +1 -1
  19. package/dist/tools/api-error-body.d.ts +48 -0
  20. package/dist/tools/api-error-body.d.ts.map +1 -0
  21. package/dist/tools/api-error-body.js +88 -0
  22. package/dist/tools/api-error-body.js.map +1 -0
  23. package/dist/tools/approvals.d.ts.map +1 -1
  24. package/dist/tools/approvals.js +18 -1
  25. package/dist/tools/approvals.js.map +1 -1
  26. package/dist/tools/arg-aliases.d.ts.map +1 -1
  27. package/dist/tools/arg-aliases.js +11 -0
  28. package/dist/tools/arg-aliases.js.map +1 -1
  29. package/dist/tools/audio-files.d.ts +9 -0
  30. package/dist/tools/audio-files.d.ts.map +1 -1
  31. package/dist/tools/audio-files.js +109 -8
  32. package/dist/tools/audio-files.js.map +1 -1
  33. package/dist/tools/credits.d.ts +13 -0
  34. package/dist/tools/credits.d.ts.map +1 -1
  35. package/dist/tools/credits.js +193 -8
  36. package/dist/tools/credits.js.map +1 -1
  37. package/dist/tools/discovery.d.ts.map +1 -1
  38. package/dist/tools/discovery.js +52 -18
  39. package/dist/tools/discovery.js.map +1 -1
  40. package/dist/tools/duplicates.d.ts +7 -0
  41. package/dist/tools/duplicates.d.ts.map +1 -1
  42. package/dist/tools/duplicates.js +35 -5
  43. package/dist/tools/duplicates.js.map +1 -1
  44. package/dist/tools/import.d.ts.map +1 -1
  45. package/dist/tools/import.js +20 -0
  46. package/dist/tools/import.js.map +1 -1
  47. package/dist/tools/metadata.d.ts.map +1 -1
  48. package/dist/tools/metadata.js +8 -0
  49. package/dist/tools/metadata.js.map +1 -1
  50. package/dist/tools/recovery-hints.d.ts.map +1 -1
  51. package/dist/tools/recovery-hints.js +29 -0
  52. package/dist/tools/recovery-hints.js.map +1 -1
  53. package/dist/tools/share-links.d.ts.map +1 -1
  54. package/dist/tools/share-links.js +8 -1
  55. package/dist/tools/share-links.js.map +1 -1
  56. package/dist/tools/split-sheets.d.ts.map +1 -1
  57. package/dist/tools/split-sheets.js +7 -3
  58. package/dist/tools/split-sheets.js.map +1 -1
  59. package/dist/tools/works.d.ts.map +1 -1
  60. package/dist/tools/works.js +8 -1
  61. package/dist/tools/works.js.map +1 -1
  62. package/package.json +2 -2
  63. package/server.json +2 -2
package/CHANGELOG.md CHANGED
@@ -11,6 +11,108 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
11
11
 
12
12
  ## [Unreleased]
13
13
 
14
+ ## [2.97.2] - 2026-09-13
15
+
16
+ ### Fixed
17
+
18
+ - **`pica_credit_update` now actually returns `allocation.status`.** The
19
+ description promised it and the route sent it, but `@withpica/mcp-sdk`
20
+ < 3.17.0 unwrapped it away, so the response never carried it and the
21
+ "writer shares now total N%" hints could never fire. Requires mcp-sdk 3.17.0.
22
+
23
+ ### Added
24
+
25
+ - **`pica_credit_update` — edit ONE credit in place.** The verb between
26
+ `pica_credit_add` and `pica_credit_remove`: change a writer's share, an
27
+ instrumentalist's instrument, a role, the displayed name or notes, leaving
28
+ every other credit untouched and keeping the row's id and attestation state.
29
+ `pica_credits_update` remained replace-all, so one split change meant
30
+ re-listing every work and re-sending the whole array (ops issue bff0af25);
31
+ nothing edited a recording credit by its id — beyond the natural-key
32
+ upsert, a change meant remove-then-re-add (17f27449). Agents had already been calling this exact
33
+ name — it was the `TOOL_NOT_FOUND` miss in 167bb804, six times. Writer-split
34
+ closure is deliberately NOT enforced on a single edit; the response's
35
+ `allocation.status` (closed / open / incomplete) reports whether the set
36
+ still adds up instead. Backed by a new `PATCH
37
+ /admin/works/{id}/credits/{creditId}`, scoped to the work in the path.
38
+ - **`pica_recording_credits_update` batch mode accepts `instrument` per
39
+ credit** (`credits[].instrument`), applied on every target recording. Until
40
+ now crediting an instrumentalist across N recordings took N single calls.
41
+ - **`pica_import_streaming_link` returns `STREAMING_LINK_NOT_FOUND`** for a
42
+ link the provider cannot resolve — user input, not a PICA fault, and no
43
+ longer opens an ops issue. `STREAMING_IMPORT_FAILED` is now reserved for
44
+ genuine failures (timeouts, upstream errors). ⚠️ A client matching on the
45
+ old code for the not-found case will need the new one.
46
+ - **`pica_find_duplicates` accepts `entity_type: "audio_files"`** — the same
47
+ file uploaded twice, grouped on exact byte size + normalised filename
48
+ (`audio_files` carries no content hash). Each item reports `storage_bucket`;
49
+ a `withpica-*` bucket is storage PICA pays for. ⚠️ **Findable, not
50
+ mergeable:** `pica_merge_duplicates` refuses `audio_files` by design — the
51
+ outcome is a person deleting a redundant upload, and there is no merge
52
+ semantics for a file. The two entity lists are now deliberately different
53
+ sizes.
54
+ - **`pica_publishers_query` works at all.** `GET /admin/publishers` did not
55
+ exist, so every call since the tool shipped drew a bare 405 and surfaced as
56
+ `UNKNOWN_ERROR`. Searches by name (substring, on name and legal_name) or by
57
+ exact IPI.
58
+ - **`pica_approval_status` called with no `approval_id`** now explains what the
59
+ dashboard's "N awaiting approval" count is and who can act on it, instead of
60
+ answering "approval_id is required". There is deliberately no tool that lists
61
+ approvals — an agent grant cannot enumerate the approvals it is itself
62
+ waiting on.
63
+
64
+ ### Changed
65
+
66
+ - ⚠️ **Wire change: `pica_execute` now FORWARDS `pica_discover` and
67
+ `pica_tool_details`** instead of refusing them. A client matching on the old
68
+ literal `"meta-tools (pica_discover, pica_tool_details, pica_execute) cannot
69
+ be invoked via pica_execute"` will stop seeing that refusal. Only
70
+ `pica_execute` invoking ITSELF is still refused (that is the only case that
71
+ can recurse); its message changed accordingly. A connector that surfaces only
72
+ the wrapper teaches its agent to wrap everything, so refusing the two
73
+ read-only meta-tools blocked discovery for exactly the clients that need it.
74
+ - ⚠️ **`pica_audio_query`'s `query` filter now applies to ALL results.** It was
75
+ honoured only when `unassigned: true` was also set; a plain
76
+ `pica_audio_query {query: "…"}` returned the whole library in upload order
77
+ and truncated at the 100KB response cap. The parameter description said
78
+ "with unassigned:true" and no longer does.
79
+ - **`pica_audio_query` rows are a lean LIST shape.** The route flattens the
80
+ analysis satellite onto every row — `waveform_data` alone is ~4.9KB per file
81
+ on prod, three times the rest of the row — so the 100KB response guard was
82
+ trimming a page to about 8 files. List rows now carry identity, size,
83
+ duration, bpm/key/energy/mood, links, bucket and `probable_match`;
84
+ waveform, full analysis, `metadata` and the recording/work embeds are on
85
+ `pica_audio_inspect`. ⚠️ A client reading those fields off the list will
86
+ need the inspect call.
87
+ - **`pica_recording_splits_verify` records WHICH PERSON attested.** It now
88
+ resolves the signed-in user to their person record and stamps that as
89
+ `verified_by` (the column has always referenced `people`). ⚠️ Wire change:
90
+ an API-key / agent-grant call is refused with
91
+ `VERIFICATION_REQUIRES_HUMAN_SESSION` (message text changed), and a
92
+ signed-in user with no person record in the org gets
93
+ `ATTESTING_PERSON_NOT_FOUND`. Before this the endpoint had never succeeded
94
+ for anyone.
95
+ - **`pica_credits_update` accepts a signed sheet within ±0.01.** Its own
96
+ pre-flight used `!== 100`, so 33.34/33.34/33.33 (=100.01) and
97
+ 33.33×3 (=99.99) were refused before the API was called; the message text
98
+ changed.
99
+ - **`pica_share_links_create` returns `share_url`** beside `token`, so the
100
+ agent can hand the user a working link rather than sending them to the
101
+ dashboard to find it. `pica_share_links_query` returns it too. `token` is
102
+ unchanged.
103
+ - **`pica_recording_credits_update` no longer reports `PERSON_NOT_FOUND` when
104
+ the RECORDING is the missing one.** It dispatches on the route's own error
105
+ code rather than matching "not found" anywhere in the message, and a foreign
106
+ or non-existent `person_id` is now validated org-scoped before the write
107
+ (it previously reached the FK unchecked, which also accepted another
108
+ organisation's person).
109
+ - **`pica_tool_details` offers near-miss suggestions** (`did_you_mean`) for an
110
+ unknown tool name, in `structuredContent` as well as text — the same shape
111
+ `pica_execute`'s unknown-tool branch has returned since 2.96.
112
+ - **`pica_catalog_health_fix` accepts `actionIds` / `action_ids`** as aliases
113
+ for `accept` on the `pica_execute` path, and `INVALID_PLAN_TOKEN` now names
114
+ the remedy rather than only the reason.
115
+
14
116
  ## [2.97.1] - 2026-09-08
15
117
 
16
118
  ### Added
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
- 335 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
+ 336 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
 
@@ -119,7 +119,7 @@ Read tools are annotated read-only and are safe to call freely. Write tools repo
119
119
 
120
120
  `pica_notes_query`, `pica_notes_inspect`, `pica_notes_create`, `pica_notes_delete`
121
121
 
122
- **duplicates** — detect and merge duplicate records
122
+ **duplicates** — detect duplicate records and merge them (audio_files can be found but not merged — a duplicate file is deleted)
123
123
 
124
124
  `pica_find_duplicates`, `pica_merge_duplicates`
125
125
 
@@ -289,4 +289,4 @@ Read tools are annotated read-only and are safe to call freely. Write tools repo
289
289
 
290
290
  ---
291
291
 
292
- Generated for `@withpica/mcp-server@2.97.0`. © 2024-2026 Withpica Ltd. All rights reserved. MIT licensed.
292
+ Generated for `@withpica/mcp-server@2.97.1`. © 2024-2026 Withpica Ltd. All rights reserved. MIT licensed.