@withpica/mcp-server 2.10.0 → 2.22.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 +838 -0
- package/dist/config.d.ts +9 -9
- package/dist/index.d.ts +1 -1
- package/dist/prompts/index.d.ts +64 -64
- package/dist/resources/index.d.ts +53 -53
- package/dist/server.d.ts +49 -49
- package/dist/tools/agreement-types.d.ts.map +1 -1
- package/dist/tools/agreement-types.js +14 -128
- 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/app-tools.d.ts.map +1 -1
- package/dist/tools/app-tools.js +30 -8
- package/dist/tools/app-tools.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/audio-files.d.ts.map +1 -1
- package/dist/tools/audio-files.js +10 -2
- package/dist/tools/audio-files.js.map +1 -1
- 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/collaborators.js +7 -7
- package/dist/tools/collaborators.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/custody.d.ts.map +1 -1
- package/dist/tools/custody.js +2 -1
- package/dist/tools/custody.js.map +1 -1
- package/dist/tools/discovery.d.ts.map +1 -1
- package/dist/tools/discovery.js +8 -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 +418 -21
- package/dist/tools/enrichment.js.map +1 -1
- package/dist/tools/exports.d.ts.map +1 -1
- package/dist/tools/exports.js +5 -1
- package/dist/tools/exports.js.map +1 -1
- package/dist/tools/import.js +3 -3
- package/dist/tools/import.js.map +1 -1
- package/dist/tools/index.d.ts +88 -72
- 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 +37 -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 +38 -38
- 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 +30 -30
- 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 +14 -1
- package/dist/tools/releases.d.ts.map +1 -1
- package/dist/tools/releases.js +247 -36
- package/dist/tools/releases.js.map +1 -1
- package/dist/tools/search.d.ts +20 -20
- 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 +1 -0
- package/dist/tools/settings.d.ts.map +1 -1
- package/dist/tools/settings.js +51 -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/uploads.d.ts.map +1 -1
- package/dist/tools/uploads.js +9 -2
- package/dist/tools/uploads.js.map +1 -1
- package/dist/tools/works.d.ts +38 -38
- package/package.json +1 -1
package/dist/tools/agreements.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
// Copyright (c) 2024-2026 Withpica Ltd. All rights reserved.
|
|
2
|
-
import { formatList, formatSuccess } from "@withpica/mcp-utils";
|
|
3
|
-
import { notifyParties, summarizeNotifications } from "@withpica/mcp-utils";
|
|
2
|
+
import { formatList, formatSuccess, notifyParties, summarizeNotifications, AGREEMENTS_WRITE_PROPERTIES, AGREEMENTS_CREATE_REQUIRED, AGREEMENTS_UPDATE_REQUIRED, } from "@withpica/mcp-utils";
|
|
4
3
|
const AGREEMENT_TYPE_ENUM = [
|
|
5
4
|
"master_recording",
|
|
6
5
|
"library_music",
|
|
@@ -100,64 +99,14 @@ export class AgreementsTools {
|
|
|
100
99
|
{
|
|
101
100
|
definition: {
|
|
102
101
|
name: "pica_agreements_create",
|
|
103
|
-
description: "Create a new agreement. Requires title
|
|
102
|
+
description: "Create a new agreement. Requires title + agreement_type + other_party_name. " +
|
|
103
|
+
"Prefer resolving the counterparty to a linked org via `counterparty_org_id` " +
|
|
104
|
+
"(use pica_search_all to look up the org UUID) over free-text other_party_name — " +
|
|
105
|
+
"the FK form is ADR-176-aligned and enables aggregate reporting by counterparty.",
|
|
104
106
|
inputSchema: {
|
|
105
107
|
type: "object",
|
|
106
|
-
properties:
|
|
107
|
-
|
|
108
|
-
type: "string",
|
|
109
|
-
description: "Agreement title",
|
|
110
|
-
},
|
|
111
|
-
agreement_type: {
|
|
112
|
-
type: "string",
|
|
113
|
-
description: "Type of agreement",
|
|
114
|
-
enum: [...AGREEMENT_TYPE_ENUM],
|
|
115
|
-
},
|
|
116
|
-
other_party_name: {
|
|
117
|
-
type: "string",
|
|
118
|
-
description: "Name of the other party (label, publisher, etc.)",
|
|
119
|
-
},
|
|
120
|
-
status: {
|
|
121
|
-
type: "string",
|
|
122
|
-
description: "Initial status (default: draft)",
|
|
123
|
-
enum: [
|
|
124
|
-
"draft",
|
|
125
|
-
"pending_signature",
|
|
126
|
-
"partially_signed",
|
|
127
|
-
"fully_executed",
|
|
128
|
-
"active",
|
|
129
|
-
"completed",
|
|
130
|
-
"terminated",
|
|
131
|
-
"expired",
|
|
132
|
-
"cancelled",
|
|
133
|
-
],
|
|
134
|
-
},
|
|
135
|
-
other_party_type: {
|
|
136
|
-
type: "string",
|
|
137
|
-
description: "Type of the other party (e.g., label, publisher, distributor)",
|
|
138
|
-
},
|
|
139
|
-
signing_date: {
|
|
140
|
-
type: "string",
|
|
141
|
-
description: "Date the agreement was signed (ISO 8601)",
|
|
142
|
-
},
|
|
143
|
-
start_date: {
|
|
144
|
-
type: "string",
|
|
145
|
-
description: "Start date of the agreement term (ISO 8601)",
|
|
146
|
-
},
|
|
147
|
-
end_date: {
|
|
148
|
-
type: "string",
|
|
149
|
-
description: "End date of the agreement term (ISO 8601)",
|
|
150
|
-
},
|
|
151
|
-
description: {
|
|
152
|
-
type: "string",
|
|
153
|
-
description: "Description of the agreement",
|
|
154
|
-
},
|
|
155
|
-
notes: {
|
|
156
|
-
type: "string",
|
|
157
|
-
description: "Internal notes",
|
|
158
|
-
},
|
|
159
|
-
},
|
|
160
|
-
required: ["title", "agreement_type", "other_party_name"],
|
|
108
|
+
properties: AGREEMENTS_WRITE_PROPERTIES,
|
|
109
|
+
required: [...AGREEMENTS_CREATE_REQUIRED],
|
|
161
110
|
},
|
|
162
111
|
},
|
|
163
112
|
executor: this.createAgreement.bind(this),
|
|
@@ -165,59 +114,12 @@ export class AgreementsTools {
|
|
|
165
114
|
{
|
|
166
115
|
definition: {
|
|
167
116
|
name: "pica_agreements_update",
|
|
168
|
-
description: "Update an existing agreement. Status changes trigger notifications
|
|
117
|
+
description: "Update an existing agreement. Status changes trigger notifications; " +
|
|
118
|
+
"counterparty_org_id changes require the linked-org check at the route layer.",
|
|
169
119
|
inputSchema: {
|
|
170
120
|
type: "object",
|
|
171
|
-
properties:
|
|
172
|
-
|
|
173
|
-
type: "string",
|
|
174
|
-
description: "Agreement ID",
|
|
175
|
-
},
|
|
176
|
-
title: {
|
|
177
|
-
type: "string",
|
|
178
|
-
description: "Updated title",
|
|
179
|
-
},
|
|
180
|
-
status: {
|
|
181
|
-
type: "string",
|
|
182
|
-
description: "Updated status",
|
|
183
|
-
enum: [
|
|
184
|
-
"draft",
|
|
185
|
-
"pending_signature",
|
|
186
|
-
"partially_signed",
|
|
187
|
-
"fully_executed",
|
|
188
|
-
"active",
|
|
189
|
-
"completed",
|
|
190
|
-
"terminated",
|
|
191
|
-
"expired",
|
|
192
|
-
"cancelled",
|
|
193
|
-
],
|
|
194
|
-
},
|
|
195
|
-
other_party_name: {
|
|
196
|
-
type: "string",
|
|
197
|
-
description: "Updated other party name",
|
|
198
|
-
},
|
|
199
|
-
signing_date: {
|
|
200
|
-
type: "string",
|
|
201
|
-
description: "Updated signing date (ISO 8601)",
|
|
202
|
-
},
|
|
203
|
-
start_date: {
|
|
204
|
-
type: "string",
|
|
205
|
-
description: "Updated start date (ISO 8601)",
|
|
206
|
-
},
|
|
207
|
-
end_date: {
|
|
208
|
-
type: "string",
|
|
209
|
-
description: "Updated end date (ISO 8601)",
|
|
210
|
-
},
|
|
211
|
-
description: {
|
|
212
|
-
type: "string",
|
|
213
|
-
description: "Updated description",
|
|
214
|
-
},
|
|
215
|
-
notes: {
|
|
216
|
-
type: "string",
|
|
217
|
-
description: "Updated internal notes",
|
|
218
|
-
},
|
|
219
|
-
},
|
|
220
|
-
required: ["id"],
|
|
121
|
+
properties: AGREEMENTS_WRITE_PROPERTIES,
|
|
122
|
+
required: [...AGREEMENTS_UPDATE_REQUIRED],
|
|
221
123
|
},
|
|
222
124
|
},
|
|
223
125
|
executor: this.updateAgreement.bind(this),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agreements.js","sourceRoot":"","sources":["../../src/tools/agreements.ts"],"names":[],"mappings":"AAAA,6DAA6D;AAQ7D,OAAO,
|
|
1
|
+
{"version":3,"file":"agreements.js","sourceRoot":"","sources":["../../src/tools/agreements.ts"],"names":[],"mappings":"AAAA,6DAA6D;AAQ7D,OAAO,EAEL,UAAU,EACV,aAAa,EACb,aAAa,EACb,sBAAsB,EACtB,2BAA2B,EAC3B,0BAA0B,EAC1B,0BAA0B,GAC3B,MAAM,qBAAqB,CAAC;AAE7B,MAAM,mBAAmB,GAAG;IAC1B,kBAAkB;IAClB,eAAe;IACf,kBAAkB;IAClB,YAAY;IACZ,iBAAiB;IACjB,aAAa;IACb,QAAQ;IACR,OAAO;IACP,gBAAgB;IAChB,eAAe;IACf,YAAY;IACZ,cAAc;CACN,CAAC;AAEX,MAAM,OAAO,eAAe;IAClB,IAAI,CAAa;IAEzB,YAAY,IAAgB;QAC1B,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACnB,CAAC;IAED,QAAQ;QACN,OAAO;YACL;gBACE,UAAU,EAAE;oBACV,IAAI,EAAE,uBAAuB;oBAC7B,WAAW,EACT,mGAAmG;oBACrG,WAAW,EAAE;wBACX,IAAI,EAAE,QAAQ;wBACd,UAAU,EAAE;4BACV,KAAK,EAAE;gCACL,IAAI,EAAE,QAAQ;gCACd,WAAW,EAAE,+BAA+B;6BAC7C;4BACD,cAAc,EAAE;gCACd,IAAI,EAAE,QAAQ;gCACd,WAAW,EAAE,0BAA0B;gCACvC,IAAI,EAAE,CAAC,GAAG,mBAAmB,CAAC;6BAC/B;4BACD,MAAM,EAAE;gCACN,IAAI,EAAE,QAAQ;gCACd,WAAW,EAAE,kBAAkB;gCAC/B,IAAI,EAAE;oCACJ,OAAO;oCACP,mBAAmB;oCACnB,kBAAkB;oCAClB,gBAAgB;oCAChB,QAAQ;oCACR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,MAAM,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,IAAI,CAAC,YAAY,EAAE;YAClE,OAAO,EAAE,IAAI,CAAC,OAAO;YACrB,wBAAwB,EAAE,IAAI,CAAC,wBAAwB;YACvD,KAAK,EAAE,IAAI,CAAC,KAAK;SAClB,CAAC,CAAC;QACH,OAAO,aAAa,CAAC,0BAA0B,EAAE,IAAI,CAAC,CAAC;IACzD,CAAC;CACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app-tools.d.ts","sourceRoot":"","sources":["../../src/tools/app-tools.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"app-tools.d.ts","sourceRoot":"","sources":["../../src/tools/app-tools.ts"],"names":[],"mappings":"AAIA;;;;;GAKG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,cAAc,EAAE,YAAY,EAAc,MAAM,YAAY,CAAC;AAYtE,qBAAa,QAAQ;IACnB,OAAO,CAAC,IAAI,CAAa;IACzB,OAAO,CAAC,WAAW,CAAc;gBAErB,IAAI,EAAE,UAAU;IAK5B,QAAQ,IAAI,KAAK,CAAC;QAAE,UAAU,EAAE,cAAc,CAAC;QAAC,QAAQ,EAAE,YAAY,CAAA;KAAE,CAAC;YA4J3D,UAAU;YAuEV,MAAM;YAqBN,QAAQ;CA8BvB"}
|
package/dist/tools/app-tools.js
CHANGED
|
@@ -27,8 +27,12 @@ export class AppTools {
|
|
|
27
27
|
"has files on their device that PICA needs — audio, photos, documents, stems, " +
|
|
28
28
|
"session files, anything. Returns metadata for each uploaded file " +
|
|
29
29
|
"(id, url, mime_type, size) so you can link them to works, recordings, " +
|
|
30
|
-
"assets, agreements, or wherever they belong.
|
|
31
|
-
"
|
|
30
|
+
"assets, agreements, or wherever they belong. " +
|
|
31
|
+
"NOTE: this card only renders in PICA's own chat harness. If you are in " +
|
|
32
|
+
"ChatGPT, Gemini, or another external client, tell the user they can upload " +
|
|
33
|
+
"files directly at https://withpica.com/workspace (drag and drop, any file type) " +
|
|
34
|
+
"and offer to help link them afterwards. For programmatic uploads where you " +
|
|
35
|
+
"already have file details: call pica_upload_file + pica_upload_complete.",
|
|
32
36
|
inputSchema: {
|
|
33
37
|
type: "object",
|
|
34
38
|
properties: {
|
|
@@ -62,7 +66,10 @@ export class AppTools {
|
|
|
62
66
|
"tool (pica_export_catalog_csv, pica_export_catalog_asset_report, " +
|
|
63
67
|
"pica_export_industry_ready, pica_export_song_registration, pica_export_ai_consent, " +
|
|
64
68
|
"etc.) to deliver the file directly to the user's device. The card shows file " +
|
|
65
|
-
"name, size, type, and a download button."
|
|
69
|
+
"name, size, type, and a download button. " +
|
|
70
|
+
"NOTE: this card only renders in PICA's own chat harness. If you are in " +
|
|
71
|
+
"ChatGPT, Gemini, or another external client, share the download URL as a " +
|
|
72
|
+
"clickable link so the user can save the file from their browser.",
|
|
66
73
|
inputSchema: {
|
|
67
74
|
type: "object",
|
|
68
75
|
properties: {
|
|
@@ -125,11 +132,26 @@ export class AppTools {
|
|
|
125
132
|
description: "Which sections to include. Ownership is always included. Same shape as " +
|
|
126
133
|
"pica_export_catalog_asset_report.",
|
|
127
134
|
properties: {
|
|
128
|
-
valuation: {
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
135
|
+
valuation: {
|
|
136
|
+
type: "boolean",
|
|
137
|
+
description: "Include financial valuation section",
|
|
138
|
+
},
|
|
139
|
+
assets: {
|
|
140
|
+
type: "boolean",
|
|
141
|
+
description: "Include multimedia and production assets section",
|
|
142
|
+
},
|
|
143
|
+
agreements: {
|
|
144
|
+
type: "boolean",
|
|
145
|
+
description: "Include agreements and licensing section",
|
|
146
|
+
},
|
|
147
|
+
intelligence: {
|
|
148
|
+
type: "boolean",
|
|
149
|
+
description: "Include market intelligence section",
|
|
150
|
+
},
|
|
151
|
+
audio: {
|
|
152
|
+
type: "boolean",
|
|
153
|
+
description: "Include audio analysis section",
|
|
154
|
+
},
|
|
133
155
|
},
|
|
134
156
|
},
|
|
135
157
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app-tools.js","sourceRoot":"","sources":["../../src/tools/app-tools.ts"],"names":[],"mappings":"AAAA,6DAA6D;
|
|
1
|
+
{"version":3,"file":"app-tools.js","sourceRoot":"","sources":["../../src/tools/app-tools.ts"],"names":[],"mappings":"AAAA,6DAA6D;AAa7D,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAE3C,SAAS,WAAW,CAAC,KAAgC;IACnD,IAAI,KAAK,IAAI,IAAI,IAAI,KAAK,CAAC,KAAK,CAAC;QAAE,OAAO,EAAE,CAAC;IAC7C,IAAI,KAAK,GAAG,IAAI;QAAE,OAAO,GAAG,KAAK,IAAI,CAAC;IACtC,IAAI,KAAK,GAAG,IAAI,GAAG,IAAI;QAAE,OAAO,GAAG,CAAC,KAAK,GAAG,IAAI,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC;IAClE,IAAI,KAAK,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI;QAC5B,OAAO,GAAG,CAAC,KAAK,GAAG,CAAC,IAAI,GAAG,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC;IACpD,OAAO,GAAG,CAAC,KAAK,GAAG,CAAC,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC;AAC3D,CAAC;AAED,MAAM,OAAO,QAAQ;IACX,IAAI,CAAa;IACjB,WAAW,CAAc;IAEjC,YAAY,IAAgB;QAC1B,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,WAAW,GAAG,IAAI,WAAW,CAAC,IAAI,CAAC,CAAC;IAC3C,CAAC;IAED,QAAQ;QACN,OAAO;YACL;gBACE,UAAU,EAAE;oBACV,IAAI,EAAE,aAAa;oBACnB,WA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,SAAS,kBAAkB,GAAG,EAAE,CAAC;QAEnF,OAAO;YACL,OAAO,EAAE;gBACP;oBACE,IAAI,EAAE,MAAM;oBACZ,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC;wBACnB,YAAY,EAAE,WAAW;wBACzB,IAAI,EAAE;4BACJ,GAAG;4BACH,QAAQ;4BACR,SAAS;4BACT,IAAI;4BACJ,WAAW;4BACX,UAAU;yBACX;qBACF,CAAC;iBACH;aACF;SACF,CAAC;IACJ,CAAC;CACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"assets.d.ts","sourceRoot":"","sources":["../../src/tools/assets.ts"],"names":[],"mappings":"AAEA;;GAEG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,cAAc,EAAE,YAAY,EAAc,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"assets.d.ts","sourceRoot":"","sources":["../../src/tools/assets.ts"],"names":[],"mappings":"AAEA;;GAEG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,cAAc,EAAE,YAAY,EAAc,MAAM,YAAY,CAAC;AAUtE,qBAAa,WAAW;IACtB,OAAO,CAAC,IAAI,CAAa;gBAEb,IAAI,EAAE,UAAU;IAI5B,QAAQ,IAAI,KAAK,CAAC;QAAE,UAAU,EAAE,cAAc,CAAC;QAAC,QAAQ,EAAE,YAAY,CAAA;KAAE,CAAC;YAoS3D,UAAU;YAWV,YAAY;YA6DZ,WAAW;YAOX,WAAW;YAQX,WAAW;YAOX,UAAU;YAOV,WAAW;YASX,eAAe;YAef,oBAAoB;YAepB,eAAe;YAYf,oBAAoB;CAWnC"}
|
package/dist/tools/assets.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// Copyright (c) 2024-2026 Withpica Ltd. All rights reserved.
|
|
2
|
-
import { formatAsText, formatSuccess, formatStructuredList, } from "@withpica/mcp-utils";
|
|
2
|
+
import { formatAsText, formatSuccess, formatStructuredList, PHYSICAL_ASSETS_WRITE_PROPERTIES, PHYSICAL_ASSETS_CREATE_REQUIRED, PHYSICAL_ASSETS_UPDATE_REQUIRED, } from "@withpica/mcp-utils";
|
|
3
3
|
export class AssetsTools {
|
|
4
4
|
pica;
|
|
5
5
|
constructor(pica) {
|
|
@@ -56,156 +56,17 @@ export class AssetsTools {
|
|
|
56
56
|
{
|
|
57
57
|
definition: {
|
|
58
58
|
name: "pica_physical_assets_create",
|
|
59
|
-
description: "Register a new physical asset — instrument,
|
|
60
|
-
"
|
|
61
|
-
"
|
|
62
|
-
"
|
|
59
|
+
description: "Register a new physical asset — instrument, equipment, software, " +
|
|
60
|
+
"studio space, or other (matches the physical_assets_asset_type_check " +
|
|
61
|
+
"DB constraint). Tracks identity, condition, acquisition, photos, and " +
|
|
62
|
+
"status as real columns. Valuation and insurance details belong inside " +
|
|
63
|
+
"`external_references` jsonb (see key enumeration on that field). " +
|
|
64
|
+
"Pair with pica_upload (accept: 'image') to capture photo evidence via " +
|
|
65
|
+
"a drop zone.",
|
|
63
66
|
inputSchema: {
|
|
64
67
|
type: "object",
|
|
65
|
-
properties:
|
|
66
|
-
|
|
67
|
-
name: {
|
|
68
|
-
type: "string",
|
|
69
|
-
description: "Asset name (e.g. 'Fender Stratocaster 1962')",
|
|
70
|
-
},
|
|
71
|
-
asset_type: {
|
|
72
|
-
type: "string",
|
|
73
|
-
description: "Asset type (required). Valid values: instrument, amplifier, studio_equipment, software_license, other",
|
|
74
|
-
},
|
|
75
|
-
category: {
|
|
76
|
-
type: "string",
|
|
77
|
-
description: "Free-text subcategory (e.g. 'guitar', 'keyboard', 'microphone', 'daw', 'plugin')",
|
|
78
|
-
},
|
|
79
|
-
make: {
|
|
80
|
-
type: "string",
|
|
81
|
-
description: "Manufacturer (e.g. 'Fender', 'Neumann')",
|
|
82
|
-
},
|
|
83
|
-
model: {
|
|
84
|
-
type: "string",
|
|
85
|
-
description: "Model name (e.g. 'Stratocaster', 'U87')",
|
|
86
|
-
},
|
|
87
|
-
year: {
|
|
88
|
-
type: "number",
|
|
89
|
-
description: "Year of manufacture",
|
|
90
|
-
},
|
|
91
|
-
serial_number: {
|
|
92
|
-
type: "string",
|
|
93
|
-
description: "Serial number if available",
|
|
94
|
-
},
|
|
95
|
-
color: {
|
|
96
|
-
type: "string",
|
|
97
|
-
description: "Colour/finish",
|
|
98
|
-
},
|
|
99
|
-
description: {
|
|
100
|
-
type: "string",
|
|
101
|
-
description: "Freeform description",
|
|
102
|
-
},
|
|
103
|
-
// ── Condition ──
|
|
104
|
-
condition: {
|
|
105
|
-
type: "string",
|
|
106
|
-
description: "Condition. Valid values: mint, excellent, very_good, good, fair, poor",
|
|
107
|
-
},
|
|
108
|
-
condition_notes: {
|
|
109
|
-
type: "string",
|
|
110
|
-
description: "Notes about the condition",
|
|
111
|
-
},
|
|
112
|
-
// ── Acquisition ──
|
|
113
|
-
acquired_at: {
|
|
114
|
-
type: "string",
|
|
115
|
-
description: "Acquisition date (YYYY-MM-DD)",
|
|
116
|
-
},
|
|
117
|
-
acquisition_method: {
|
|
118
|
-
type: "string",
|
|
119
|
-
description: "How acquired. Valid values: purchased, gift, inherited, trade, rental, unknown",
|
|
120
|
-
},
|
|
121
|
-
acquisition_vendor: {
|
|
122
|
-
type: "string",
|
|
123
|
-
description: "Where it was bought (e.g. 'Denmark Street Music')",
|
|
124
|
-
},
|
|
125
|
-
acquisition_price: {
|
|
126
|
-
type: "number",
|
|
127
|
-
description: "Original purchase/acquisition price",
|
|
128
|
-
},
|
|
129
|
-
acquisition_currency: {
|
|
130
|
-
type: "string",
|
|
131
|
-
description: "Currency code for acquisition price (default: GBP)",
|
|
132
|
-
},
|
|
133
|
-
// ── Valuation ──
|
|
134
|
-
current_valuation: {
|
|
135
|
-
type: "number",
|
|
136
|
-
description: "Estimated current value",
|
|
137
|
-
},
|
|
138
|
-
valuation_currency: {
|
|
139
|
-
type: "string",
|
|
140
|
-
description: "Currency code for current valuation (default: GBP)",
|
|
141
|
-
},
|
|
142
|
-
valuation_source: {
|
|
143
|
-
type: "string",
|
|
144
|
-
description: "Source of valuation. Valid values: reverb_price_guide, blue_book, ebay_sold, manual, appraiser",
|
|
145
|
-
},
|
|
146
|
-
valuation_date: {
|
|
147
|
-
type: "string",
|
|
148
|
-
description: "Date of valuation (YYYY-MM-DD)",
|
|
149
|
-
},
|
|
150
|
-
valuation_notes: {
|
|
151
|
-
type: "string",
|
|
152
|
-
description: "Notes about the valuation",
|
|
153
|
-
},
|
|
154
|
-
reverb_listing_url: {
|
|
155
|
-
type: "string",
|
|
156
|
-
description: "Reverb listing URL for price reference",
|
|
157
|
-
},
|
|
158
|
-
ebay_item_url: {
|
|
159
|
-
type: "string",
|
|
160
|
-
description: "eBay item URL for price reference",
|
|
161
|
-
},
|
|
162
|
-
// ── Photos ──
|
|
163
|
-
photos: {
|
|
164
|
-
type: "array",
|
|
165
|
-
description: "Array of photo objects. Each: { url, uploaded_at, mime_type, size }",
|
|
166
|
-
items: {
|
|
167
|
-
type: "object",
|
|
168
|
-
additionalProperties: true,
|
|
169
|
-
},
|
|
170
|
-
},
|
|
171
|
-
primary_photo_url: {
|
|
172
|
-
type: "string",
|
|
173
|
-
description: "URL of the primary photo to display",
|
|
174
|
-
},
|
|
175
|
-
// ── Status + Insurance ──
|
|
176
|
-
status: {
|
|
177
|
-
type: "string",
|
|
178
|
-
description: "Asset status. Valid values: active, sold, lost, stolen, disposed (default: active)",
|
|
179
|
-
},
|
|
180
|
-
insured: {
|
|
181
|
-
type: "boolean",
|
|
182
|
-
description: "Whether the asset is insured",
|
|
183
|
-
},
|
|
184
|
-
insurance_provider: {
|
|
185
|
-
type: "string",
|
|
186
|
-
description: "Insurance company name",
|
|
187
|
-
},
|
|
188
|
-
insurance_policy_number: {
|
|
189
|
-
type: "string",
|
|
190
|
-
description: "Insurance policy number",
|
|
191
|
-
},
|
|
192
|
-
insurance_coverage: {
|
|
193
|
-
type: "number",
|
|
194
|
-
description: "Insured coverage amount",
|
|
195
|
-
},
|
|
196
|
-
// ── Meta ──
|
|
197
|
-
notes: {
|
|
198
|
-
type: "string",
|
|
199
|
-
description: "General notes about the asset",
|
|
200
|
-
},
|
|
201
|
-
tags: {
|
|
202
|
-
type: "array",
|
|
203
|
-
description: "Freeform tags for organising assets",
|
|
204
|
-
items: { type: "string" },
|
|
205
|
-
},
|
|
206
|
-
},
|
|
207
|
-
required: ["name", "asset_type"],
|
|
208
|
-
additionalProperties: true,
|
|
68
|
+
properties: PHYSICAL_ASSETS_WRITE_PROPERTIES,
|
|
69
|
+
required: [...PHYSICAL_ASSETS_CREATE_REQUIRED],
|
|
209
70
|
},
|
|
210
71
|
},
|
|
211
72
|
executor: this.createAsset.bind(this),
|
|
@@ -213,120 +74,19 @@ export class AssetsTools {
|
|
|
213
74
|
{
|
|
214
75
|
definition: {
|
|
215
76
|
name: "pica_physical_assets_update",
|
|
216
|
-
description: "Update a physical asset
|
|
217
|
-
"
|
|
77
|
+
description: "Update a physical asset. All create fields are optional on update; " +
|
|
78
|
+
"`id` is required. Valuation and insurance changes go through " +
|
|
79
|
+
"`external_references` (current_valuation, valuation_source, " +
|
|
80
|
+
"reverb_listing_url, insurer, insured_value, etc.) — there is no " +
|
|
81
|
+
"top-level valuation column on physical_assets. Pair with pica_upload " +
|
|
218
82
|
"(accept: 'image') to add more photo evidence.",
|
|
219
83
|
inputSchema: {
|
|
220
84
|
type: "object",
|
|
221
85
|
properties: {
|
|
222
86
|
id: { type: "string", description: "Asset ID" },
|
|
223
|
-
|
|
224
|
-
name: { type: "string", description: "Asset name" },
|
|
225
|
-
asset_type: {
|
|
226
|
-
type: "string",
|
|
227
|
-
description: "Asset type. Valid values: instrument, amplifier, studio_equipment, software_license, other",
|
|
228
|
-
},
|
|
229
|
-
category: {
|
|
230
|
-
type: "string",
|
|
231
|
-
description: "Free-text subcategory",
|
|
232
|
-
},
|
|
233
|
-
make: { type: "string", description: "Manufacturer" },
|
|
234
|
-
model: { type: "string", description: "Model name" },
|
|
235
|
-
year: { type: "number", description: "Year of manufacture" },
|
|
236
|
-
serial_number: { type: "string", description: "Serial number" },
|
|
237
|
-
color: { type: "string", description: "Colour/finish" },
|
|
238
|
-
description: {
|
|
239
|
-
type: "string",
|
|
240
|
-
description: "Freeform description",
|
|
241
|
-
},
|
|
242
|
-
condition: {
|
|
243
|
-
type: "string",
|
|
244
|
-
description: "Condition. Valid values: mint, excellent, very_good, good, fair, poor",
|
|
245
|
-
},
|
|
246
|
-
condition_notes: {
|
|
247
|
-
type: "string",
|
|
248
|
-
description: "Notes about condition",
|
|
249
|
-
},
|
|
250
|
-
acquired_at: {
|
|
251
|
-
type: "string",
|
|
252
|
-
description: "Acquisition date (YYYY-MM-DD)",
|
|
253
|
-
},
|
|
254
|
-
acquisition_method: {
|
|
255
|
-
type: "string",
|
|
256
|
-
description: "How acquired. Valid values: purchased, gift, inherited, trade, rental, unknown",
|
|
257
|
-
},
|
|
258
|
-
acquisition_vendor: {
|
|
259
|
-
type: "string",
|
|
260
|
-
description: "Where bought",
|
|
261
|
-
},
|
|
262
|
-
acquisition_price: {
|
|
263
|
-
type: "number",
|
|
264
|
-
description: "Acquisition price",
|
|
265
|
-
},
|
|
266
|
-
acquisition_currency: {
|
|
267
|
-
type: "string",
|
|
268
|
-
description: "Currency code (default: GBP)",
|
|
269
|
-
},
|
|
270
|
-
current_valuation: {
|
|
271
|
-
type: "number",
|
|
272
|
-
description: "Current value",
|
|
273
|
-
},
|
|
274
|
-
valuation_currency: {
|
|
275
|
-
type: "string",
|
|
276
|
-
description: "Currency code (default: GBP)",
|
|
277
|
-
},
|
|
278
|
-
valuation_source: {
|
|
279
|
-
type: "string",
|
|
280
|
-
description: "Source of valuation. Valid values: reverb_price_guide, blue_book, ebay_sold, manual, appraiser",
|
|
281
|
-
},
|
|
282
|
-
valuation_date: {
|
|
283
|
-
type: "string",
|
|
284
|
-
description: "Date of valuation (YYYY-MM-DD)",
|
|
285
|
-
},
|
|
286
|
-
valuation_notes: {
|
|
287
|
-
type: "string",
|
|
288
|
-
description: "Notes about valuation",
|
|
289
|
-
},
|
|
290
|
-
reverb_listing_url: {
|
|
291
|
-
type: "string",
|
|
292
|
-
description: "Reverb listing URL",
|
|
293
|
-
},
|
|
294
|
-
ebay_item_url: { type: "string", description: "eBay item URL" },
|
|
295
|
-
photos: {
|
|
296
|
-
type: "array",
|
|
297
|
-
description: "Array of photo objects. Each: { url, uploaded_at, mime_type, size }",
|
|
298
|
-
items: { type: "object", additionalProperties: true },
|
|
299
|
-
},
|
|
300
|
-
primary_photo_url: {
|
|
301
|
-
type: "string",
|
|
302
|
-
description: "Primary photo URL",
|
|
303
|
-
},
|
|
304
|
-
status: {
|
|
305
|
-
type: "string",
|
|
306
|
-
description: "Asset status. Valid values: active, sold, lost, stolen, disposed",
|
|
307
|
-
},
|
|
308
|
-
insured: { type: "boolean", description: "Whether insured" },
|
|
309
|
-
insurance_provider: {
|
|
310
|
-
type: "string",
|
|
311
|
-
description: "Insurance company",
|
|
312
|
-
},
|
|
313
|
-
insurance_policy_number: {
|
|
314
|
-
type: "string",
|
|
315
|
-
description: "Insurance policy number",
|
|
316
|
-
},
|
|
317
|
-
insurance_coverage: {
|
|
318
|
-
type: "number",
|
|
319
|
-
description: "Coverage amount",
|
|
320
|
-
},
|
|
321
|
-
notes: { type: "string", description: "General notes" },
|
|
322
|
-
tags: {
|
|
323
|
-
type: "array",
|
|
324
|
-
description: "Freeform tags",
|
|
325
|
-
items: { type: "string" },
|
|
326
|
-
},
|
|
87
|
+
...PHYSICAL_ASSETS_WRITE_PROPERTIES,
|
|
327
88
|
},
|
|
328
|
-
required: [
|
|
329
|
-
additionalProperties: true,
|
|
89
|
+
required: [...PHYSICAL_ASSETS_UPDATE_REQUIRED],
|
|
330
90
|
},
|
|
331
91
|
},
|
|
332
92
|
executor: this.updateAsset.bind(this),
|