@withpica/mcp-server 2.6.2 → 2.7.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/dist/config.d.ts +25 -4
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +12 -36
- package/dist/config.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/dist/pica-sdk.d.ts +1231 -0
- package/dist/pica-sdk.d.ts.map +1 -0
- package/dist/pica-sdk.js +1403 -0
- package/dist/pica-sdk.js.map +1 -0
- package/dist/prompts/index.d.ts +64 -64
- package/dist/prompts/index.js +24 -24
- package/dist/prompts/index.js.map +1 -1
- package/dist/resources/index.d.ts +53 -55
- package/dist/resources/index.d.ts.map +1 -1
- package/dist/resources/index.js +54 -133
- package/dist/resources/index.js.map +1 -1
- package/dist/server.d.ts +32 -49
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +14 -103
- package/dist/server.js.map +1 -1
- package/dist/tools/index.d.ts +37 -83
- package/dist/tools/index.d.ts.map +1 -1
- package/dist/tools/index.js +84 -442
- package/dist/tools/index.js.map +1 -1
- package/dist/tools/people.d.ts +47 -39
- package/dist/tools/people.d.ts.map +1 -1
- package/dist/tools/people.js +109 -148
- package/dist/tools/people.js.map +1 -1
- package/dist/tools/recordings.d.ts +9 -9
- package/dist/tools/recordings.d.ts.map +1 -1
- package/dist/tools/recordings.js +48 -121
- package/dist/tools/recordings.js.map +1 -1
- package/dist/tools/search.d.ts +21 -21
- package/dist/tools/search.d.ts.map +1 -1
- package/dist/tools/search.js +3 -3
- package/dist/tools/search.js.map +1 -1
- package/dist/tools/works.d.ts +47 -39
- package/dist/tools/works.d.ts.map +1 -1
- package/dist/tools/works.js +116 -201
- package/dist/tools/works.js.map +1 -1
- package/dist/utils/errors.d.ts +29 -0
- package/dist/utils/errors.d.ts.map +1 -0
- package/dist/utils/errors.js +115 -0
- package/dist/utils/errors.js.map +1 -0
- package/dist/utils/formatting.d.ts +82 -0
- package/dist/utils/formatting.d.ts.map +1 -0
- package/dist/utils/formatting.js +125 -0
- package/dist/utils/formatting.js.map +1 -0
- package/package.json +1 -1
- package/server.json +1 -1
- package/dist/__mocks__/mppx-mcp-sdk-server.d.ts +0 -6
- package/dist/__mocks__/mppx-mcp-sdk-server.d.ts.map +0 -1
- package/dist/__mocks__/mppx-mcp-sdk-server.js +0 -6
- package/dist/__mocks__/mppx-mcp-sdk-server.js.map +0 -1
- package/dist/__mocks__/mppx-server.d.ts +0 -12
- package/dist/__mocks__/mppx-server.d.ts.map +0 -1
- package/dist/__mocks__/mppx-server.js +0 -12
- package/dist/__mocks__/mppx-server.js.map +0 -1
- package/dist/apps/download.d.ts +0 -2
- package/dist/apps/download.d.ts.map +0 -1
- package/dist/apps/download.js +0 -125
- package/dist/apps/download.js.map +0 -1
- package/dist/apps/generated/shared-bundle.d.ts +0 -5
- package/dist/apps/generated/shared-bundle.d.ts.map +0 -1
- package/dist/apps/generated/shared-bundle.js +0 -7
- package/dist/apps/generated/shared-bundle.js.map +0 -1
- package/dist/apps/shared.d.ts +0 -15
- package/dist/apps/shared.d.ts.map +0 -1
- package/dist/apps/shared.js +0 -480
- package/dist/apps/shared.js.map +0 -1
- package/dist/apps/upload.d.ts +0 -2
- package/dist/apps/upload.d.ts.map +0 -1
- package/dist/apps/upload.js +0 -280
- package/dist/apps/upload.js.map +0 -1
- package/dist/resources/llms-primer.d.ts +0 -2
- package/dist/resources/llms-primer.d.ts.map +0 -1
- package/dist/resources/llms-primer.js +0 -68
- package/dist/resources/llms-primer.js.map +0 -1
- package/dist/server-instructions.d.ts +0 -9
- package/dist/server-instructions.d.ts.map +0 -1
- package/dist/server-instructions.js +0 -34
- package/dist/server-instructions.js.map +0 -1
- package/dist/tools/agreement-types.d.ts +0 -27
- package/dist/tools/agreement-types.d.ts.map +0 -1
- package/dist/tools/agreement-types.js +0 -387
- package/dist/tools/agreement-types.js.map +0 -1
- package/dist/tools/agreements.d.ts +0 -20
- package/dist/tools/agreements.d.ts.map +0 -1
- package/dist/tools/agreements.js +0 -363
- package/dist/tools/agreements.js.map +0 -1
- package/dist/tools/analytics.d.ts +0 -20
- package/dist/tools/analytics.d.ts.map +0 -1
- package/dist/tools/analytics.js +0 -124
- package/dist/tools/analytics.js.map +0 -1
- package/dist/tools/app-tools.d.ts +0 -21
- package/dist/tools/app-tools.d.ts.map +0 -1
- package/dist/tools/app-tools.js +0 -248
- package/dist/tools/app-tools.js.map +0 -1
- package/dist/tools/assets.d.ts +0 -21
- package/dist/tools/assets.d.ts.map +0 -1
- package/dist/tools/assets.js +0 -441
- package/dist/tools/assets.js.map +0 -1
- package/dist/tools/audio-files.d.ts +0 -20
- package/dist/tools/audio-files.d.ts.map +0 -1
- package/dist/tools/audio-files.js +0 -384
- package/dist/tools/audio-files.js.map +0 -1
- package/dist/tools/auth.d.ts +0 -22
- package/dist/tools/auth.d.ts.map +0 -1
- package/dist/tools/auth.js +0 -210
- package/dist/tools/auth.js.map +0 -1
- package/dist/tools/bulk.d.ts +0 -16
- package/dist/tools/bulk.d.ts.map +0 -1
- package/dist/tools/bulk.js +0 -85
- package/dist/tools/bulk.js.map +0 -1
- package/dist/tools/calendar.d.ts +0 -15
- package/dist/tools/calendar.d.ts.map +0 -1
- package/dist/tools/calendar.js +0 -67
- package/dist/tools/calendar.js.map +0 -1
- package/dist/tools/collaborators.d.ts +0 -17
- package/dist/tools/collaborators.d.ts.map +0 -1
- package/dist/tools/collaborators.js +0 -131
- package/dist/tools/collaborators.js.map +0 -1
- package/dist/tools/comparisons.d.ts +0 -22
- package/dist/tools/comparisons.d.ts.map +0 -1
- package/dist/tools/comparisons.js +0 -78
- package/dist/tools/comparisons.js.map +0 -1
- package/dist/tools/credits.d.ts +0 -17
- package/dist/tools/credits.d.ts.map +0 -1
- package/dist/tools/credits.js +0 -312
- package/dist/tools/credits.js.map +0 -1
- package/dist/tools/dashboard.d.ts +0 -19
- package/dist/tools/dashboard.d.ts.map +0 -1
- package/dist/tools/dashboard.js +0 -146
- package/dist/tools/dashboard.js.map +0 -1
- package/dist/tools/directory.d.ts +0 -15
- package/dist/tools/directory.d.ts.map +0 -1
- package/dist/tools/directory.js +0 -106
- package/dist/tools/directory.js.map +0 -1
- package/dist/tools/discovery.d.ts +0 -28
- package/dist/tools/discovery.d.ts.map +0 -1
- package/dist/tools/discovery.js +0 -560
- package/dist/tools/discovery.js.map +0 -1
- package/dist/tools/disputes.d.ts +0 -18
- package/dist/tools/disputes.d.ts.map +0 -1
- package/dist/tools/disputes.js +0 -61
- package/dist/tools/disputes.js.map +0 -1
- package/dist/tools/documents.d.ts +0 -15
- package/dist/tools/documents.d.ts.map +0 -1
- package/dist/tools/documents.js +0 -36
- package/dist/tools/documents.js.map +0 -1
- package/dist/tools/duplicates.d.ts +0 -16
- package/dist/tools/duplicates.d.ts.map +0 -1
- package/dist/tools/duplicates.js +0 -87
- package/dist/tools/duplicates.js.map +0 -1
- package/dist/tools/enrichment.d.ts +0 -20
- package/dist/tools/enrichment.d.ts.map +0 -1
- package/dist/tools/enrichment.js +0 -154
- package/dist/tools/enrichment.js.map +0 -1
- package/dist/tools/exports.d.ts +0 -19
- package/dist/tools/exports.d.ts.map +0 -1
- package/dist/tools/exports.js +0 -175
- package/dist/tools/exports.js.map +0 -1
- package/dist/tools/import-documents.d.ts +0 -21
- package/dist/tools/import-documents.d.ts.map +0 -1
- package/dist/tools/import-documents.js +0 -203
- package/dist/tools/import-documents.js.map +0 -1
- package/dist/tools/import.d.ts +0 -30
- package/dist/tools/import.d.ts.map +0 -1
- package/dist/tools/import.js +0 -455
- package/dist/tools/import.js.map +0 -1
- package/dist/tools/integrations.d.ts +0 -15
- package/dist/tools/integrations.d.ts.map +0 -1
- package/dist/tools/integrations.js +0 -100
- package/dist/tools/integrations.js.map +0 -1
- package/dist/tools/licensing.d.ts +0 -40
- package/dist/tools/licensing.d.ts.map +0 -1
- package/dist/tools/licensing.js +0 -431
- package/dist/tools/licensing.js.map +0 -1
- package/dist/tools/memory.d.ts +0 -21
- package/dist/tools/memory.d.ts.map +0 -1
- package/dist/tools/memory.js +0 -116
- package/dist/tools/memory.js.map +0 -1
- package/dist/tools/metadata.d.ts +0 -15
- package/dist/tools/metadata.d.ts.map +0 -1
- package/dist/tools/metadata.js +0 -1069
- package/dist/tools/metadata.js.map +0 -1
- package/dist/tools/multimedia.d.ts +0 -19
- package/dist/tools/multimedia.d.ts.map +0 -1
- package/dist/tools/multimedia.js +0 -291
- package/dist/tools/multimedia.js.map +0 -1
- package/dist/tools/notes.d.ts +0 -21
- package/dist/tools/notes.d.ts.map +0 -1
- package/dist/tools/notes.js +0 -108
- package/dist/tools/notes.js.map +0 -1
- package/dist/tools/notifications.d.ts +0 -17
- package/dist/tools/notifications.d.ts.map +0 -1
- package/dist/tools/notifications.js +0 -117
- package/dist/tools/notifications.js.map +0 -1
- package/dist/tools/projects.d.ts +0 -19
- package/dist/tools/projects.d.ts.map +0 -1
- package/dist/tools/projects.js +0 -140
- package/dist/tools/projects.js.map +0 -1
- package/dist/tools/publishers.d.ts +0 -16
- package/dist/tools/publishers.d.ts.map +0 -1
- package/dist/tools/publishers.js +0 -69
- package/dist/tools/publishers.js.map +0 -1
- package/dist/tools/purchases.d.ts +0 -15
- package/dist/tools/purchases.d.ts.map +0 -1
- package/dist/tools/purchases.js +0 -63
- package/dist/tools/purchases.js.map +0 -1
- package/dist/tools/recovery-hints.d.ts +0 -14
- package/dist/tools/recovery-hints.d.ts.map +0 -1
- package/dist/tools/recovery-hints.js +0 -277
- package/dist/tools/recovery-hints.js.map +0 -1
- package/dist/tools/releases.d.ts +0 -18
- package/dist/tools/releases.d.ts.map +0 -1
- package/dist/tools/releases.js +0 -128
- package/dist/tools/releases.js.map +0 -1
- package/dist/tools/royalties.d.ts +0 -23
- package/dist/tools/royalties.d.ts.map +0 -1
- package/dist/tools/royalties.js +0 -257
- package/dist/tools/royalties.js.map +0 -1
- package/dist/tools/send.d.ts +0 -17
- package/dist/tools/send.d.ts.map +0 -1
- package/dist/tools/send.js +0 -185
- package/dist/tools/send.js.map +0 -1
- package/dist/tools/sessions.d.ts +0 -18
- package/dist/tools/sessions.d.ts.map +0 -1
- package/dist/tools/sessions.js +0 -115
- package/dist/tools/sessions.js.map +0 -1
- package/dist/tools/settings.d.ts +0 -18
- package/dist/tools/settings.d.ts.map +0 -1
- package/dist/tools/settings.js +0 -96
- package/dist/tools/settings.js.map +0 -1
- package/dist/tools/share-links.d.ts +0 -19
- package/dist/tools/share-links.d.ts.map +0 -1
- package/dist/tools/share-links.js +0 -121
- package/dist/tools/share-links.js.map +0 -1
- package/dist/tools/split-sheets.d.ts +0 -25
- package/dist/tools/split-sheets.d.ts.map +0 -1
- package/dist/tools/split-sheets.js +0 -307
- package/dist/tools/split-sheets.js.map +0 -1
- package/dist/tools/team.d.ts +0 -22
- package/dist/tools/team.d.ts.map +0 -1
- package/dist/tools/team.js +0 -134
- package/dist/tools/team.js.map +0 -1
- package/dist/tools/telegram.d.ts +0 -20
- package/dist/tools/telegram.d.ts.map +0 -1
- package/dist/tools/telegram.js +0 -88
- package/dist/tools/telegram.js.map +0 -1
- package/dist/tools/uploads.d.ts +0 -17
- package/dist/tools/uploads.d.ts.map +0 -1
- package/dist/tools/uploads.js +0 -156
- package/dist/tools/uploads.js.map +0 -1
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Layered Discovery Tools — ADR-149 Phase 5d
|
|
3
|
-
*
|
|
4
|
-
* When MCP_LAYERED_DISCOVERY=1, the catalog server handshake exposes only:
|
|
5
|
-
* pica_sign_in, pica_sign_out, pica_discover, pica_tool_details, pica_execute
|
|
6
|
-
*
|
|
7
|
-
* Agents use pica_discover → pica_tool_details → pica_execute to progressively
|
|
8
|
-
* discover and invoke the full tool set without overwhelming the context window.
|
|
9
|
-
*/
|
|
10
|
-
import type { ToolDefinition, ToolExecutor } from "./index.js";
|
|
11
|
-
export declare class DiscoveryTools {
|
|
12
|
-
private executeToolFn;
|
|
13
|
-
private getToolDef;
|
|
14
|
-
constructor(executeToolFn: (name: string, args: Record<string, any>) => Promise<any>, getToolDef: (name: string) => {
|
|
15
|
-
definition: ToolDefinition;
|
|
16
|
-
executor: ToolExecutor;
|
|
17
|
-
metadata?: any;
|
|
18
|
-
} | undefined);
|
|
19
|
-
getTools(): Array<{
|
|
20
|
-
definition: ToolDefinition;
|
|
21
|
-
executor: ToolExecutor;
|
|
22
|
-
}>;
|
|
23
|
-
private buildDiscoverTool;
|
|
24
|
-
private buildToolDetailsTool;
|
|
25
|
-
private buildToolDetail;
|
|
26
|
-
private buildExecuteTool;
|
|
27
|
-
}
|
|
28
|
-
//# sourceMappingURL=discovery.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"discovery.d.ts","sourceRoot":"","sources":["../../src/tools/discovery.ts"],"names":[],"mappings":"AAEA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,YAAY,EAAc,MAAM,YAAY,CAAC;AAgS3E,qBAAa,cAAc;IAEvB,OAAO,CAAC,aAAa;IAIrB,OAAO,CAAC,UAAU;gBAJV,aAAa,EAAE,CACrB,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,KACtB,OAAO,CAAC,GAAG,CAAC,EACT,UAAU,EAAE,CAClB,IAAI,EAAE,MAAM,KAEV;QAAE,UAAU,EAAE,cAAc,CAAC;QAAC,QAAQ,EAAE,YAAY,CAAC;QAAC,QAAQ,CAAC,EAAE,GAAG,CAAA;KAAE,GACtE,SAAS;IAGf,QAAQ,IAAI,KAAK,CAAC;QAAE,UAAU,EAAE,cAAc,CAAC;QAAC,QAAQ,EAAE,YAAY,CAAA;KAAE,CAAC;IAQzE,OAAO,CAAC,iBAAiB;IAqDzB,OAAO,CAAC,oBAAoB;IAuH5B,OAAO,CAAC,eAAe;IAoCvB,OAAO,CAAC,gBAAgB;CAiHzB"}
|
package/dist/tools/discovery.js
DELETED
|
@@ -1,560 +0,0 @@
|
|
|
1
|
-
// Copyright (c) 2024-2026 Withpica Ltd. All rights reserved.
|
|
2
|
-
import { getToolMetadata } from "./metadata.js";
|
|
3
|
-
import { RECOVERY_HINTS } from "./recovery-hints.js";
|
|
4
|
-
const SCHEMA_VERSION = "2026.1";
|
|
5
|
-
/**
|
|
6
|
-
* Hand-maintained category taxonomy for the catalog server.
|
|
7
|
-
* Grouped by natural entity/capability prefix.
|
|
8
|
-
* Cross-server depends_on declarations use "<server-slug>:<category>" format.
|
|
9
|
-
*/
|
|
10
|
-
const CATEGORIES = {
|
|
11
|
-
works: {
|
|
12
|
-
description: "manage your musical works",
|
|
13
|
-
tools: [
|
|
14
|
-
"pica_works_query",
|
|
15
|
-
"pica_works_inspect",
|
|
16
|
-
"pica_works_create",
|
|
17
|
-
"pica_works_update",
|
|
18
|
-
"pica_works_delete",
|
|
19
|
-
"pica_works_bulk_delete",
|
|
20
|
-
"pica_works_bulk_update",
|
|
21
|
-
"pica_works_verify",
|
|
22
|
-
],
|
|
23
|
-
depends_on: [],
|
|
24
|
-
},
|
|
25
|
-
people: {
|
|
26
|
-
description: "manage people in your catalog",
|
|
27
|
-
tools: [
|
|
28
|
-
"pica_people_query",
|
|
29
|
-
"pica_people_inspect",
|
|
30
|
-
"pica_people_create",
|
|
31
|
-
"pica_people_update",
|
|
32
|
-
"pica_people_delete",
|
|
33
|
-
"pica_people_bulk_update_roles",
|
|
34
|
-
],
|
|
35
|
-
depends_on: [],
|
|
36
|
-
},
|
|
37
|
-
recordings: {
|
|
38
|
-
description: "manage recordings linked to works",
|
|
39
|
-
tools: [
|
|
40
|
-
"pica_recordings_query",
|
|
41
|
-
"pica_recordings_inspect",
|
|
42
|
-
"pica_recordings_create",
|
|
43
|
-
"pica_recordings_update",
|
|
44
|
-
"pica_recordings_delete",
|
|
45
|
-
],
|
|
46
|
-
depends_on: [],
|
|
47
|
-
},
|
|
48
|
-
credits: {
|
|
49
|
-
description: "manage work credits and contributors",
|
|
50
|
-
tools: ["pica_credits_list", "pica_credits_update"],
|
|
51
|
-
depends_on: [],
|
|
52
|
-
},
|
|
53
|
-
multimedia: {
|
|
54
|
-
description: "manage photos, videos, and media linked to works",
|
|
55
|
-
tools: [
|
|
56
|
-
"pica_multimedia_search",
|
|
57
|
-
"pica_multimedia_create",
|
|
58
|
-
"pica_multimedia_import_url",
|
|
59
|
-
"pica_multimedia_link_youtube",
|
|
60
|
-
"pica_multimedia_link_work",
|
|
61
|
-
],
|
|
62
|
-
depends_on: [],
|
|
63
|
-
},
|
|
64
|
-
audio: {
|
|
65
|
-
description: "manage and analyze audio files",
|
|
66
|
-
tools: [
|
|
67
|
-
"pica_audio_query",
|
|
68
|
-
"pica_audio_inspect",
|
|
69
|
-
"pica_audio_presigned_upload",
|
|
70
|
-
"pica_audio_complete_upload",
|
|
71
|
-
"pica_audio_analyze",
|
|
72
|
-
"pica_audio_identify",
|
|
73
|
-
],
|
|
74
|
-
depends_on: [],
|
|
75
|
-
},
|
|
76
|
-
projects: {
|
|
77
|
-
description: "manage albums, EPs, and work groupings",
|
|
78
|
-
tools: [
|
|
79
|
-
"pica_projects_list",
|
|
80
|
-
"pica_projects_get",
|
|
81
|
-
"pica_projects_create",
|
|
82
|
-
"pica_projects_update",
|
|
83
|
-
"pica_projects_delete",
|
|
84
|
-
],
|
|
85
|
-
depends_on: [],
|
|
86
|
-
},
|
|
87
|
-
releases: {
|
|
88
|
-
description: "manage releases with dates, labels, and UPCs",
|
|
89
|
-
tools: [
|
|
90
|
-
"pica_releases_list",
|
|
91
|
-
"pica_releases_get",
|
|
92
|
-
"pica_releases_create",
|
|
93
|
-
"pica_releases_update",
|
|
94
|
-
],
|
|
95
|
-
depends_on: [],
|
|
96
|
-
},
|
|
97
|
-
sessions: {
|
|
98
|
-
description: "track work sessions and studio time",
|
|
99
|
-
tools: [
|
|
100
|
-
"pica_sessions_list",
|
|
101
|
-
"pica_sessions_get",
|
|
102
|
-
"pica_sessions_create",
|
|
103
|
-
"pica_sessions_types",
|
|
104
|
-
],
|
|
105
|
-
depends_on: [],
|
|
106
|
-
},
|
|
107
|
-
notes: {
|
|
108
|
-
description: "create and manage catalog notes",
|
|
109
|
-
tools: [
|
|
110
|
-
"pica_notes_list",
|
|
111
|
-
"pica_notes_get",
|
|
112
|
-
"pica_notes_create",
|
|
113
|
-
"pica_notes_delete",
|
|
114
|
-
],
|
|
115
|
-
depends_on: [],
|
|
116
|
-
},
|
|
117
|
-
duplicates: {
|
|
118
|
-
description: "detect and merge duplicate records",
|
|
119
|
-
tools: ["pica_find_duplicates", "pica_merge_duplicates"],
|
|
120
|
-
depends_on: [],
|
|
121
|
-
},
|
|
122
|
-
import: {
|
|
123
|
-
description: "import catalog data from files and streaming services",
|
|
124
|
-
tools: [
|
|
125
|
-
"pica_import_fields",
|
|
126
|
-
"pica_import_template",
|
|
127
|
-
"pica_import_analyze",
|
|
128
|
-
"pica_import_validate",
|
|
129
|
-
"pica_import_execute",
|
|
130
|
-
"pica_import_streaming_link",
|
|
131
|
-
"pica_import_from_spotify",
|
|
132
|
-
"pica_import_documents_query",
|
|
133
|
-
"pica_import_documents_inspect",
|
|
134
|
-
"pica_ingest_statement",
|
|
135
|
-
],
|
|
136
|
-
depends_on: [],
|
|
137
|
-
},
|
|
138
|
-
export: {
|
|
139
|
-
description: "export catalog data in various formats",
|
|
140
|
-
tools: [
|
|
141
|
-
"pica_export_catalog_csv",
|
|
142
|
-
"pica_export_song_registration",
|
|
143
|
-
"pica_export_industry_ready",
|
|
144
|
-
"pica_export_catalog_asset_report",
|
|
145
|
-
"pica_export_ai_consent",
|
|
146
|
-
],
|
|
147
|
-
depends_on: [
|
|
148
|
-
"mcp-server-business:agreements",
|
|
149
|
-
"mcp-server-business:splits",
|
|
150
|
-
],
|
|
151
|
-
},
|
|
152
|
-
search: {
|
|
153
|
-
description: "search across the catalog and discover content",
|
|
154
|
-
tools: [
|
|
155
|
-
"pica_search_all",
|
|
156
|
-
"pica_catalog_stats",
|
|
157
|
-
"pica_graph_traverse",
|
|
158
|
-
"pica_discoveries_query",
|
|
159
|
-
"pica_discoveries_review",
|
|
160
|
-
],
|
|
161
|
-
depends_on: [],
|
|
162
|
-
},
|
|
163
|
-
analytics: {
|
|
164
|
-
description: "provenance, carbon, and catalog analytics",
|
|
165
|
-
tools: [
|
|
166
|
-
"pica_provenance_stats",
|
|
167
|
-
"pica_provenance_work",
|
|
168
|
-
"pica_provenance_certificate",
|
|
169
|
-
"pica_carbon_footprint",
|
|
170
|
-
"pica_carbon_live",
|
|
171
|
-
"pica_catalog_diligence",
|
|
172
|
-
],
|
|
173
|
-
depends_on: ["mcp-server-business:agreements"],
|
|
174
|
-
},
|
|
175
|
-
documents: {
|
|
176
|
-
description: "analyse documents with ai",
|
|
177
|
-
tools: ["pica_documents_analyse"],
|
|
178
|
-
depends_on: [],
|
|
179
|
-
},
|
|
180
|
-
calendar: {
|
|
181
|
-
description: "view catalog calendar events",
|
|
182
|
-
tools: ["pica_calendar_events"],
|
|
183
|
-
depends_on: [],
|
|
184
|
-
},
|
|
185
|
-
publishers: {
|
|
186
|
-
description: "look up and create publishers",
|
|
187
|
-
tools: ["pica_publishers_query", "pica_publishers_create"],
|
|
188
|
-
depends_on: [],
|
|
189
|
-
},
|
|
190
|
-
briefing: {
|
|
191
|
-
description: "get your daily catalog briefing and dashboard",
|
|
192
|
-
tools: [
|
|
193
|
-
"pica_dashboard_attention",
|
|
194
|
-
"pica_dashboard_briefing",
|
|
195
|
-
"pica_dashboard_pulse",
|
|
196
|
-
],
|
|
197
|
-
depends_on: [],
|
|
198
|
-
},
|
|
199
|
-
enrichment: {
|
|
200
|
-
description: "enrich your catalog metadata from external sources",
|
|
201
|
-
tools: [
|
|
202
|
-
"pica_enrichment_candidates",
|
|
203
|
-
"pica_enrichment_compare",
|
|
204
|
-
"pica_enrich_work_mlc",
|
|
205
|
-
"pica_enrich_work_musicbrainz",
|
|
206
|
-
"pica_enrich_work_discogs",
|
|
207
|
-
"pica_enrich_work_spotify",
|
|
208
|
-
"pica_enrich_work_youtube",
|
|
209
|
-
"pica_people_enrich_isni",
|
|
210
|
-
"pica_people_enrich_musicbrainz",
|
|
211
|
-
"pica_registrations_compare",
|
|
212
|
-
],
|
|
213
|
-
depends_on: [],
|
|
214
|
-
},
|
|
215
|
-
team: {
|
|
216
|
-
description: "manage your team members and roles",
|
|
217
|
-
tools: [
|
|
218
|
-
"pica_team_list",
|
|
219
|
-
"pica_team_get",
|
|
220
|
-
"pica_team_invite",
|
|
221
|
-
"pica_team_update_role",
|
|
222
|
-
"pica_team_remove",
|
|
223
|
-
],
|
|
224
|
-
depends_on: [],
|
|
225
|
-
},
|
|
226
|
-
memory: {
|
|
227
|
-
description: "save and recall workspace memories across sessions",
|
|
228
|
-
tools: [
|
|
229
|
-
"pica_memory_list",
|
|
230
|
-
"pica_memory_search",
|
|
231
|
-
"pica_memory_save",
|
|
232
|
-
"pica_memory_delete",
|
|
233
|
-
],
|
|
234
|
-
depends_on: [],
|
|
235
|
-
},
|
|
236
|
-
account: {
|
|
237
|
-
description: "manage credits, storage, and integrations",
|
|
238
|
-
tools: [
|
|
239
|
-
"pica_credits_balance",
|
|
240
|
-
"pica_credits_history",
|
|
241
|
-
"pica_credits_purchase",
|
|
242
|
-
"pica_storage_status",
|
|
243
|
-
"pica_integrations_status",
|
|
244
|
-
],
|
|
245
|
-
depends_on: [],
|
|
246
|
-
},
|
|
247
|
-
profile: {
|
|
248
|
-
description: "manage your user, organisation, and directory profile",
|
|
249
|
-
tools: [
|
|
250
|
-
"pica_user_profile",
|
|
251
|
-
"pica_organisation_profile",
|
|
252
|
-
"pica_directory_settings",
|
|
253
|
-
],
|
|
254
|
-
depends_on: [],
|
|
255
|
-
},
|
|
256
|
-
uploads: {
|
|
257
|
-
description: "upload files to the platform",
|
|
258
|
-
tools: ["pica_upload_file", "pica_upload_complete"],
|
|
259
|
-
depends_on: [],
|
|
260
|
-
},
|
|
261
|
-
};
|
|
262
|
-
/**
|
|
263
|
-
* Operational metadata defaults for pica_tool_details responses.
|
|
264
|
-
* These are reasonable defaults — _query tools return pages, _inspect/_get return one.
|
|
265
|
-
*/
|
|
266
|
-
function getOperationalMeta(toolName) {
|
|
267
|
-
if (toolName.endsWith("_query") || toolName.endsWith("_list")) {
|
|
268
|
-
return { max_results_per_page: 100, paginated: true };
|
|
269
|
-
}
|
|
270
|
-
if (toolName.endsWith("_inspect") ||
|
|
271
|
-
toolName.endsWith("_get") ||
|
|
272
|
-
toolName.endsWith("_get_full")) {
|
|
273
|
-
return { max_results_per_page: 1, paginated: false };
|
|
274
|
-
}
|
|
275
|
-
return {};
|
|
276
|
-
}
|
|
277
|
-
export class DiscoveryTools {
|
|
278
|
-
executeToolFn;
|
|
279
|
-
getToolDef;
|
|
280
|
-
constructor(executeToolFn, getToolDef) {
|
|
281
|
-
this.executeToolFn = executeToolFn;
|
|
282
|
-
this.getToolDef = getToolDef;
|
|
283
|
-
}
|
|
284
|
-
getTools() {
|
|
285
|
-
return [
|
|
286
|
-
this.buildDiscoverTool(),
|
|
287
|
-
this.buildToolDetailsTool(),
|
|
288
|
-
this.buildExecuteTool(),
|
|
289
|
-
];
|
|
290
|
-
}
|
|
291
|
-
buildDiscoverTool() {
|
|
292
|
-
return {
|
|
293
|
-
definition: {
|
|
294
|
-
name: "pica_discover",
|
|
295
|
-
description: "Discover available tool categories. Returns a versioned summary of categories with tool counts and names. " +
|
|
296
|
-
"Use pica_tool_details to drill into a category and get full schemas before calling tools.",
|
|
297
|
-
inputSchema: {
|
|
298
|
-
type: "object",
|
|
299
|
-
properties: {},
|
|
300
|
-
},
|
|
301
|
-
annotations: {
|
|
302
|
-
title: "discover tool categories",
|
|
303
|
-
readOnlyHint: true,
|
|
304
|
-
destructiveHint: false,
|
|
305
|
-
idempotentHint: true,
|
|
306
|
-
openWorldHint: false,
|
|
307
|
-
},
|
|
308
|
-
},
|
|
309
|
-
executor: async () => {
|
|
310
|
-
const categories = {};
|
|
311
|
-
for (const [key, cat] of Object.entries(CATEGORIES)) {
|
|
312
|
-
categories[key] = {
|
|
313
|
-
description: cat.description,
|
|
314
|
-
tool_count: cat.tools.length,
|
|
315
|
-
tools: cat.tools,
|
|
316
|
-
depends_on: cat.depends_on,
|
|
317
|
-
};
|
|
318
|
-
}
|
|
319
|
-
const cacheUntil = new Date(Date.now() + 24 * 60 * 60 * 1000).toISOString();
|
|
320
|
-
const payload = {
|
|
321
|
-
schema_version: SCHEMA_VERSION,
|
|
322
|
-
cache_until: cacheUntil,
|
|
323
|
-
categories,
|
|
324
|
-
};
|
|
325
|
-
return {
|
|
326
|
-
content: [
|
|
327
|
-
{
|
|
328
|
-
type: "text",
|
|
329
|
-
text: JSON.stringify(payload, null, 2),
|
|
330
|
-
},
|
|
331
|
-
],
|
|
332
|
-
structuredContent: payload,
|
|
333
|
-
};
|
|
334
|
-
},
|
|
335
|
-
};
|
|
336
|
-
}
|
|
337
|
-
buildToolDetailsTool() {
|
|
338
|
-
return {
|
|
339
|
-
definition: {
|
|
340
|
-
name: "pica_tool_details",
|
|
341
|
-
description: "Get full schema and metadata for one tool or all tools in a category. " +
|
|
342
|
-
"Pass either { tool: 'name' } or { category: 'name' } (from pica_discover). " +
|
|
343
|
-
"Returns schema, annotations, recovery hints, and operational metadata.",
|
|
344
|
-
inputSchema: {
|
|
345
|
-
type: "object",
|
|
346
|
-
properties: {
|
|
347
|
-
tool: {
|
|
348
|
-
type: "string",
|
|
349
|
-
description: "Specific tool name (e.g. pica_works_inspect)",
|
|
350
|
-
},
|
|
351
|
-
category: {
|
|
352
|
-
type: "string",
|
|
353
|
-
description: "Category name from pica_discover (e.g. works)",
|
|
354
|
-
},
|
|
355
|
-
},
|
|
356
|
-
},
|
|
357
|
-
annotations: {
|
|
358
|
-
title: "get tool details",
|
|
359
|
-
readOnlyHint: true,
|
|
360
|
-
destructiveHint: false,
|
|
361
|
-
idempotentHint: true,
|
|
362
|
-
openWorldHint: false,
|
|
363
|
-
},
|
|
364
|
-
},
|
|
365
|
-
executor: async (args) => {
|
|
366
|
-
if (args.tool) {
|
|
367
|
-
const detail = this.buildToolDetail(args.tool);
|
|
368
|
-
if (!detail) {
|
|
369
|
-
return {
|
|
370
|
-
content: [
|
|
371
|
-
{
|
|
372
|
-
type: "text",
|
|
373
|
-
text: JSON.stringify({
|
|
374
|
-
error_code: "TOOL_NOT_FOUND",
|
|
375
|
-
tool: args.tool,
|
|
376
|
-
message: `no tool named '${args.tool}' — use pica_discover to see available categories`,
|
|
377
|
-
retry_eligible: false,
|
|
378
|
-
}, null, 2),
|
|
379
|
-
},
|
|
380
|
-
],
|
|
381
|
-
isError: true,
|
|
382
|
-
};
|
|
383
|
-
}
|
|
384
|
-
return {
|
|
385
|
-
content: [{ type: "text", text: JSON.stringify(detail, null, 2) }],
|
|
386
|
-
structuredContent: detail,
|
|
387
|
-
};
|
|
388
|
-
}
|
|
389
|
-
if (args.category) {
|
|
390
|
-
const cat = CATEGORIES[args.category];
|
|
391
|
-
if (!cat) {
|
|
392
|
-
return {
|
|
393
|
-
content: [
|
|
394
|
-
{
|
|
395
|
-
type: "text",
|
|
396
|
-
text: JSON.stringify({
|
|
397
|
-
error_code: "CATEGORY_NOT_FOUND",
|
|
398
|
-
category: args.category,
|
|
399
|
-
message: `no category '${args.category}' — use pica_discover to see available categories`,
|
|
400
|
-
retry_eligible: false,
|
|
401
|
-
}, null, 2),
|
|
402
|
-
},
|
|
403
|
-
],
|
|
404
|
-
isError: true,
|
|
405
|
-
};
|
|
406
|
-
}
|
|
407
|
-
const details = cat.tools
|
|
408
|
-
.map((name) => this.buildToolDetail(name))
|
|
409
|
-
.filter((d) => d !== null);
|
|
410
|
-
const payload = {
|
|
411
|
-
category: args.category,
|
|
412
|
-
tool_count: details.length,
|
|
413
|
-
tools: details,
|
|
414
|
-
};
|
|
415
|
-
return {
|
|
416
|
-
content: [{ type: "text", text: JSON.stringify(payload, null, 2) }],
|
|
417
|
-
structuredContent: payload,
|
|
418
|
-
};
|
|
419
|
-
}
|
|
420
|
-
return {
|
|
421
|
-
content: [
|
|
422
|
-
{
|
|
423
|
-
type: "text",
|
|
424
|
-
text: JSON.stringify({
|
|
425
|
-
error_code: "VALIDATION_ERROR",
|
|
426
|
-
message: "provide either { tool: 'name' } or { category: 'name' }",
|
|
427
|
-
retry_eligible: false,
|
|
428
|
-
}, null, 2),
|
|
429
|
-
},
|
|
430
|
-
],
|
|
431
|
-
isError: true,
|
|
432
|
-
};
|
|
433
|
-
},
|
|
434
|
-
};
|
|
435
|
-
}
|
|
436
|
-
buildToolDetail(toolName) {
|
|
437
|
-
const registered = this.getToolDef(toolName);
|
|
438
|
-
const metadata = getToolMetadata(toolName);
|
|
439
|
-
// Return null when the tool is completely unknown (not registered and not in metadata)
|
|
440
|
-
if (!registered && !metadata) {
|
|
441
|
-
return null;
|
|
442
|
-
}
|
|
443
|
-
// Collect all recovery hints for this tool (all error codes)
|
|
444
|
-
const hints = RECOVERY_HINTS[toolName] ?? [];
|
|
445
|
-
const definition = registered?.definition ?? null;
|
|
446
|
-
return {
|
|
447
|
-
tool: toolName,
|
|
448
|
-
description: definition?.description ?? metadata?.display_name ?? toolName,
|
|
449
|
-
schema: definition?.inputSchema ?? null,
|
|
450
|
-
annotations: definition?.annotations ?? null,
|
|
451
|
-
metadata: metadata
|
|
452
|
-
? {
|
|
453
|
-
category: metadata.category,
|
|
454
|
-
risk: metadata.risk,
|
|
455
|
-
retry_safe: metadata.retry_safe,
|
|
456
|
-
display_name: metadata.display_name,
|
|
457
|
-
...(metadata.credits_required !== undefined
|
|
458
|
-
? { credits_required: metadata.credits_required }
|
|
459
|
-
: {}),
|
|
460
|
-
}
|
|
461
|
-
: null,
|
|
462
|
-
recovery_hints: hints,
|
|
463
|
-
operational: getOperationalMeta(toolName),
|
|
464
|
-
};
|
|
465
|
-
}
|
|
466
|
-
buildExecuteTool() {
|
|
467
|
-
return {
|
|
468
|
-
definition: {
|
|
469
|
-
name: "pica_execute",
|
|
470
|
-
description: "Execute any catalog tool by name. " +
|
|
471
|
-
"Use pica_discover to find categories, pica_tool_details to get the schema, then call here with { tool, args }.",
|
|
472
|
-
inputSchema: {
|
|
473
|
-
type: "object",
|
|
474
|
-
properties: {
|
|
475
|
-
tool: {
|
|
476
|
-
type: "string",
|
|
477
|
-
description: "Tool name to execute (e.g. pica_works_inspect). Use pica_discover + pica_tool_details to find available tools.",
|
|
478
|
-
},
|
|
479
|
-
args: {
|
|
480
|
-
type: "object",
|
|
481
|
-
additionalProperties: true,
|
|
482
|
-
description: "Arguments to pass to the tool",
|
|
483
|
-
},
|
|
484
|
-
},
|
|
485
|
-
required: ["tool"],
|
|
486
|
-
},
|
|
487
|
-
annotations: {
|
|
488
|
-
title: "execute a catalog tool",
|
|
489
|
-
readOnlyHint: false,
|
|
490
|
-
destructiveHint: false,
|
|
491
|
-
idempotentHint: false,
|
|
492
|
-
openWorldHint: false,
|
|
493
|
-
},
|
|
494
|
-
},
|
|
495
|
-
executor: async (args) => {
|
|
496
|
-
const toolName = args.tool;
|
|
497
|
-
const toolArgs = args.args ?? {};
|
|
498
|
-
if (!toolName || typeof toolName !== "string" || !toolName.trim()) {
|
|
499
|
-
return {
|
|
500
|
-
content: [
|
|
501
|
-
{
|
|
502
|
-
type: "text",
|
|
503
|
-
text: JSON.stringify({
|
|
504
|
-
error_code: "VALIDATION_ERROR",
|
|
505
|
-
tool: null,
|
|
506
|
-
message: "missing required field: tool",
|
|
507
|
-
retry_eligible: false,
|
|
508
|
-
}, null, 2),
|
|
509
|
-
},
|
|
510
|
-
],
|
|
511
|
-
isError: true,
|
|
512
|
-
};
|
|
513
|
-
}
|
|
514
|
-
// Block meta-tool self-invocation to prevent infinite loops
|
|
515
|
-
const META_TOOLS = new Set([
|
|
516
|
-
"pica_discover",
|
|
517
|
-
"pica_tool_details",
|
|
518
|
-
"pica_execute",
|
|
519
|
-
]);
|
|
520
|
-
if (META_TOOLS.has(toolName)) {
|
|
521
|
-
return {
|
|
522
|
-
content: [
|
|
523
|
-
{
|
|
524
|
-
type: "text",
|
|
525
|
-
text: JSON.stringify({
|
|
526
|
-
error_code: "INVALID_TOOL",
|
|
527
|
-
tool: toolName,
|
|
528
|
-
message: "meta-tools (pica_discover, pica_tool_details, pica_execute) cannot be invoked via pica_execute",
|
|
529
|
-
retry_eligible: false,
|
|
530
|
-
}, null, 2),
|
|
531
|
-
},
|
|
532
|
-
],
|
|
533
|
-
isError: true,
|
|
534
|
-
};
|
|
535
|
-
}
|
|
536
|
-
try {
|
|
537
|
-
return await this.executeToolFn(toolName, toolArgs);
|
|
538
|
-
}
|
|
539
|
-
catch (err) {
|
|
540
|
-
const message = err instanceof Error ? err.message : String(err);
|
|
541
|
-
return {
|
|
542
|
-
content: [
|
|
543
|
-
{
|
|
544
|
-
type: "text",
|
|
545
|
-
text: JSON.stringify({
|
|
546
|
-
error_code: "EXECUTION_ERROR",
|
|
547
|
-
tool: toolName,
|
|
548
|
-
message,
|
|
549
|
-
retry_eligible: false,
|
|
550
|
-
}, null, 2),
|
|
551
|
-
},
|
|
552
|
-
],
|
|
553
|
-
isError: true,
|
|
554
|
-
};
|
|
555
|
-
}
|
|
556
|
-
},
|
|
557
|
-
};
|
|
558
|
-
}
|
|
559
|
-
}
|
|
560
|
-
//# sourceMappingURL=discovery.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"discovery.js","sourceRoot":"","sources":["../../src/tools/discovery.ts"],"names":[],"mappings":"AAAA,6DAA6D;AAa7D,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAErD,MAAM,cAAc,GAAG,QAAQ,CAAC;AAQhC;;;;GAIG;AACH,MAAM,UAAU,GAAuC;IACrD,KAAK,EAAE;QACL,WAAW,EAAE,2BAA2B;QACxC,KAAK,EAAE;YACL,kBAAkB;YAClB,oBAAoB;YACpB,mBAAmB;YACnB,mBAAm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;gCACZ,IAAI,EAAE,IAAI,CAAC,SAAS,CAClB;oCACE,UAAU,EAAE,cAAc;oCAC1B,IAAI,EAAE,QAAQ;oCACd,OAAO,EACL,gGAAgG;oCAClG,cAAc,EAAE,KAAK;iCACtB,EACD,IAAI,EACJ,CAAC,CACF;6BACF;yBACF;wBACD,OAAO,EAAE,IAAI;qBACd,CAAC;gBACJ,CAAC;gBAED,IAAI,CAAC;oBACH,OAAO,MAAM,IAAI,CAAC,aAAa,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC;gBACtD,CAAC;gBAAC,OAAO,GAAG,EAAE,CAAC;oBACb,MAAM,OAAO,GAAG,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;oBACjE,OAAO;wBACL,OAAO,EAAE;4BACP;gCACE,IAAI,EAAE,MAAM;gCACZ,IAAI,EAAE,IAAI,CAAC,SAAS,CAClB;oCACE,UAAU,EAAE,iBAAiB;oCAC7B,IAAI,EAAE,QAAQ;oCACd,OAAO;oCACP,cAAc,EAAE,KAAK;iCACtB,EACD,IAAI,EACJ,CAAC,CACF;6BACF;yBACF;wBACD,OAAO,EAAE,IAAI;qBACd,CAAC;gBACJ,CAAC;YACH,CAAC;SACF,CAAC;IACJ,CAAC;CACF"}
|
package/dist/tools/disputes.d.ts
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Disputes MCP Tools — ADR-139 Step 3
|
|
3
|
-
*
|
|
4
|
-
* Cross-org dispute tracking. "Do I have any disputes?"
|
|
5
|
-
* Read-only for now — write operations can be added later.
|
|
6
|
-
*/
|
|
7
|
-
import { PicaClient } from "@withpica/mcp-sdk";
|
|
8
|
-
import type { ToolDefinition, ToolExecutor } from "./index.js";
|
|
9
|
-
export declare class DisputesTools {
|
|
10
|
-
private pica;
|
|
11
|
-
constructor(pica: PicaClient);
|
|
12
|
-
getTools(): Array<{
|
|
13
|
-
definition: ToolDefinition;
|
|
14
|
-
executor: ToolExecutor;
|
|
15
|
-
}>;
|
|
16
|
-
private listDisputes;
|
|
17
|
-
}
|
|
18
|
-
//# sourceMappingURL=disputes.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"disputes.d.ts","sourceRoot":"","sources":["../../src/tools/disputes.ts"],"names":[],"mappings":"AAEA;;;;;GAKG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,KAAK,EAAE,cAAc,EAAE,YAAY,EAAc,MAAM,YAAY,CAAC;AAG3E,qBAAa,aAAa;IACxB,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;YA0B3D,YAAY;CAoC3B"}
|