@withpica/mcp-server 1.3.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/.claude/settings.local.json +5 -0
- package/CHANGELOG.md +1850 -0
- package/README.md +304 -0
- package/assets/fonts/GeistSans-Light.woff2 +0 -0
- package/assets/fonts/InstrumentSerif-Italic.woff2 +0 -0
- package/assets/fonts/InstrumentSerif-Regular.woff2 +0 -0
- package/dist/apps/download.d.ts +2 -0
- package/dist/apps/download.d.ts.map +1 -0
- package/dist/apps/download.js +125 -0
- package/dist/apps/download.js.map +1 -0
- package/dist/apps/generated/shared-bundle.d.ts +5 -0
- package/dist/apps/generated/shared-bundle.d.ts.map +1 -0
- package/dist/apps/generated/shared-bundle.js +7 -0
- package/dist/apps/generated/shared-bundle.js.map +1 -0
- package/dist/apps/release.d.ts +2 -0
- package/dist/apps/release.d.ts.map +1 -0
- package/dist/apps/release.js +69 -0
- package/dist/apps/release.js.map +1 -0
- package/dist/apps/shared.d.ts +15 -0
- package/dist/apps/shared.d.ts.map +1 -0
- package/dist/apps/shared.js +480 -0
- package/dist/apps/shared.js.map +1 -0
- package/dist/apps/upload.d.ts +2 -0
- package/dist/apps/upload.d.ts.map +1 -0
- package/dist/apps/upload.js +280 -0
- package/dist/apps/upload.js.map +1 -0
- package/dist/config.d.ts +14 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/config.js +73 -0
- package/dist/config.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +35 -0
- package/dist/index.js.map +1 -0
- package/dist/prompts/index.d.ts +86 -0
- package/dist/prompts/index.d.ts.map +1 -0
- package/dist/prompts/index.js +645 -0
- package/dist/prompts/index.js.map +1 -0
- package/dist/resources/agent-guide.d.ts +15 -0
- package/dist/resources/agent-guide.d.ts.map +1 -0
- package/dist/resources/agent-guide.js +284 -0
- package/dist/resources/agent-guide.js.map +1 -0
- package/dist/resources/index.d.ts +66 -0
- package/dist/resources/index.d.ts.map +1 -0
- package/dist/resources/index.js +510 -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 +68 -0
- package/dist/resources/llms-primer.js.map +1 -0
- package/dist/resources/required-schemas.generated.d.ts +455 -0
- package/dist/resources/required-schemas.generated.d.ts.map +1 -0
- package/dist/resources/required-schemas.generated.js +1041 -0
- package/dist/resources/required-schemas.generated.js.map +1 -0
- package/dist/resources/required-schemas.source.d.ts +53 -0
- package/dist/resources/required-schemas.source.d.ts.map +1 -0
- package/dist/resources/required-schemas.source.js +493 -0
- package/dist/resources/required-schemas.source.js.map +1 -0
- package/dist/resources/welcome.d.ts +14 -0
- package/dist/resources/welcome.d.ts.map +1 -0
- package/dist/resources/welcome.js +26 -0
- package/dist/resources/welcome.js.map +1 -0
- package/dist/server-instructions.d.ts +60 -0
- package/dist/server-instructions.d.ts.map +1 -0
- package/dist/server-instructions.js +93 -0
- package/dist/server-instructions.js.map +1 -0
- package/dist/server.d.ts +52 -0
- package/dist/server.d.ts.map +1 -0
- package/dist/server.js +334 -0
- package/dist/server.js.map +1 -0
- package/dist/tools/access-simulate.d.ts +23 -0
- package/dist/tools/access-simulate.d.ts.map +1 -0
- package/dist/tools/access-simulate.js +162 -0
- package/dist/tools/access-simulate.js.map +1 -0
- package/dist/tools/agent-identity.d.ts +36 -0
- package/dist/tools/agent-identity.d.ts.map +1 -0
- package/dist/tools/agent-identity.js +274 -0
- package/dist/tools/agent-identity.js.map +1 -0
- package/dist/tools/agreement-types.d.ts +27 -0
- package/dist/tools/agreement-types.d.ts.map +1 -0
- package/dist/tools/agreement-types.js +281 -0
- package/dist/tools/agreement-types.js.map +1 -0
- package/dist/tools/agreements.d.ts +20 -0
- package/dist/tools/agreements.d.ts.map +1 -0
- package/dist/tools/agreements.js +282 -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 +130 -0
- package/dist/tools/analytics.js.map +1 -0
- package/dist/tools/app-tools.d.ts +15 -0
- package/dist/tools/app-tools.d.ts.map +1 -0
- package/dist/tools/app-tools.js +388 -0
- package/dist/tools/app-tools.js.map +1 -0
- package/dist/tools/assets.d.ts +25 -0
- package/dist/tools/assets.d.ts.map +1 -0
- package/dist/tools/assets.js +454 -0
- package/dist/tools/assets.js.map +1 -0
- package/dist/tools/audio-files.d.ts +20 -0
- package/dist/tools/audio-files.d.ts.map +1 -0
- package/dist/tools/audio-files.js +409 -0
- package/dist/tools/audio-files.js.map +1 -0
- package/dist/tools/audit.d.ts +19 -0
- package/dist/tools/audit.d.ts.map +1 -0
- package/dist/tools/audit.js +58 -0
- package/dist/tools/audit.js.map +1 -0
- package/dist/tools/auth.d.ts +22 -0
- package/dist/tools/auth.d.ts.map +1 -0
- package/dist/tools/auth.js +212 -0
- package/dist/tools/auth.js.map +1 -0
- package/dist/tools/bulk.d.ts +22 -0
- package/dist/tools/bulk.d.ts.map +1 -0
- package/dist/tools/bulk.js +164 -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 +68 -0
- package/dist/tools/calendar.js.map +1 -0
- package/dist/tools/collaborators.d.ts +21 -0
- package/dist/tools/collaborators.d.ts.map +1 -0
- package/dist/tools/collaborators.js +381 -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 +80 -0
- package/dist/tools/comparisons.js.map +1 -0
- package/dist/tools/credits.d.ts +39 -0
- package/dist/tools/credits.d.ts.map +1 -0
- package/dist/tools/credits.js +541 -0
- package/dist/tools/credits.js.map +1 -0
- package/dist/tools/custody-hints.d.ts +16 -0
- package/dist/tools/custody-hints.d.ts.map +1 -0
- package/dist/tools/custody-hints.js +27 -0
- package/dist/tools/custody-hints.js.map +1 -0
- package/dist/tools/custody.d.ts +38 -0
- package/dist/tools/custody.d.ts.map +1 -0
- package/dist/tools/custody.js +281 -0
- package/dist/tools/custody.js.map +1 -0
- package/dist/tools/dashboard.d.ts +22 -0
- package/dist/tools/dashboard.d.ts.map +1 -0
- package/dist/tools/dashboard.js +258 -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 +107 -0
- package/dist/tools/directory.js.map +1 -0
- package/dist/tools/discovery.d.ts +49 -0
- package/dist/tools/discovery.d.ts.map +1 -0
- package/dist/tools/discovery.js +851 -0
- package/dist/tools/discovery.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 +62 -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 +37 -0
- package/dist/tools/documents.js.map +1 -0
- package/dist/tools/duplicates.d.ts +25 -0
- package/dist/tools/duplicates.d.ts.map +1 -0
- package/dist/tools/duplicates.js +108 -0
- package/dist/tools/duplicates.js.map +1 -0
- package/dist/tools/enrichment.d.ts +56 -0
- package/dist/tools/enrichment.d.ts.map +1 -0
- package/dist/tools/enrichment.js +616 -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 +184 -0
- package/dist/tools/exports.js.map +1 -0
- package/dist/tools/feedback.d.ts +22 -0
- package/dist/tools/feedback.d.ts.map +1 -0
- package/dist/tools/feedback.js +100 -0
- package/dist/tools/feedback.js.map +1 -0
- package/dist/tools/forbidden-keywords.d.ts +62 -0
- package/dist/tools/forbidden-keywords.d.ts.map +1 -0
- package/dist/tools/forbidden-keywords.js +99 -0
- package/dist/tools/forbidden-keywords.js.map +1 -0
- package/dist/tools/gap-hints.d.ts +53 -0
- package/dist/tools/gap-hints.d.ts.map +1 -0
- package/dist/tools/gap-hints.js +245 -0
- package/dist/tools/gap-hints.js.map +1 -0
- package/dist/tools/groups.d.ts +29 -0
- package/dist/tools/groups.d.ts.map +1 -0
- package/dist/tools/groups.js +186 -0
- package/dist/tools/groups.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 +206 -0
- package/dist/tools/import-documents.js.map +1 -0
- package/dist/tools/import.d.ts +31 -0
- package/dist/tools/import.d.ts.map +1 -0
- package/dist/tools/import.js +610 -0
- package/dist/tools/import.js.map +1 -0
- package/dist/tools/index.d.ts +293 -0
- package/dist/tools/index.d.ts.map +1 -0
- package/dist/tools/index.js +1182 -0
- package/dist/tools/index.js.map +1 -0
- package/dist/tools/integrations.d.ts +19 -0
- package/dist/tools/integrations.d.ts.map +1 -0
- package/dist/tools/integrations.js +120 -0
- package/dist/tools/integrations.js.map +1 -0
- package/dist/tools/labels.d.ts +20 -0
- package/dist/tools/labels.d.ts.map +1 -0
- package/dist/tools/labels.js +48 -0
- package/dist/tools/labels.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 +120 -0
- package/dist/tools/memory.js.map +1 -0
- package/dist/tools/metadata.d.ts +15 -0
- package/dist/tools/metadata.d.ts.map +1 -0
- package/dist/tools/metadata.js +1532 -0
- package/dist/tools/metadata.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 +371 -0
- package/dist/tools/multimedia.js.map +1 -0
- package/dist/tools/my-reported-issues.d.ts +32 -0
- package/dist/tools/my-reported-issues.d.ts.map +1 -0
- package/dist/tools/my-reported-issues.js +123 -0
- package/dist/tools/my-reported-issues.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 +115 -0
- package/dist/tools/notes.js.map +1 -0
- package/dist/tools/notifications.d.ts +28 -0
- package/dist/tools/notifications.d.ts.map +1 -0
- package/dist/tools/notifications.js +417 -0
- package/dist/tools/notifications.js.map +1 -0
- package/dist/tools/onboarding.d.ts +24 -0
- package/dist/tools/onboarding.d.ts.map +1 -0
- package/dist/tools/onboarding.js +81 -0
- package/dist/tools/onboarding.js.map +1 -0
- package/dist/tools/people.d.ts +254 -0
- package/dist/tools/people.d.ts.map +1 -0
- package/dist/tools/people.js +481 -0
- package/dist/tools/people.js.map +1 -0
- package/dist/tools/projects.d.ts +20 -0
- package/dist/tools/projects.d.ts.map +1 -0
- package/dist/tools/projects.js +316 -0
- package/dist/tools/projects.js.map +1 -0
- package/dist/tools/public-filter.d.ts +43 -0
- package/dist/tools/public-filter.d.ts.map +1 -0
- package/dist/tools/public-filter.js +356 -0
- package/dist/tools/public-filter.js.map +1 -0
- package/dist/tools/publishers.d.ts +30 -0
- package/dist/tools/publishers.d.ts.map +1 -0
- package/dist/tools/publishers.js +105 -0
- package/dist/tools/publishers.js.map +1 -0
- package/dist/tools/purchases.d.ts +27 -0
- package/dist/tools/purchases.d.ts.map +1 -0
- package/dist/tools/purchases.js +9 -0
- package/dist/tools/purchases.js.map +1 -0
- package/dist/tools/recording-attribution-hints.d.ts +24 -0
- package/dist/tools/recording-attribution-hints.d.ts.map +1 -0
- package/dist/tools/recording-attribution-hints.js +27 -0
- package/dist/tools/recording-attribution-hints.js.map +1 -0
- package/dist/tools/recordings.d.ts +96 -0
- package/dist/tools/recordings.d.ts.map +1 -0
- package/dist/tools/recordings.js +564 -0
- package/dist/tools/recordings.js.map +1 -0
- package/dist/tools/recovery-hints.d.ts +40 -0
- package/dist/tools/recovery-hints.d.ts.map +1 -0
- package/dist/tools/recovery-hints.js +827 -0
- package/dist/tools/recovery-hints.js.map +1 -0
- package/dist/tools/release-rich.d.ts +31 -0
- package/dist/tools/release-rich.d.ts.map +1 -0
- package/dist/tools/release-rich.js +245 -0
- package/dist/tools/release-rich.js.map +1 -0
- package/dist/tools/releases.d.ts +36 -0
- package/dist/tools/releases.d.ts.map +1 -0
- package/dist/tools/releases.js +649 -0
- package/dist/tools/releases.js.map +1 -0
- package/dist/tools/report-issue.d.ts +21 -0
- package/dist/tools/report-issue.d.ts.map +1 -0
- package/dist/tools/report-issue.js +101 -0
- package/dist/tools/report-issue.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 +262 -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 +115 -0
- package/dist/tools/search.js.map +1 -0
- package/dist/tools/send.d.ts +17 -0
- package/dist/tools/send.d.ts.map +1 -0
- package/dist/tools/send.js +188 -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 +153 -0
- package/dist/tools/sessions.js.map +1 -0
- package/dist/tools/settings.d.ts +23 -0
- package/dist/tools/settings.d.ts.map +1 -0
- package/dist/tools/settings.js +365 -0
- package/dist/tools/settings.js.map +1 -0
- package/dist/tools/share-links.d.ts +22 -0
- package/dist/tools/share-links.d.ts.map +1 -0
- package/dist/tools/share-links.js +188 -0
- package/dist/tools/share-links.js.map +1 -0
- package/dist/tools/signup.d.ts +26 -0
- package/dist/tools/signup.d.ts.map +1 -0
- package/dist/tools/signup.js +266 -0
- package/dist/tools/signup.js.map +1 -0
- package/dist/tools/split-sheets.d.ts +25 -0
- package/dist/tools/split-sheets.d.ts.map +1 -0
- package/dist/tools/split-sheets.js +309 -0
- package/dist/tools/split-sheets.js.map +1 -0
- package/dist/tools/storage-config.d.ts +13 -0
- package/dist/tools/storage-config.d.ts.map +1 -0
- package/dist/tools/storage-config.js +245 -0
- package/dist/tools/storage-config.js.map +1 -0
- package/dist/tools/subscription.d.ts +60 -0
- package/dist/tools/subscription.d.ts.map +1 -0
- package/dist/tools/subscription.js +440 -0
- package/dist/tools/subscription.js.map +1 -0
- package/dist/tools/sync-placements.d.ts +31 -0
- package/dist/tools/sync-placements.d.ts.map +1 -0
- package/dist/tools/sync-placements.js +431 -0
- package/dist/tools/sync-placements.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 +144 -0
- package/dist/tools/team.js.map +1 -0
- package/dist/tools/telegram.d.ts +21 -0
- package/dist/tools/telegram.d.ts.map +1 -0
- package/dist/tools/telegram.js +144 -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 +165 -0
- package/dist/tools/uploads.js.map +1 -0
- package/dist/tools/works.d.ts +71 -0
- package/dist/tools/works.d.ts.map +1 -0
- package/dist/tools/works.js +694 -0
- package/dist/tools/works.js.map +1 -0
- package/package.json +54 -0
- package/scripts/build-required-schemas.ts +233 -0
- package/scripts/bundle-apps.ts +61 -0
- package/scripts/refresh-schema-mirror.ts +182 -0
- package/server.json +20 -0
|
@@ -0,0 +1,481 @@
|
|
|
1
|
+
// Copyright (c) 2024-2026 Withpica Ltd. All rights reserved.
|
|
2
|
+
import { formatSuccess, formatStructuredList, withBillingGate, } from "@withpica/mcp-utils";
|
|
3
|
+
import { computePersonGapHints } from "./gap-hints.js";
|
|
4
|
+
// The two per-source `pica_people_enrich_*` tools were folded into
|
|
5
|
+
// `pica_resolve_person` by ADR-179 Phase 2 and removed in ADR-154 F13;
|
|
6
|
+
// the corresponding SDK enrich methods are no longer imported here.
|
|
7
|
+
/**
|
|
8
|
+
* Canonical source for the pica_people_create / pica_people_update input
|
|
9
|
+
* shape. Mirror of PEOPLE_CORE_WRITE_FIELDS + PEOPLE_SATELLITE_ROUTED_FIELDS
|
|
10
|
+
* in lib/services/people-admin/write-constants.ts. Keep these two in sync:
|
|
11
|
+
* if a property is added here it must be added to the allow-list (so the
|
|
12
|
+
* HTTP route lets it through) and — if it's a satellite field — to
|
|
13
|
+
* ENRICHMENT_SATELLITE_FIELDS (so the service routes it to person_enrichment).
|
|
14
|
+
*
|
|
15
|
+
* Exported for future bulk-tool reuse.
|
|
16
|
+
*/
|
|
17
|
+
export const PEOPLE_WRITE_PROPERTIES = {
|
|
18
|
+
// names + identity
|
|
19
|
+
first_name: { type: "string", description: "First name" },
|
|
20
|
+
last_name: { type: "string", description: "Last name" },
|
|
21
|
+
middle_name: { type: "string", description: "Middle name" },
|
|
22
|
+
name: {
|
|
23
|
+
type: "string",
|
|
24
|
+
description: "Full name. Normally derived from first_name + last_name; set explicitly only for imports where the parts aren't separable.",
|
|
25
|
+
},
|
|
26
|
+
stage_name: {
|
|
27
|
+
type: "string",
|
|
28
|
+
description: "Primary stage / artist name (legacy singular)",
|
|
29
|
+
},
|
|
30
|
+
stage_names: {
|
|
31
|
+
type: "array",
|
|
32
|
+
items: { type: "string" },
|
|
33
|
+
description: "All stage / artist names (canonical plural)",
|
|
34
|
+
},
|
|
35
|
+
person_type: {
|
|
36
|
+
type: "array",
|
|
37
|
+
items: { type: "string" },
|
|
38
|
+
description: "Person classification array (e.g. ['individual'], ['business']). Canonical column — `type` is a deprecated duplicate and will be rejected.",
|
|
39
|
+
},
|
|
40
|
+
biography: { type: "string", description: "Biography text" },
|
|
41
|
+
// contact
|
|
42
|
+
email: { type: "string", description: "Primary email address" },
|
|
43
|
+
emails: {
|
|
44
|
+
type: "array",
|
|
45
|
+
items: {
|
|
46
|
+
type: "object",
|
|
47
|
+
properties: {
|
|
48
|
+
email: { type: "string" },
|
|
49
|
+
label: { type: "string" },
|
|
50
|
+
primary: { type: "boolean" },
|
|
51
|
+
},
|
|
52
|
+
},
|
|
53
|
+
description: "Additional emails with label/primary metadata",
|
|
54
|
+
},
|
|
55
|
+
phone: { type: "string", description: "Phone number" },
|
|
56
|
+
website: { type: "string", description: "Website URL" },
|
|
57
|
+
social_media: {
|
|
58
|
+
type: "object",
|
|
59
|
+
description: "Social handles keyed by platform, e.g. { twitter: '@ada', instagram: 'ada_lovelace' }",
|
|
60
|
+
},
|
|
61
|
+
// roles + tags
|
|
62
|
+
roles: {
|
|
63
|
+
type: "array",
|
|
64
|
+
items: { type: "string" },
|
|
65
|
+
description: "Roles (e.g. ['artist', 'songwriter', 'producer']). Canonical column — `role` singular is a deprecated duplicate and will be rejected. Defaults to ['collaborator'] on create if omitted.",
|
|
66
|
+
},
|
|
67
|
+
tags: {
|
|
68
|
+
type: "array",
|
|
69
|
+
items: { type: "string" },
|
|
70
|
+
description: "Tags for categorisation",
|
|
71
|
+
},
|
|
72
|
+
// PRO / industry identifiers on people itself
|
|
73
|
+
cae_ipi_number: {
|
|
74
|
+
type: "string",
|
|
75
|
+
description: "CAE/IPI number (songwriter/publisher identifier, 9-11 digits)",
|
|
76
|
+
},
|
|
77
|
+
ipn_number: {
|
|
78
|
+
type: "string",
|
|
79
|
+
description: "IPN number (performer identifier)",
|
|
80
|
+
},
|
|
81
|
+
prs_number: { type: "string", description: "PRS member number" },
|
|
82
|
+
ppl_number: { type: "string", description: "PPL member number" },
|
|
83
|
+
mcps_member_number: {
|
|
84
|
+
type: "string",
|
|
85
|
+
description: "MCPS member number",
|
|
86
|
+
},
|
|
87
|
+
pro_name: {
|
|
88
|
+
type: "string",
|
|
89
|
+
description: "Performing rights organisation name (e.g. PRS, ASCAP, BMI, SACEM)",
|
|
90
|
+
},
|
|
91
|
+
pro_member_number: {
|
|
92
|
+
type: "string",
|
|
93
|
+
description: "Member number at the PRO named in pro_name",
|
|
94
|
+
},
|
|
95
|
+
default_publisher: {
|
|
96
|
+
type: "string",
|
|
97
|
+
description: "Default publisher name for this person",
|
|
98
|
+
},
|
|
99
|
+
default_publisher_ipi: {
|
|
100
|
+
type: "string",
|
|
101
|
+
description: "Default publisher's IPI number",
|
|
102
|
+
},
|
|
103
|
+
// business-contact fields
|
|
104
|
+
company: { type: "string", description: "Company / organisation name" },
|
|
105
|
+
position: {
|
|
106
|
+
type: "string",
|
|
107
|
+
description: "Job title / position at the company",
|
|
108
|
+
},
|
|
109
|
+
territory: {
|
|
110
|
+
type: "string",
|
|
111
|
+
description: "Primary territory / market (e.g. 'UK', 'US East Coast')",
|
|
112
|
+
},
|
|
113
|
+
relationship_strength: {
|
|
114
|
+
type: "integer",
|
|
115
|
+
description: "Relationship strength score (caller-defined scale)",
|
|
116
|
+
},
|
|
117
|
+
// contact prefs
|
|
118
|
+
email_preferences: {
|
|
119
|
+
type: "object",
|
|
120
|
+
description: "Email opt-in preferences, e.g. { monthly_digest: true, news_announcements: false }",
|
|
121
|
+
},
|
|
122
|
+
// presence
|
|
123
|
+
profile_image_url: {
|
|
124
|
+
type: "string",
|
|
125
|
+
description: "URL to profile image",
|
|
126
|
+
},
|
|
127
|
+
// notes
|
|
128
|
+
notes: { type: "string", description: "Internal notes" },
|
|
129
|
+
// ---- Satellite-routed (person_enrichment) ----
|
|
130
|
+
// These are real columns on public.person_enrichment, not on public.people.
|
|
131
|
+
// The service layer (lib/services/people-admin/enrichment-satellite.ts)
|
|
132
|
+
// fans them out via syncPersonEnrichmentSatellite. Reads surface them
|
|
133
|
+
// back on the person record via a PostgREST join (see person-admin/
|
|
134
|
+
// constants.ts PERSON_ALL_COLUMNS -> person_enrichment(*)).
|
|
135
|
+
isni: {
|
|
136
|
+
type: "string",
|
|
137
|
+
description: "ISNI identifier (16 digits). Stored on person_enrichment satellite.",
|
|
138
|
+
},
|
|
139
|
+
musicbrainz_id: {
|
|
140
|
+
type: "string",
|
|
141
|
+
description: "MusicBrainz artist ID (UUID). Stored on person_enrichment satellite.",
|
|
142
|
+
},
|
|
143
|
+
wikidata_id: {
|
|
144
|
+
type: "string",
|
|
145
|
+
description: "Wikidata entity ID (e.g. Q7259). Stored on person_enrichment satellite.",
|
|
146
|
+
},
|
|
147
|
+
discogs_artist_id: {
|
|
148
|
+
type: "string",
|
|
149
|
+
description: "Discogs artist ID. Stored on person_enrichment satellite.",
|
|
150
|
+
},
|
|
151
|
+
deezer_artist_id: {
|
|
152
|
+
type: "string",
|
|
153
|
+
description: "Deezer artist ID. Stored on person_enrichment satellite.",
|
|
154
|
+
},
|
|
155
|
+
date_of_birth: {
|
|
156
|
+
type: "string",
|
|
157
|
+
description: "Date of birth (ISO 8601, YYYY-MM-DD). Stored on person_enrichment satellite.",
|
|
158
|
+
},
|
|
159
|
+
gender: {
|
|
160
|
+
type: "string",
|
|
161
|
+
description: "Gender (free text; commonly 'male' / 'female' / 'non_binary'). Stored on person_enrichment satellite.",
|
|
162
|
+
},
|
|
163
|
+
nationality: {
|
|
164
|
+
type: "string",
|
|
165
|
+
description: "Nationality (free text; ISO country name preferred). Stored on person_enrichment satellite.",
|
|
166
|
+
},
|
|
167
|
+
birth_place: {
|
|
168
|
+
type: "string",
|
|
169
|
+
description: "Place of birth (free text). Stored on person_enrichment satellite.",
|
|
170
|
+
},
|
|
171
|
+
instruments: {
|
|
172
|
+
type: "array",
|
|
173
|
+
items: { type: "string" },
|
|
174
|
+
description: "Instruments played. Stored on person_enrichment satellite.",
|
|
175
|
+
},
|
|
176
|
+
career_start_year: {
|
|
177
|
+
type: "integer",
|
|
178
|
+
description: "Year career started (4-digit). Stored on person_enrichment satellite.",
|
|
179
|
+
},
|
|
180
|
+
};
|
|
181
|
+
export class PeopleTools {
|
|
182
|
+
pica;
|
|
183
|
+
constructor(pica) {
|
|
184
|
+
this.pica = pica;
|
|
185
|
+
}
|
|
186
|
+
/**
|
|
187
|
+
* Get all people tools
|
|
188
|
+
*/
|
|
189
|
+
getTools() {
|
|
190
|
+
return [
|
|
191
|
+
{
|
|
192
|
+
definition: {
|
|
193
|
+
name: "pica_people_query",
|
|
194
|
+
description: "Find people by name, role, or other criteria. " +
|
|
195
|
+
"→ then: pica_people_inspect (details for a specific person)",
|
|
196
|
+
workflows: "infrastructure",
|
|
197
|
+
inputSchema: {
|
|
198
|
+
type: "object",
|
|
199
|
+
properties: {
|
|
200
|
+
query: {
|
|
201
|
+
type: "string",
|
|
202
|
+
description: "Search by name, email, or IPI",
|
|
203
|
+
},
|
|
204
|
+
role: {
|
|
205
|
+
type: "string",
|
|
206
|
+
description: "Filter by role (e.g. artist, songwriter, producer)",
|
|
207
|
+
},
|
|
208
|
+
limit: {
|
|
209
|
+
type: "number",
|
|
210
|
+
description: "Max results (default: 50)",
|
|
211
|
+
},
|
|
212
|
+
offset: {
|
|
213
|
+
type: "number",
|
|
214
|
+
description: "Pagination offset",
|
|
215
|
+
},
|
|
216
|
+
},
|
|
217
|
+
},
|
|
218
|
+
},
|
|
219
|
+
executor: this.queryPeople.bind(this),
|
|
220
|
+
},
|
|
221
|
+
{
|
|
222
|
+
definition: {
|
|
223
|
+
name: "pica_people_inspect",
|
|
224
|
+
description: "Get details for a specific person. Omit sections for everything. " +
|
|
225
|
+
"→ then: pica_credits_update (add to work), pica_resolve_person (fill identifiers from ISNI/MusicBrainz)",
|
|
226
|
+
workflows: "infrastructure",
|
|
227
|
+
inputSchema: {
|
|
228
|
+
type: "object",
|
|
229
|
+
properties: {
|
|
230
|
+
id: {
|
|
231
|
+
type: "string",
|
|
232
|
+
description: "Person ID",
|
|
233
|
+
},
|
|
234
|
+
sections: {
|
|
235
|
+
type: "array",
|
|
236
|
+
items: {
|
|
237
|
+
type: "string",
|
|
238
|
+
enum: [
|
|
239
|
+
"basic",
|
|
240
|
+
"credits",
|
|
241
|
+
"recording_credits",
|
|
242
|
+
"agreements",
|
|
243
|
+
"identifiers",
|
|
244
|
+
"enrichment",
|
|
245
|
+
],
|
|
246
|
+
},
|
|
247
|
+
description: 'Which data sections to include. Omit for all sections. Use ["basic"] for lightweight lookup.',
|
|
248
|
+
},
|
|
249
|
+
},
|
|
250
|
+
required: ["id"],
|
|
251
|
+
},
|
|
252
|
+
},
|
|
253
|
+
executor: this.inspectPerson.bind(this),
|
|
254
|
+
},
|
|
255
|
+
{
|
|
256
|
+
definition: {
|
|
257
|
+
name: "pica_people_create",
|
|
258
|
+
description: "Create a new person record. IMPORTANT: always call pica_people_query first to check for an existing record — duplicate people break credits and notifications. " +
|
|
259
|
+
"External identifiers (isni, musicbrainz_id, wikidata_id, discogs_artist_id, deezer_artist_id) and biographical fields (date_of_birth, gender, nationality, birth_place, instruments, career_start_year) are stored on the person_enrichment satellite table — set them here and the service fans them out. " +
|
|
260
|
+
"Deprecated duplicates that will be rejected: `type` (use `person_type`), `role` (use `roles`). " +
|
|
261
|
+
"→ before: pica_people_query (check duplicates) → then: pica_resolve_person (fill identifiers from ISNI/MusicBrainz), pica_credits_update (add to work)",
|
|
262
|
+
workflows: ["person-required"],
|
|
263
|
+
inputSchema: {
|
|
264
|
+
type: "object",
|
|
265
|
+
properties: PEOPLE_WRITE_PROPERTIES,
|
|
266
|
+
required: ["first_name", "last_name"],
|
|
267
|
+
},
|
|
268
|
+
},
|
|
269
|
+
executor: withBillingGate(this.pica, "person creation", this.createPerson.bind(this)),
|
|
270
|
+
},
|
|
271
|
+
{
|
|
272
|
+
definition: {
|
|
273
|
+
name: "pica_people_update",
|
|
274
|
+
description: "Update an existing person record. Pass only the fields to change. " +
|
|
275
|
+
"External identifiers (isni, musicbrainz_id, wikidata_id, discogs_artist_id, deezer_artist_id) and biographical fields (date_of_birth, gender, nationality, birth_place, instruments, career_start_year) are stored on the person_enrichment satellite — updating them here fans out through the service. " +
|
|
276
|
+
"Deprecated duplicates that will be rejected: `type` (use `person_type`), `role` (use `roles`). " +
|
|
277
|
+
"If setting email, a 500 may mean the email already exists on another person record (check via pica_people_query). " +
|
|
278
|
+
"→ then: pica_people_inspect (verify changes persisted)",
|
|
279
|
+
workflows: ["person-required"],
|
|
280
|
+
inputSchema: {
|
|
281
|
+
type: "object",
|
|
282
|
+
properties: {
|
|
283
|
+
id: {
|
|
284
|
+
type: "string",
|
|
285
|
+
description: "Person ID (required)",
|
|
286
|
+
},
|
|
287
|
+
...PEOPLE_WRITE_PROPERTIES,
|
|
288
|
+
},
|
|
289
|
+
required: ["id"],
|
|
290
|
+
},
|
|
291
|
+
},
|
|
292
|
+
executor: withBillingGate(this.pica, "person update", this.updatePerson.bind(this)),
|
|
293
|
+
},
|
|
294
|
+
{
|
|
295
|
+
definition: {
|
|
296
|
+
name: "pica_people_delete",
|
|
297
|
+
description: "Delete a person record",
|
|
298
|
+
workflows: "infrastructure",
|
|
299
|
+
inputSchema: {
|
|
300
|
+
type: "object",
|
|
301
|
+
properties: {
|
|
302
|
+
id: {
|
|
303
|
+
type: "string",
|
|
304
|
+
description: "Person ID",
|
|
305
|
+
},
|
|
306
|
+
},
|
|
307
|
+
required: ["id"],
|
|
308
|
+
},
|
|
309
|
+
},
|
|
310
|
+
executor: withBillingGate(this.pica, "person deletion", this.deletePerson.bind(this)),
|
|
311
|
+
},
|
|
312
|
+
];
|
|
313
|
+
}
|
|
314
|
+
/**
|
|
315
|
+
* Query people — unified list + search
|
|
316
|
+
*/
|
|
317
|
+
async queryPeople(args) {
|
|
318
|
+
const limit = args.limit || 50;
|
|
319
|
+
const offset = args.offset || 0;
|
|
320
|
+
let items;
|
|
321
|
+
let total;
|
|
322
|
+
if (args.query) {
|
|
323
|
+
// Use server-side search when a query is provided
|
|
324
|
+
const result = await this.pica.people.search({
|
|
325
|
+
query: args.query,
|
|
326
|
+
limit,
|
|
327
|
+
offset,
|
|
328
|
+
});
|
|
329
|
+
items = result.data;
|
|
330
|
+
total = result.total;
|
|
331
|
+
}
|
|
332
|
+
else {
|
|
333
|
+
// Plain list
|
|
334
|
+
const people = await this.pica.people.list({ limit });
|
|
335
|
+
items = people;
|
|
336
|
+
total = people.length;
|
|
337
|
+
}
|
|
338
|
+
// Apply role filter client-side if provided
|
|
339
|
+
if (args.role) {
|
|
340
|
+
const roleLower = args.role.toLowerCase();
|
|
341
|
+
items = items.filter((person) => {
|
|
342
|
+
const roles = person.roles || [];
|
|
343
|
+
return roles.some((r) => r.toLowerCase() === roleLower);
|
|
344
|
+
});
|
|
345
|
+
total = items.length;
|
|
346
|
+
}
|
|
347
|
+
return formatStructuredList(items, "person", {
|
|
348
|
+
query: args.query,
|
|
349
|
+
total,
|
|
350
|
+
limit,
|
|
351
|
+
});
|
|
352
|
+
}
|
|
353
|
+
/**
|
|
354
|
+
* Inspect person — unified get + get_full with section filtering
|
|
355
|
+
*/
|
|
356
|
+
async inspectPerson(args) {
|
|
357
|
+
const sections = args.sections;
|
|
358
|
+
const allSections = !sections || sections.length === 0 || sections.length === 6; // all 6 sections requested
|
|
359
|
+
if (sections && sections.length === 1 && sections[0] === "basic") {
|
|
360
|
+
// Lightweight: just the basic person record
|
|
361
|
+
const person = await this.pica.people.get(args.id);
|
|
362
|
+
const base = { person };
|
|
363
|
+
// ADR-193 Surface 2 — basic-section view still knows email,
|
|
364
|
+
// but identifiers aren't fetched here so gap hints stay quiet
|
|
365
|
+
// on industry-id gaps until the caller pulls identifiers.
|
|
366
|
+
const gap_hints = computePersonGapHints(base);
|
|
367
|
+
const enriched = gap_hints.length > 0 ? { ...base, gap_hints } : base;
|
|
368
|
+
return formatSuccess("Person basic details", enriched);
|
|
369
|
+
}
|
|
370
|
+
// Full context call — returns person, creditedWorks, recordingCredits, agreements, identifiers
|
|
371
|
+
const fullResult = await this.pica.entityContext.getPersonFull(args.id);
|
|
372
|
+
const data = fullResult;
|
|
373
|
+
if (allSections) {
|
|
374
|
+
// Return everything
|
|
375
|
+
const person = data.person || {};
|
|
376
|
+
const fullName = person.name || args.id;
|
|
377
|
+
const workCount = data.creditedWorks?.length || 0;
|
|
378
|
+
const recordingCount = data.recordingCredits?.length || 0;
|
|
379
|
+
const identifiers = data.identifiers || [];
|
|
380
|
+
const idTypes = identifiers.map((i) => i.type);
|
|
381
|
+
// ADR-193 Surface 2 — compute over the full payload so identifier
|
|
382
|
+
// heuristics see what the entity-context call surfaced.
|
|
383
|
+
const gap_hints = computePersonGapHints(data);
|
|
384
|
+
const enriched = gap_hints.length > 0
|
|
385
|
+
? { ...fullResult, gap_hints }
|
|
386
|
+
: fullResult;
|
|
387
|
+
return formatSuccess(`"${fullName}" — credited on ${workCount} work${workCount !== 1 ? "s" : ""}, ` +
|
|
388
|
+
`${recordingCount} recording${recordingCount !== 1 ? "s" : ""}. ` +
|
|
389
|
+
`Identifiers: ${idTypes.length > 0 ? idTypes.join(", ") : "none"}.`, enriched);
|
|
390
|
+
}
|
|
391
|
+
// Build filtered response from full result
|
|
392
|
+
const result = {};
|
|
393
|
+
for (const section of sections) {
|
|
394
|
+
try {
|
|
395
|
+
switch (section) {
|
|
396
|
+
case "basic":
|
|
397
|
+
result.person = data.person;
|
|
398
|
+
break;
|
|
399
|
+
case "credits":
|
|
400
|
+
result.creditedWorks = data.creditedWorks || [];
|
|
401
|
+
break;
|
|
402
|
+
case "recording_credits":
|
|
403
|
+
result.recordingCredits = data.recordingCredits || [];
|
|
404
|
+
break;
|
|
405
|
+
case "agreements":
|
|
406
|
+
result.agreements = data.agreements || [];
|
|
407
|
+
break;
|
|
408
|
+
case "identifiers":
|
|
409
|
+
result.identifiers = data.identifiers || [];
|
|
410
|
+
break;
|
|
411
|
+
case "enrichment":
|
|
412
|
+
result.enrichment = data.enrichment || data.identifiers || [];
|
|
413
|
+
break;
|
|
414
|
+
}
|
|
415
|
+
}
|
|
416
|
+
catch {
|
|
417
|
+
// best-effort — the switch body is pure post-fetch property
|
|
418
|
+
// access on `data` (already resolved by getPersonFull above),
|
|
419
|
+
// so this catch fires only on unexpected runtime issues like
|
|
420
|
+
// a malformed payload. Not a section-fetch catch — ADR-224
|
|
421
|
+
// Rule 11 doesn't apply, and the lint recognises this marker.
|
|
422
|
+
result[section] = { error: `Failed to load ${section}` };
|
|
423
|
+
}
|
|
424
|
+
}
|
|
425
|
+
const person = data.person || {};
|
|
426
|
+
const fullName = person.name || args.id;
|
|
427
|
+
// ADR-193 Surface 2 — compute against the filtered result so hints
|
|
428
|
+
// only fire on sections the caller actually requested.
|
|
429
|
+
const gap_hints = computePersonGapHints(result);
|
|
430
|
+
const enriched = gap_hints.length > 0 ? { ...result, gap_hints } : result;
|
|
431
|
+
return formatSuccess(`"${fullName}" — sections: ${sections.join(", ")}`, enriched);
|
|
432
|
+
}
|
|
433
|
+
/**
|
|
434
|
+
* Create person
|
|
435
|
+
*/
|
|
436
|
+
async createPerson(args) {
|
|
437
|
+
// Default roles to ["collaborator"] if not provided — the service requires at least one role
|
|
438
|
+
if (!args.roles || !Array.isArray(args.roles) || args.roles.length === 0) {
|
|
439
|
+
args.roles = ["collaborator"];
|
|
440
|
+
}
|
|
441
|
+
const person = await this.pica.people.create(args);
|
|
442
|
+
const hints = [
|
|
443
|
+
{
|
|
444
|
+
gap: "person_not_credited",
|
|
445
|
+
suggestion: "Add this person as a credit on a work (pica_credits_update)",
|
|
446
|
+
severity: "important",
|
|
447
|
+
},
|
|
448
|
+
];
|
|
449
|
+
if (!person?.isni && !person?.musicbrainz_id) {
|
|
450
|
+
hints.push({
|
|
451
|
+
gap: "person_missing_identifiers",
|
|
452
|
+
suggestion: "Enrich with ISNI or MusicBrainz for royalty collection (pica_resolve_person)",
|
|
453
|
+
severity: "important",
|
|
454
|
+
});
|
|
455
|
+
}
|
|
456
|
+
if (person?.email) {
|
|
457
|
+
hints.push({
|
|
458
|
+
gap: "person_not_invited",
|
|
459
|
+
suggestion: `Invite ${person.first_name || "them"} to PICA so they can manage their own profile (pica_collaborators_invite)`,
|
|
460
|
+
severity: "nice_to_have",
|
|
461
|
+
});
|
|
462
|
+
}
|
|
463
|
+
return formatSuccess("Person created successfully", person, hints);
|
|
464
|
+
}
|
|
465
|
+
/**
|
|
466
|
+
* Update person
|
|
467
|
+
*/
|
|
468
|
+
async updatePerson(args) {
|
|
469
|
+
const { id, ...updates } = args;
|
|
470
|
+
const person = await this.pica.people.update(id, updates);
|
|
471
|
+
return formatSuccess("Person updated successfully", person);
|
|
472
|
+
}
|
|
473
|
+
/**
|
|
474
|
+
* Delete person
|
|
475
|
+
*/
|
|
476
|
+
async deletePerson(args) {
|
|
477
|
+
await this.pica.people.delete(args.id);
|
|
478
|
+
return formatSuccess(`Person ${args.id} deleted successfully`);
|
|
479
|
+
}
|
|
480
|
+
}
|
|
481
|
+
//# sourceMappingURL=people.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"people.js","sourceRoot":"","sources":["../../src/tools/people.ts"],"names":[],"mappings":"AAAA,6DAA6D;AAgB7D,OAAO,EAEL,aAAa,EACb,oBAAoB,EACpB,eAAe,GAEhB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,qBAAqB,EAAE,MAAM,gBAAgB,CAAC;AACvD,mEAAmE;AACnE,uEAAuE;AACvE,oEAAoE;AAEpE;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG;IACrC,mBAAmB;IACnB,UAAU,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,YAAY,EAAE;IACzD,SAAS,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,WAAW,EAAE;IACvD,WAAW,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,aAAa,EAAE;IAC3D,IAAI,EAAE;QACJ,IAAI,EAAE,QAAQ;QACd,WAAW,EACT,4HAA4H;KAC/H;IACD,UAAU,EAAE;QACV,IAAI,EAAE,QAAQ;QACd,WAAW,EAAE,+CAA+C;KAC7D;IACD,WAAW,EAAE;QACX,IAAI,EAAE,OAAO;QACb,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;QACzB,WAAW,EAAE,6CAA6C;KAC3D;IACD,WAAW,EAAE;QACX,IAAI,EAAE,OAAO;QACb,KAAK,EAAE,EAAE,IAAI,EAAE,QAA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C,CAAC;QACvC,OAAO,aAAa,CAAC,UAAU,IAAI,CAAC,EAAE,uBAAuB,CAAC,CAAC;IACjE,CAAC;CACF"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Projects Tools — group works into projects (albums, EPs, compilations, or any collection)
|
|
3
|
+
*/
|
|
4
|
+
import { PicaClient } from "@withpica/mcp-sdk";
|
|
5
|
+
import { ToolDefinition, ToolExecutor } from "./index.js";
|
|
6
|
+
export declare class ProjectsTools {
|
|
7
|
+
private pica;
|
|
8
|
+
constructor(pica: PicaClient);
|
|
9
|
+
getTools(): Array<{
|
|
10
|
+
definition: ToolDefinition;
|
|
11
|
+
executor: ToolExecutor;
|
|
12
|
+
}>;
|
|
13
|
+
private listProjects;
|
|
14
|
+
private getProject;
|
|
15
|
+
private createProject;
|
|
16
|
+
private updateProject;
|
|
17
|
+
private deleteProject;
|
|
18
|
+
private attachWorks;
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=projects.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"projects.d.ts","sourceRoot":"","sources":["../../src/tools/projects.ts"],"names":[],"mappings":"AAEA;;GAEG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,cAAc,EAAE,YAAY,EAAc,MAAM,YAAY,CAAC;AAGtE,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;YA6Q3D,YAAY;YAQZ,UAAU;YAKV,aAAa;YAMb,aAAa;YAMb,aAAa;YAKb,WAAW;CAyC1B"}
|