@withpica/mcp-server 2.1.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/README.md +305 -0
- package/dist/config.d.ts +34 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/config.js +33 -0
- package/dist/config.js.map +1 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +34 -0
- package/dist/index.js.map +1 -0
- package/dist/pica-sdk.d.ts +1162 -0
- package/dist/pica-sdk.d.ts.map +1 -0
- package/dist/pica-sdk.js +1371 -0
- package/dist/pica-sdk.js.map +1 -0
- package/dist/prompts/index.d.ts +78 -0
- package/dist/prompts/index.d.ts.map +1 -0
- package/dist/prompts/index.js +513 -0
- package/dist/prompts/index.js.map +1 -0
- package/dist/resources/index.d.ts +64 -0
- package/dist/resources/index.d.ts.map +1 -0
- package/dist/resources/index.js +310 -0
- package/dist/resources/index.js.map +1 -0
- package/dist/resources/llms-primer.d.ts +2 -0
- package/dist/resources/llms-primer.d.ts.map +1 -0
- package/dist/resources/llms-primer.js +67 -0
- package/dist/resources/llms-primer.js.map +1 -0
- package/dist/server.d.ts +27 -0
- package/dist/server.d.ts.map +1 -0
- package/dist/server.js +140 -0
- package/dist/server.js.map +1 -0
- package/dist/tools/agreement-types.d.ts +37 -0
- package/dist/tools/agreement-types.d.ts.map +1 -0
- package/dist/tools/agreement-types.js +579 -0
- package/dist/tools/agreement-types.js.map +1 -0
- package/dist/tools/agreements.d.ts +21 -0
- package/dist/tools/agreements.d.ts.map +1 -0
- package/dist/tools/agreements.js +328 -0
- package/dist/tools/agreements.js.map +1 -0
- package/dist/tools/analytics.d.ts +20 -0
- package/dist/tools/analytics.d.ts.map +1 -0
- package/dist/tools/analytics.js +126 -0
- package/dist/tools/analytics.js.map +1 -0
- package/dist/tools/assets.d.ts +23 -0
- package/dist/tools/assets.d.ts.map +1 -0
- package/dist/tools/assets.js +220 -0
- package/dist/tools/assets.js.map +1 -0
- package/dist/tools/audio-files.d.ts +21 -0
- package/dist/tools/audio-files.d.ts.map +1 -0
- package/dist/tools/audio-files.js +358 -0
- package/dist/tools/audio-files.js.map +1 -0
- package/dist/tools/bulk.d.ts +16 -0
- package/dist/tools/bulk.d.ts.map +1 -0
- package/dist/tools/bulk.js +82 -0
- package/dist/tools/bulk.js.map +1 -0
- package/dist/tools/calendar.d.ts +15 -0
- package/dist/tools/calendar.d.ts.map +1 -0
- package/dist/tools/calendar.js +69 -0
- package/dist/tools/calendar.js.map +1 -0
- package/dist/tools/collaborators.d.ts +17 -0
- package/dist/tools/collaborators.d.ts.map +1 -0
- package/dist/tools/collaborators.js +133 -0
- package/dist/tools/collaborators.js.map +1 -0
- package/dist/tools/comparisons.d.ts +22 -0
- package/dist/tools/comparisons.d.ts.map +1 -0
- package/dist/tools/comparisons.js +86 -0
- package/dist/tools/comparisons.js.map +1 -0
- package/dist/tools/credits.d.ts +17 -0
- package/dist/tools/credits.d.ts.map +1 -0
- package/dist/tools/credits.js +136 -0
- package/dist/tools/credits.js.map +1 -0
- package/dist/tools/dashboard.d.ts +20 -0
- package/dist/tools/dashboard.d.ts.map +1 -0
- package/dist/tools/dashboard.js +156 -0
- package/dist/tools/dashboard.js.map +1 -0
- package/dist/tools/directory.d.ts +15 -0
- package/dist/tools/directory.d.ts.map +1 -0
- package/dist/tools/directory.js +108 -0
- package/dist/tools/directory.js.map +1 -0
- package/dist/tools/disputes.d.ts +18 -0
- package/dist/tools/disputes.d.ts.map +1 -0
- package/dist/tools/disputes.js +66 -0
- package/dist/tools/disputes.js.map +1 -0
- package/dist/tools/documents.d.ts +15 -0
- package/dist/tools/documents.d.ts.map +1 -0
- package/dist/tools/documents.js +38 -0
- package/dist/tools/documents.js.map +1 -0
- package/dist/tools/duplicates.d.ts +16 -0
- package/dist/tools/duplicates.d.ts.map +1 -0
- package/dist/tools/duplicates.js +72 -0
- package/dist/tools/duplicates.js.map +1 -0
- package/dist/tools/enrichment.d.ts +23 -0
- package/dist/tools/enrichment.d.ts.map +1 -0
- package/dist/tools/enrichment.js +207 -0
- package/dist/tools/enrichment.js.map +1 -0
- package/dist/tools/exports.d.ts +19 -0
- package/dist/tools/exports.d.ts.map +1 -0
- package/dist/tools/exports.js +155 -0
- package/dist/tools/exports.js.map +1 -0
- package/dist/tools/health.d.ts +17 -0
- package/dist/tools/health.d.ts.map +1 -0
- package/dist/tools/health.js +69 -0
- package/dist/tools/health.js.map +1 -0
- package/dist/tools/import-documents.d.ts +21 -0
- package/dist/tools/import-documents.d.ts.map +1 -0
- package/dist/tools/import-documents.js +191 -0
- package/dist/tools/import-documents.js.map +1 -0
- package/dist/tools/import.d.ts +29 -0
- package/dist/tools/import.d.ts.map +1 -0
- package/dist/tools/import.js +404 -0
- package/dist/tools/import.js.map +1 -0
- package/dist/tools/index.d.ts +48 -0
- package/dist/tools/index.d.ts.map +1 -0
- package/dist/tools/index.js +394 -0
- package/dist/tools/index.js.map +1 -0
- package/dist/tools/integrations.d.ts +15 -0
- package/dist/tools/integrations.d.ts.map +1 -0
- package/dist/tools/integrations.js +102 -0
- package/dist/tools/integrations.js.map +1 -0
- package/dist/tools/licensing.d.ts +40 -0
- package/dist/tools/licensing.d.ts.map +1 -0
- package/dist/tools/licensing.js +436 -0
- package/dist/tools/licensing.js.map +1 -0
- package/dist/tools/memory.d.ts +21 -0
- package/dist/tools/memory.d.ts.map +1 -0
- package/dist/tools/memory.js +121 -0
- package/dist/tools/memory.js.map +1 -0
- package/dist/tools/multimedia.d.ts +19 -0
- package/dist/tools/multimedia.d.ts.map +1 -0
- package/dist/tools/multimedia.js +293 -0
- package/dist/tools/multimedia.js.map +1 -0
- package/dist/tools/notes.d.ts +21 -0
- package/dist/tools/notes.d.ts.map +1 -0
- package/dist/tools/notes.js +126 -0
- package/dist/tools/notes.js.map +1 -0
- package/dist/tools/notifications.d.ts +17 -0
- package/dist/tools/notifications.d.ts.map +1 -0
- package/dist/tools/notifications.js +117 -0
- package/dist/tools/notifications.js.map +1 -0
- package/dist/tools/people.d.ts +53 -0
- package/dist/tools/people.d.ts.map +1 -0
- package/dist/tools/people.js +534 -0
- package/dist/tools/people.js.map +1 -0
- package/dist/tools/pica-score.d.ts +15 -0
- package/dist/tools/pica-score.d.ts.map +1 -0
- package/dist/tools/pica-score.js +30 -0
- package/dist/tools/pica-score.js.map +1 -0
- package/dist/tools/projects.d.ts +19 -0
- package/dist/tools/projects.d.ts.map +1 -0
- package/dist/tools/projects.js +142 -0
- package/dist/tools/projects.js.map +1 -0
- package/dist/tools/purchases.d.ts +15 -0
- package/dist/tools/purchases.d.ts.map +1 -0
- package/dist/tools/purchases.js +65 -0
- package/dist/tools/purchases.js.map +1 -0
- package/dist/tools/recordings.d.ts +41 -0
- package/dist/tools/recordings.d.ts.map +1 -0
- package/dist/tools/recordings.js +293 -0
- package/dist/tools/recordings.js.map +1 -0
- package/dist/tools/registration.d.ts +16 -0
- package/dist/tools/registration.d.ts.map +1 -0
- package/dist/tools/registration.js +52 -0
- package/dist/tools/registration.js.map +1 -0
- package/dist/tools/releases.d.ts +18 -0
- package/dist/tools/releases.d.ts.map +1 -0
- package/dist/tools/releases.js +138 -0
- package/dist/tools/releases.js.map +1 -0
- package/dist/tools/royalties.d.ts +23 -0
- package/dist/tools/royalties.d.ts.map +1 -0
- package/dist/tools/royalties.js +263 -0
- package/dist/tools/royalties.js.map +1 -0
- package/dist/tools/search.d.ts +30 -0
- package/dist/tools/search.d.ts.map +1 -0
- package/dist/tools/search.js +117 -0
- package/dist/tools/search.js.map +1 -0
- package/dist/tools/send.d.ts +18 -0
- package/dist/tools/send.d.ts.map +1 -0
- package/dist/tools/send.js +189 -0
- package/dist/tools/send.js.map +1 -0
- package/dist/tools/sessions.d.ts +18 -0
- package/dist/tools/sessions.d.ts.map +1 -0
- package/dist/tools/sessions.js +107 -0
- package/dist/tools/sessions.js.map +1 -0
- package/dist/tools/settings.d.ts +18 -0
- package/dist/tools/settings.d.ts.map +1 -0
- package/dist/tools/settings.js +98 -0
- package/dist/tools/settings.js.map +1 -0
- package/dist/tools/share-links.d.ts +19 -0
- package/dist/tools/share-links.d.ts.map +1 -0
- package/dist/tools/share-links.js +126 -0
- package/dist/tools/share-links.js.map +1 -0
- package/dist/tools/split-sheets.d.ts +24 -0
- package/dist/tools/split-sheets.d.ts.map +1 -0
- package/dist/tools/split-sheets.js +189 -0
- package/dist/tools/split-sheets.js.map +1 -0
- package/dist/tools/team.d.ts +22 -0
- package/dist/tools/team.d.ts.map +1 -0
- package/dist/tools/team.js +139 -0
- package/dist/tools/team.js.map +1 -0
- package/dist/tools/telegram.d.ts +20 -0
- package/dist/tools/telegram.d.ts.map +1 -0
- package/dist/tools/telegram.js +94 -0
- package/dist/tools/telegram.js.map +1 -0
- package/dist/tools/uploads.d.ts +17 -0
- package/dist/tools/uploads.d.ts.map +1 -0
- package/dist/tools/uploads.js +159 -0
- package/dist/tools/uploads.js.map +1 -0
- package/dist/tools/works.d.ts +53 -0
- package/dist/tools/works.d.ts.map +1 -0
- package/dist/tools/works.js +517 -0
- package/dist/tools/works.js.map +1 -0
- package/dist/utils/credit-gate.d.ts +17 -0
- package/dist/utils/credit-gate.d.ts.map +1 -0
- package/dist/utils/credit-gate.js +111 -0
- package/dist/utils/credit-gate.js.map +1 -0
- package/dist/utils/errors.d.ts +29 -0
- package/dist/utils/errors.d.ts.map +1 -0
- package/dist/utils/errors.js +114 -0
- package/dist/utils/errors.js.map +1 -0
- package/dist/utils/formatting.d.ts +63 -0
- package/dist/utils/formatting.d.ts.map +1 -0
- package/dist/utils/formatting.js +130 -0
- package/dist/utils/formatting.js.map +1 -0
- package/dist/utils/mpp.d.ts +78 -0
- package/dist/utils/mpp.d.ts.map +1 -0
- package/dist/utils/mpp.js +136 -0
- package/dist/utils/mpp.js.map +1 -0
- package/package.json +44 -0
|
@@ -0,0 +1,220 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Physical Assets Tools - MCP tools for managing equipment, instruments, and studio gear
|
|
3
|
+
*/
|
|
4
|
+
import { formatAsText, formatSuccess, formatStructuredList, } from "../utils/formatting.js";
|
|
5
|
+
export class AssetsTools {
|
|
6
|
+
pica;
|
|
7
|
+
constructor(pica) {
|
|
8
|
+
this.pica = pica;
|
|
9
|
+
}
|
|
10
|
+
getTools() {
|
|
11
|
+
return [
|
|
12
|
+
{
|
|
13
|
+
definition: {
|
|
14
|
+
name: "pica_physical_assets_list",
|
|
15
|
+
description: "List physical assets — equipment, instruments, studio gear. Filter by category.",
|
|
16
|
+
inputSchema: {
|
|
17
|
+
type: "object",
|
|
18
|
+
properties: {
|
|
19
|
+
category: {
|
|
20
|
+
type: "string",
|
|
21
|
+
description: "Filter by category (e.g. instrument, equipment, studio, software)",
|
|
22
|
+
},
|
|
23
|
+
limit: {
|
|
24
|
+
type: "number",
|
|
25
|
+
description: "Max results (default 50)",
|
|
26
|
+
},
|
|
27
|
+
},
|
|
28
|
+
},
|
|
29
|
+
},
|
|
30
|
+
executor: this.listAssets.bind(this),
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
definition: {
|
|
34
|
+
name: "pica_physical_assets_get",
|
|
35
|
+
description: "Get details of a specific physical asset including current valuation.",
|
|
36
|
+
inputSchema: {
|
|
37
|
+
type: "object",
|
|
38
|
+
properties: {
|
|
39
|
+
id: { type: "string", description: "Asset ID" },
|
|
40
|
+
},
|
|
41
|
+
required: ["id"],
|
|
42
|
+
},
|
|
43
|
+
},
|
|
44
|
+
executor: this.getAsset.bind(this),
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
definition: {
|
|
48
|
+
name: "pica_physical_assets_create",
|
|
49
|
+
description: "Register a new physical asset — equipment, instrument, or studio gear. Track for insurance and valuation.",
|
|
50
|
+
inputSchema: {
|
|
51
|
+
type: "object",
|
|
52
|
+
properties: {
|
|
53
|
+
name: {
|
|
54
|
+
type: "string",
|
|
55
|
+
description: "Asset name (e.g. 'Fender Stratocaster 1962')",
|
|
56
|
+
},
|
|
57
|
+
category: {
|
|
58
|
+
type: "string",
|
|
59
|
+
description: "Category: instrument, equipment, studio, software, other",
|
|
60
|
+
},
|
|
61
|
+
description: {
|
|
62
|
+
type: "string",
|
|
63
|
+
description: "Description of the asset",
|
|
64
|
+
},
|
|
65
|
+
serial_number: {
|
|
66
|
+
type: "string",
|
|
67
|
+
description: "Serial number if available",
|
|
68
|
+
},
|
|
69
|
+
purchase_price: {
|
|
70
|
+
type: "number",
|
|
71
|
+
description: "Original purchase price",
|
|
72
|
+
},
|
|
73
|
+
purchase_date: {
|
|
74
|
+
type: "string",
|
|
75
|
+
description: "Purchase date (YYYY-MM-DD)",
|
|
76
|
+
},
|
|
77
|
+
current_value: {
|
|
78
|
+
type: "number",
|
|
79
|
+
description: "Estimated current value",
|
|
80
|
+
},
|
|
81
|
+
currency: {
|
|
82
|
+
type: "string",
|
|
83
|
+
description: "Currency code (default: GBP)",
|
|
84
|
+
},
|
|
85
|
+
condition: {
|
|
86
|
+
type: "string",
|
|
87
|
+
description: "Condition: excellent, good, fair, poor",
|
|
88
|
+
},
|
|
89
|
+
location: {
|
|
90
|
+
type: "string",
|
|
91
|
+
description: "Where the asset is stored",
|
|
92
|
+
},
|
|
93
|
+
insured: {
|
|
94
|
+
type: "boolean",
|
|
95
|
+
description: "Whether the asset is insured",
|
|
96
|
+
},
|
|
97
|
+
},
|
|
98
|
+
required: ["name"],
|
|
99
|
+
additionalProperties: true,
|
|
100
|
+
},
|
|
101
|
+
},
|
|
102
|
+
executor: this.createAsset.bind(this),
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
definition: {
|
|
106
|
+
name: "pica_physical_assets_update",
|
|
107
|
+
description: "Update a physical asset — change valuation, condition, location, insurance status.",
|
|
108
|
+
inputSchema: {
|
|
109
|
+
type: "object",
|
|
110
|
+
properties: {
|
|
111
|
+
id: { type: "string", description: "Asset ID" },
|
|
112
|
+
},
|
|
113
|
+
required: ["id"],
|
|
114
|
+
additionalProperties: true,
|
|
115
|
+
},
|
|
116
|
+
},
|
|
117
|
+
executor: this.updateAsset.bind(this),
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
definition: {
|
|
121
|
+
name: "pica_physical_assets_delete",
|
|
122
|
+
description: "Delete a physical asset by ID.",
|
|
123
|
+
inputSchema: {
|
|
124
|
+
type: "object",
|
|
125
|
+
properties: {
|
|
126
|
+
id: { type: "string", description: "Asset ID" },
|
|
127
|
+
},
|
|
128
|
+
required: ["id"],
|
|
129
|
+
},
|
|
130
|
+
},
|
|
131
|
+
executor: this.deleteAsset.bind(this),
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
definition: {
|
|
135
|
+
name: "pica_physical_assets_stats",
|
|
136
|
+
description: "Get summary statistics for all physical assets — total value, count by category, insurance coverage.",
|
|
137
|
+
inputSchema: { type: "object", properties: {} },
|
|
138
|
+
},
|
|
139
|
+
executor: this.assetStats.bind(this),
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
definition: {
|
|
143
|
+
name: "pica_physical_assets_valuations",
|
|
144
|
+
description: "Get the valuation history for a physical asset — tracks value changes over time.",
|
|
145
|
+
inputSchema: {
|
|
146
|
+
type: "object",
|
|
147
|
+
properties: {
|
|
148
|
+
id: { type: "string", description: "Asset ID" },
|
|
149
|
+
},
|
|
150
|
+
required: ["id"],
|
|
151
|
+
},
|
|
152
|
+
},
|
|
153
|
+
executor: this.assetValuations.bind(this),
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
definition: {
|
|
157
|
+
name: "pica_physical_assets_market_check",
|
|
158
|
+
description: "Check market value for a physical asset — compares current valuation against market data.",
|
|
159
|
+
inputSchema: {
|
|
160
|
+
type: "object",
|
|
161
|
+
properties: {
|
|
162
|
+
id: { type: "string", description: "Asset ID" },
|
|
163
|
+
},
|
|
164
|
+
required: ["id"],
|
|
165
|
+
},
|
|
166
|
+
},
|
|
167
|
+
executor: this.assetMarketCheck.bind(this),
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
definition: {
|
|
171
|
+
name: "pica_physical_assets_export",
|
|
172
|
+
description: "Export all physical assets as a downloadable report.",
|
|
173
|
+
inputSchema: { type: "object", properties: {} },
|
|
174
|
+
},
|
|
175
|
+
executor: this.assetExport.bind(this),
|
|
176
|
+
},
|
|
177
|
+
];
|
|
178
|
+
}
|
|
179
|
+
async listAssets(args) {
|
|
180
|
+
const assets = await this.pica.assets.list({
|
|
181
|
+
category: args.category,
|
|
182
|
+
limit: args.limit,
|
|
183
|
+
});
|
|
184
|
+
return formatStructuredList(Array.isArray(assets) ? assets : assets?.data || [], "asset");
|
|
185
|
+
}
|
|
186
|
+
async getAsset(args) {
|
|
187
|
+
const asset = await this.pica.assets.get(args.id);
|
|
188
|
+
return formatSuccess(`Asset: ${asset?.name || args.id}`, asset);
|
|
189
|
+
}
|
|
190
|
+
async createAsset(args) {
|
|
191
|
+
const asset = await this.pica.assets.create(args);
|
|
192
|
+
return formatSuccess("Physical asset registered successfully", asset);
|
|
193
|
+
}
|
|
194
|
+
async updateAsset(args) {
|
|
195
|
+
const { id, ...updates } = args;
|
|
196
|
+
const asset = await this.pica.assets.update(id, updates);
|
|
197
|
+
return formatSuccess("Asset updated successfully", asset);
|
|
198
|
+
}
|
|
199
|
+
async deleteAsset(args) {
|
|
200
|
+
await this.pica.assets.delete(args.id);
|
|
201
|
+
return formatSuccess("Asset deleted successfully");
|
|
202
|
+
}
|
|
203
|
+
async assetStats(_args) {
|
|
204
|
+
const stats = await this.pica.assets.stats();
|
|
205
|
+
return formatAsText(stats);
|
|
206
|
+
}
|
|
207
|
+
async assetValuations(args) {
|
|
208
|
+
const valuations = await this.pica.assets.valuations(args.id);
|
|
209
|
+
return formatAsText(valuations);
|
|
210
|
+
}
|
|
211
|
+
async assetMarketCheck(args) {
|
|
212
|
+
const result = await this.pica.assets.marketCheck(args.id);
|
|
213
|
+
return formatAsText(result);
|
|
214
|
+
}
|
|
215
|
+
async assetExport(_args) {
|
|
216
|
+
const result = await this.pica.assets.exportAll();
|
|
217
|
+
return formatAsText(result);
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
//# sourceMappingURL=assets.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"assets.js","sourceRoot":"","sources":["../../src/tools/assets.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH,OAAO,EACL,YAAY,EACZ,aAAa,EACb,oBAAoB,GACrB,MAAM,wBAAwB,CAAC;AAEhC,MAAM,OAAO,WAAW;IACd,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,2BAA2B;oBACjC,WAAW,EACT,iFAAiF;oBACnF,WAAW,EAAE;wBACX,IAAI,EAAE,QAAQ;wBACd,UAAU,EAAE;4BACV,QAAQ,EAAE;gCACR,IAAI,EAAE,QAAQ;gCACd,WAAW,EACT,mEAAmE;6BACtE;4BACD,KAAK,EAAE;gCACL,IAAI,EAAE,QAAQ;gCACd,WAAW,EAAE,0BAA0B;6BACxC;yBACF;qBACF;iBACF;gBACD,QAAQ,EAAE,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC;aACrC;YACD;gBACE,UAAU,EAAE;oBACV,IAAI,EAAE,0BAA0B;oBAChC,WAAW,EACT,uEAAuE;oBACzE,WAAW,EAAE;wBACX,IAAI,EAAE,QAAQ;wBACd,UAAU,EAAE;4BACV,EAAE,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,UAAU,EAAE;yBAChD;wBACD,QAAQ,EAAE,CAAC,IAAI,CAAC;qBACjB;iBACF;gBACD,QAAQ,EAAE,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC;aACnC;YACD;gBACE,UAAU,EAAE;oBACV,IAAI,EAAE,6BAA6B;oBACnC,WAAW,EACT,2GAA2G;oBAC7G,WAAW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,CAAC,IAAI,CAAC,MAAM,CAAC,SAAS,EAAE,CAAC;QAClD,OAAO,YAAY,CAAC,MAAM,CAAC,CAAC;IAC9B,CAAC;CACF"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Audio Files Tools - MCP tools for managing audio files and analysis
|
|
3
|
+
*/
|
|
4
|
+
import { PicaClient } from "../pica-sdk.js";
|
|
5
|
+
import { ToolDefinition, ToolExecutor } from "./index.js";
|
|
6
|
+
export declare class AudioFilesTools {
|
|
7
|
+
private pica;
|
|
8
|
+
constructor(pica: PicaClient);
|
|
9
|
+
getTools(): Array<{
|
|
10
|
+
definition: ToolDefinition;
|
|
11
|
+
executor: ToolExecutor;
|
|
12
|
+
}>;
|
|
13
|
+
private listAudioFiles;
|
|
14
|
+
private getAudioFile;
|
|
15
|
+
private analyzeAudioFile;
|
|
16
|
+
private getAudioStatus;
|
|
17
|
+
private presignedUpload;
|
|
18
|
+
private completeUpload;
|
|
19
|
+
private identifyAudioFile;
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=audio-files.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"audio-files.d.ts","sourceRoot":"","sources":["../../src/tools/audio-files.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EAAE,cAAc,EAAE,YAAY,EAAc,MAAM,YAAY,CAAC;AAStE,qBAAa,eAAe;IAC1B,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;YAyR3D,cAAc;YAUd,YAAY;YAKZ,gBAAgB;YAchB,cAAc;YAKd,eAAe;YAyBf,cAAc;YAgDd,iBAAiB;CA0BhC"}
|
|
@@ -0,0 +1,358 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Audio Files Tools - MCP tools for managing audio files and analysis
|
|
3
|
+
*/
|
|
4
|
+
import { formatAsText, formatList, formatSuccess, } from "../utils/formatting.js";
|
|
5
|
+
import { withCreditGate } from "../utils/credit-gate.js";
|
|
6
|
+
export class AudioFilesTools {
|
|
7
|
+
pica;
|
|
8
|
+
constructor(pica) {
|
|
9
|
+
this.pica = pica;
|
|
10
|
+
}
|
|
11
|
+
getTools() {
|
|
12
|
+
return [
|
|
13
|
+
{
|
|
14
|
+
definition: {
|
|
15
|
+
name: "pica_audio_list",
|
|
16
|
+
description: "List audio files in the catalog. Can filter by work, file type, or analysis status.",
|
|
17
|
+
inputSchema: {
|
|
18
|
+
type: "object",
|
|
19
|
+
properties: {
|
|
20
|
+
work_id: {
|
|
21
|
+
type: "string",
|
|
22
|
+
description: "Filter by work ID to get all audio files for a specific work",
|
|
23
|
+
},
|
|
24
|
+
file_type: {
|
|
25
|
+
type: "string",
|
|
26
|
+
description: "Filter by file type",
|
|
27
|
+
enum: ["master", "instrumental", "stem", "demo", "version"],
|
|
28
|
+
},
|
|
29
|
+
unprocessed: {
|
|
30
|
+
type: "boolean",
|
|
31
|
+
description: "Set true to get only files without audio analysis (no BPM/key detection yet)",
|
|
32
|
+
},
|
|
33
|
+
limit: {
|
|
34
|
+
type: "number",
|
|
35
|
+
description: "Maximum results to return (default: 50)",
|
|
36
|
+
},
|
|
37
|
+
},
|
|
38
|
+
},
|
|
39
|
+
},
|
|
40
|
+
executor: this.listAudioFiles.bind(this),
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
definition: {
|
|
44
|
+
name: "pica_audio_get",
|
|
45
|
+
description: "Get a single audio file with full details including analysis data (BPM, key, energy, valence, mood tags, duration).",
|
|
46
|
+
inputSchema: {
|
|
47
|
+
type: "object",
|
|
48
|
+
properties: {
|
|
49
|
+
id: {
|
|
50
|
+
type: "string",
|
|
51
|
+
description: "Audio file ID",
|
|
52
|
+
},
|
|
53
|
+
},
|
|
54
|
+
required: ["id"],
|
|
55
|
+
},
|
|
56
|
+
},
|
|
57
|
+
executor: this.getAudioFile.bind(this),
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
definition: {
|
|
61
|
+
name: "pica_audio_analyze",
|
|
62
|
+
description: "Trigger audio analysis on an audio file. Two analysis types available (1 credit each):\n" +
|
|
63
|
+
"• Audio features (BPM, key, energy, valence, mood, duration) — via Librosa on Railway\n" +
|
|
64
|
+
"• Lyrics transcription (speech-to-text + language detection) — via Groq Whisper on Railway\n\n" +
|
|
65
|
+
"Both are enabled by default. Analysis runs asynchronously — use pica_audio_status to check progress. " +
|
|
66
|
+
"Transcribed lyrics are saved to the transcriptions table and can be copied to the work's lyrics field. " +
|
|
67
|
+
"→ then: pica_audio_status (check progress), pica_search_for_sync (find sync-ready works)",
|
|
68
|
+
inputSchema: {
|
|
69
|
+
type: "object",
|
|
70
|
+
properties: {
|
|
71
|
+
id: {
|
|
72
|
+
type: "string",
|
|
73
|
+
description: "Audio file ID to analyze",
|
|
74
|
+
},
|
|
75
|
+
force: {
|
|
76
|
+
type: "boolean",
|
|
77
|
+
description: "Force re-analysis even if the file was already analyzed",
|
|
78
|
+
},
|
|
79
|
+
enable_audio: {
|
|
80
|
+
type: "boolean",
|
|
81
|
+
description: "Enable audio feature extraction (BPM, key, energy). Default: true. Costs 1 credit.",
|
|
82
|
+
},
|
|
83
|
+
enable_lyrics: {
|
|
84
|
+
type: "boolean",
|
|
85
|
+
description: "Enable lyrics transcription via Whisper. Default: true. Costs 1 credit.",
|
|
86
|
+
},
|
|
87
|
+
},
|
|
88
|
+
required: ["id"],
|
|
89
|
+
},
|
|
90
|
+
},
|
|
91
|
+
executor: withCreditGate(this.pica, "analysis_audio", "audio analysis", this.analyzeAudioFile.bind(this)),
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
definition: {
|
|
95
|
+
name: "pica_audio_status",
|
|
96
|
+
description: "Check the analysis status of an audio file: processing, completed, failed, or not_started.",
|
|
97
|
+
inputSchema: {
|
|
98
|
+
type: "object",
|
|
99
|
+
properties: {
|
|
100
|
+
id: {
|
|
101
|
+
type: "string",
|
|
102
|
+
description: "Audio file ID",
|
|
103
|
+
},
|
|
104
|
+
},
|
|
105
|
+
required: ["id"],
|
|
106
|
+
},
|
|
107
|
+
},
|
|
108
|
+
executor: this.getAudioStatus.bind(this),
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
definition: {
|
|
112
|
+
name: "pica_audio_presigned_upload",
|
|
113
|
+
description: "Generate a signed URL for uploading an audio file directly to storage. Returns an upload URL and upload ID. After uploading the file via HTTP PUT to the returned URL, call pica_audio_complete_upload to finalize. Supported formats: WAV, MP3, FLAC, AIFF, OGG, WebM. Max size: 800MB. " +
|
|
114
|
+
"→ then: pica_audio_complete_upload (finalize upload), pica_audio_analyze (extract BPM, key, mood)",
|
|
115
|
+
inputSchema: {
|
|
116
|
+
type: "object",
|
|
117
|
+
properties: {
|
|
118
|
+
filename: {
|
|
119
|
+
type: "string",
|
|
120
|
+
description: "Original filename with extension (e.g. 'my-song.wav')",
|
|
121
|
+
},
|
|
122
|
+
content_type: {
|
|
123
|
+
type: "string",
|
|
124
|
+
description: "MIME type of the audio file (e.g. 'audio/wav', 'audio/mpeg', 'audio/flac')",
|
|
125
|
+
enum: [
|
|
126
|
+
"audio/wav",
|
|
127
|
+
"audio/x-wav",
|
|
128
|
+
"audio/mpeg",
|
|
129
|
+
"audio/mp3",
|
|
130
|
+
"audio/flac",
|
|
131
|
+
"audio/x-flac",
|
|
132
|
+
"audio/aiff",
|
|
133
|
+
"audio/x-aiff",
|
|
134
|
+
"audio/ogg",
|
|
135
|
+
"audio/webm",
|
|
136
|
+
],
|
|
137
|
+
},
|
|
138
|
+
file_size: {
|
|
139
|
+
type: "number",
|
|
140
|
+
description: "File size in bytes",
|
|
141
|
+
},
|
|
142
|
+
work_id: {
|
|
143
|
+
type: "string",
|
|
144
|
+
description: "Optional work ID to link the audio file to. If provided, a recording will be auto-created for master files.",
|
|
145
|
+
},
|
|
146
|
+
title: {
|
|
147
|
+
type: "string",
|
|
148
|
+
description: "Optional title for the audio file. Defaults to filename without extension.",
|
|
149
|
+
},
|
|
150
|
+
file_type: {
|
|
151
|
+
type: "string",
|
|
152
|
+
description: "Type of audio file (default: 'master')",
|
|
153
|
+
enum: ["master", "instrumental", "stem", "demo", "version"],
|
|
154
|
+
},
|
|
155
|
+
},
|
|
156
|
+
required: ["filename", "content_type", "file_size"],
|
|
157
|
+
},
|
|
158
|
+
},
|
|
159
|
+
executor: this.presignedUpload.bind(this),
|
|
160
|
+
},
|
|
161
|
+
{
|
|
162
|
+
definition: {
|
|
163
|
+
name: "pica_audio_complete_upload",
|
|
164
|
+
description: "Finalize an audio file upload after the file has been PUT to the signed URL from pica_audio_presigned_upload. Creates the database record and optionally links to a work/recording. For master files linked to a work, a recording is auto-created if none exists. " +
|
|
165
|
+
"→ then: pica_audio_analyze (extract BPM, key, mood), pica_audio_identify (fingerprint match via ACRCloud)",
|
|
166
|
+
inputSchema: {
|
|
167
|
+
type: "object",
|
|
168
|
+
properties: {
|
|
169
|
+
upload_id: {
|
|
170
|
+
type: "string",
|
|
171
|
+
description: "The uploadId returned from pica_audio_presigned_upload",
|
|
172
|
+
},
|
|
173
|
+
key: {
|
|
174
|
+
type: "string",
|
|
175
|
+
description: "The storage key returned from pica_audio_presigned_upload",
|
|
176
|
+
},
|
|
177
|
+
bucket: {
|
|
178
|
+
type: "string",
|
|
179
|
+
description: "The bucket returned from pica_audio_presigned_upload",
|
|
180
|
+
},
|
|
181
|
+
filename: {
|
|
182
|
+
type: "string",
|
|
183
|
+
description: "Original filename",
|
|
184
|
+
},
|
|
185
|
+
content_type: {
|
|
186
|
+
type: "string",
|
|
187
|
+
description: "MIME type of the uploaded file",
|
|
188
|
+
},
|
|
189
|
+
file_size: {
|
|
190
|
+
type: "number",
|
|
191
|
+
description: "File size in bytes",
|
|
192
|
+
},
|
|
193
|
+
work_id: {
|
|
194
|
+
type: "string",
|
|
195
|
+
description: "Optional work ID to link the audio file to",
|
|
196
|
+
},
|
|
197
|
+
title: {
|
|
198
|
+
type: "string",
|
|
199
|
+
description: "Optional title for the audio file",
|
|
200
|
+
},
|
|
201
|
+
file_type: {
|
|
202
|
+
type: "string",
|
|
203
|
+
description: "Type of audio file (default: 'master')",
|
|
204
|
+
enum: ["master", "instrumental", "stem", "demo", "version"],
|
|
205
|
+
},
|
|
206
|
+
stem_label: {
|
|
207
|
+
type: "string",
|
|
208
|
+
description: "Label for stem files (e.g. 'vocals', 'drums', 'bass')",
|
|
209
|
+
},
|
|
210
|
+
version_label: {
|
|
211
|
+
type: "string",
|
|
212
|
+
description: "Label for version files (e.g. 'radio edit', 'extended mix')",
|
|
213
|
+
},
|
|
214
|
+
recording_id: {
|
|
215
|
+
type: "string",
|
|
216
|
+
description: "Link to an existing recording ID instead of auto-creating one",
|
|
217
|
+
},
|
|
218
|
+
classification: {
|
|
219
|
+
type: "string",
|
|
220
|
+
description: "Audio classification (e.g. 'original', 'remix', 'cover', 'live')",
|
|
221
|
+
},
|
|
222
|
+
},
|
|
223
|
+
required: [
|
|
224
|
+
"upload_id",
|
|
225
|
+
"key",
|
|
226
|
+
"bucket",
|
|
227
|
+
"filename",
|
|
228
|
+
"content_type",
|
|
229
|
+
"file_size",
|
|
230
|
+
],
|
|
231
|
+
},
|
|
232
|
+
},
|
|
233
|
+
executor: this.completeUpload.bind(this),
|
|
234
|
+
},
|
|
235
|
+
{
|
|
236
|
+
definition: {
|
|
237
|
+
name: "pica_audio_identify",
|
|
238
|
+
description: "Identify a track using ACRCloud audio fingerprinting. Returns matched metadata (title, artist, album, ISRC, label) with confidence score. If matched, metadata is automatically propagated to the linked work. Costs 3 pica credits on match, 1 on no match. Check pica_credits_balance first.",
|
|
239
|
+
inputSchema: {
|
|
240
|
+
type: "object",
|
|
241
|
+
properties: {
|
|
242
|
+
id: {
|
|
243
|
+
type: "string",
|
|
244
|
+
description: "Audio file ID to identify",
|
|
245
|
+
},
|
|
246
|
+
force: {
|
|
247
|
+
type: "boolean",
|
|
248
|
+
description: "Force re-identification even if already matched",
|
|
249
|
+
},
|
|
250
|
+
},
|
|
251
|
+
required: ["id"],
|
|
252
|
+
},
|
|
253
|
+
},
|
|
254
|
+
executor: withCreditGate(this.pica, "analysis_audio_identify", "audio identification", this.identifyAudioFile.bind(this)),
|
|
255
|
+
},
|
|
256
|
+
];
|
|
257
|
+
}
|
|
258
|
+
async listAudioFiles(args) {
|
|
259
|
+
const files = await this.pica.audioFiles.list({
|
|
260
|
+
work_id: args.work_id,
|
|
261
|
+
file_type: args.file_type,
|
|
262
|
+
unprocessed: args.unprocessed,
|
|
263
|
+
limit: args.limit,
|
|
264
|
+
});
|
|
265
|
+
return formatList(files, { total: files.length });
|
|
266
|
+
}
|
|
267
|
+
async getAudioFile(args) {
|
|
268
|
+
const file = await this.pica.audioFiles.get(args.id);
|
|
269
|
+
return formatAsText(file);
|
|
270
|
+
}
|
|
271
|
+
async analyzeAudioFile(args) {
|
|
272
|
+
const result = await this.pica.audioFiles.analyze(args.id, {
|
|
273
|
+
forceReAnalyze: args.force,
|
|
274
|
+
enableAudio: args.enable_audio,
|
|
275
|
+
enableLyrics: args.enable_lyrics,
|
|
276
|
+
});
|
|
277
|
+
return formatSuccess(result.message || "Analysis triggered", result.features);
|
|
278
|
+
}
|
|
279
|
+
async getAudioStatus(args) {
|
|
280
|
+
const status = await this.pica.audioFiles.getStatus(args.id);
|
|
281
|
+
return formatAsText(status);
|
|
282
|
+
}
|
|
283
|
+
async presignedUpload(args) {
|
|
284
|
+
const result = await this.pica.audioFiles.presignedUpload({
|
|
285
|
+
filename: args.filename,
|
|
286
|
+
contentType: args.content_type,
|
|
287
|
+
fileSize: args.file_size,
|
|
288
|
+
workId: args.work_id,
|
|
289
|
+
title: args.title,
|
|
290
|
+
fileType: args.file_type,
|
|
291
|
+
});
|
|
292
|
+
return formatSuccess(`Upload URL generated for "${args.filename}". PUT the file to the uploadUrl, then call pica_audio_complete_upload with the uploadId, key, bucket, and metadata to finalize.`, {
|
|
293
|
+
uploadUrl: result.uploadUrl,
|
|
294
|
+
uploadId: result.uploadId,
|
|
295
|
+
key: result.key,
|
|
296
|
+
bucket: result.bucket,
|
|
297
|
+
expiresAt: result.expiresAt,
|
|
298
|
+
metadata: result.metadata,
|
|
299
|
+
});
|
|
300
|
+
}
|
|
301
|
+
async completeUpload(args) {
|
|
302
|
+
const result = await this.pica.audioFiles.completeUpload({
|
|
303
|
+
uploadId: args.upload_id,
|
|
304
|
+
key: args.key,
|
|
305
|
+
bucket: args.bucket,
|
|
306
|
+
metadata: {
|
|
307
|
+
filename: args.filename,
|
|
308
|
+
contentType: args.content_type,
|
|
309
|
+
fileSize: args.file_size,
|
|
310
|
+
workId: args.work_id,
|
|
311
|
+
title: args.title,
|
|
312
|
+
fileType: args.file_type,
|
|
313
|
+
stemLabel: args.stem_label,
|
|
314
|
+
versionLabel: args.version_label,
|
|
315
|
+
recordingId: args.recording_id,
|
|
316
|
+
classification: args.classification,
|
|
317
|
+
},
|
|
318
|
+
});
|
|
319
|
+
const hints = [
|
|
320
|
+
{
|
|
321
|
+
gap: "audio_not_analysed",
|
|
322
|
+
suggestion: "Run pica_audio_analyze to extract BPM, key, energy, and mood",
|
|
323
|
+
severity: "important",
|
|
324
|
+
},
|
|
325
|
+
{
|
|
326
|
+
gap: "audio_not_identified",
|
|
327
|
+
suggestion: "Run pica_audio_identify to fingerprint and match against ACRCloud",
|
|
328
|
+
severity: "nice_to_have",
|
|
329
|
+
},
|
|
330
|
+
];
|
|
331
|
+
if (!args.work_id) {
|
|
332
|
+
hints.unshift({
|
|
333
|
+
gap: "audio_not_linked",
|
|
334
|
+
suggestion: "Link this audio file to a work",
|
|
335
|
+
severity: "critical",
|
|
336
|
+
});
|
|
337
|
+
}
|
|
338
|
+
return formatSuccess(`Upload finalized. Audio file created with ID: ${result.audioFileId}.`, result, hints);
|
|
339
|
+
}
|
|
340
|
+
async identifyAudioFile(args) {
|
|
341
|
+
const result = await this.pica.audioFiles.identify(args.id, {
|
|
342
|
+
force: args.force,
|
|
343
|
+
});
|
|
344
|
+
if (result.alreadyIdentified) {
|
|
345
|
+
return formatSuccess("Already identified — no credits charged. Use force: true to re-identify.", result);
|
|
346
|
+
}
|
|
347
|
+
else if (result.status === "matched" && result.match) {
|
|
348
|
+
return formatSuccess(`Match found: "${result.match.title}" by ${result.match.artist} (confidence: ${Math.round((result.match.confidence || 0) * 100)}%). ISRC: ${result.match.isrc || "unknown"}. If the file is linked to a work, metadata has been propagated.`, result);
|
|
349
|
+
}
|
|
350
|
+
else if (result.status === "no_match") {
|
|
351
|
+
return formatSuccess("No match found in ACRCloud database. This may be an unreleased or very rare track.", result);
|
|
352
|
+
}
|
|
353
|
+
else {
|
|
354
|
+
return formatAsText(result);
|
|
355
|
+
}
|
|
356
|
+
}
|
|
357
|
+
}
|
|
358
|
+
//# sourceMappingURL=audio-files.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"audio-files.js","sourceRoot":"","sources":["../../src/tools/audio-files.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH,OAAO,EACL,YAAY,EACZ,UAAU,EACV,aAAa,GAEd,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAEzD,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,iBAAiB;oBACvB,WAAW,EACT,qFAAqF;oBACvF,WAAW,EAAE;wBACX,IAAI,EAAE,QAAQ;wBACd,UAAU,EAAE;4BACV,OAAO,EAAE;gCACP,IAAI,EAAE,QAAQ;gCACd,WAAW,EACT,8DAA8D;6BACjE;4BACD,SAAS,EAAE;gCACT,IAA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AC9B,CAAC;IACH,CAAC;CACF"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Bulk Operations Tools - MCP tools for batch updates
|
|
3
|
+
*/
|
|
4
|
+
import { PicaClient } from "../pica-sdk.js";
|
|
5
|
+
import { ToolDefinition, ToolExecutor } from "./index.js";
|
|
6
|
+
export declare class BulkTools {
|
|
7
|
+
private pica;
|
|
8
|
+
constructor(pica: PicaClient);
|
|
9
|
+
getTools(): Array<{
|
|
10
|
+
definition: ToolDefinition;
|
|
11
|
+
executor: ToolExecutor;
|
|
12
|
+
}>;
|
|
13
|
+
private bulkUpdateWorks;
|
|
14
|
+
private bulkUpdatePeopleRoles;
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=bulk.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bulk.d.ts","sourceRoot":"","sources":["../../src/tools/bulk.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EAAE,cAAc,EAAE,YAAY,EAAc,MAAM,YAAY,CAAC;AAGtE,qBAAa,SAAS;IACpB,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;YAqD3D,eAAe;YAkBf,qBAAqB;CAkBpC"}
|