@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,579 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Agreement Types Tools — templates, producer agreements, and work-for-hire
|
|
3
|
+
*
|
|
4
|
+
* Groups three related agreement sub-types that extend the core agreements system:
|
|
5
|
+
* - Templates: reusable agreement blueprints that can be rendered with real data
|
|
6
|
+
* - Producer agreements: advance + points deals with recoupment tracking
|
|
7
|
+
* - Work-for-hire: flat-fee contracts where all rights are assigned
|
|
8
|
+
*/
|
|
9
|
+
import { formatAsText, formatList, formatSuccess, } from "../utils/formatting.js";
|
|
10
|
+
export class AgreementTypesTools {
|
|
11
|
+
pica;
|
|
12
|
+
constructor(pica) {
|
|
13
|
+
this.pica = pica;
|
|
14
|
+
}
|
|
15
|
+
getTools() {
|
|
16
|
+
return [
|
|
17
|
+
// ── Agreement Templates ──────────────────────────────────────────
|
|
18
|
+
{
|
|
19
|
+
definition: {
|
|
20
|
+
name: "pica_agreement_templates_list",
|
|
21
|
+
description: "List reusable agreement templates — publishing, split sheet, production deals. Returns all templates for the organisation.",
|
|
22
|
+
inputSchema: {
|
|
23
|
+
type: "object",
|
|
24
|
+
properties: {},
|
|
25
|
+
},
|
|
26
|
+
},
|
|
27
|
+
executor: this.listTemplates.bind(this),
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
definition: {
|
|
31
|
+
name: "pica_agreement_templates_get",
|
|
32
|
+
description: "Get a specific agreement template with its full body, placeholders, and metadata.",
|
|
33
|
+
inputSchema: {
|
|
34
|
+
type: "object",
|
|
35
|
+
properties: {
|
|
36
|
+
id: {
|
|
37
|
+
type: "string",
|
|
38
|
+
description: "Template ID",
|
|
39
|
+
},
|
|
40
|
+
},
|
|
41
|
+
required: ["id"],
|
|
42
|
+
},
|
|
43
|
+
},
|
|
44
|
+
executor: this.getTemplate.bind(this),
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
definition: {
|
|
48
|
+
name: "pica_agreement_templates_create",
|
|
49
|
+
description: "Create a new agreement template. Define the template body with placeholders like {{work_title}}, {{artist_name}}, {{split_percentage}} that get filled when rendering.",
|
|
50
|
+
inputSchema: {
|
|
51
|
+
type: "object",
|
|
52
|
+
properties: {
|
|
53
|
+
name: {
|
|
54
|
+
type: "string",
|
|
55
|
+
description: "Template name (e.g. 'Standard Publishing Deal')",
|
|
56
|
+
},
|
|
57
|
+
template_type: {
|
|
58
|
+
type: "string",
|
|
59
|
+
description: "Type of agreement this template produces (e.g. publishing_admin, production, split_sheet)",
|
|
60
|
+
},
|
|
61
|
+
body: {
|
|
62
|
+
type: "string",
|
|
63
|
+
description: "Template body with placeholders — use {{placeholder_name}} syntax",
|
|
64
|
+
},
|
|
65
|
+
description: {
|
|
66
|
+
type: "string",
|
|
67
|
+
description: "Short description of when to use this template",
|
|
68
|
+
},
|
|
69
|
+
is_default: {
|
|
70
|
+
type: "boolean",
|
|
71
|
+
description: "Whether this is the default template for its type",
|
|
72
|
+
},
|
|
73
|
+
},
|
|
74
|
+
required: ["name", "template_type", "body"],
|
|
75
|
+
},
|
|
76
|
+
},
|
|
77
|
+
executor: this.createTemplate.bind(this),
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
definition: {
|
|
81
|
+
name: "pica_agreement_templates_update",
|
|
82
|
+
description: "Update an existing agreement template.",
|
|
83
|
+
inputSchema: {
|
|
84
|
+
type: "object",
|
|
85
|
+
properties: {
|
|
86
|
+
id: {
|
|
87
|
+
type: "string",
|
|
88
|
+
description: "Template ID",
|
|
89
|
+
},
|
|
90
|
+
name: {
|
|
91
|
+
type: "string",
|
|
92
|
+
description: "Updated template name",
|
|
93
|
+
},
|
|
94
|
+
template_type: {
|
|
95
|
+
type: "string",
|
|
96
|
+
description: "Updated template type",
|
|
97
|
+
},
|
|
98
|
+
body: {
|
|
99
|
+
type: "string",
|
|
100
|
+
description: "Updated template body",
|
|
101
|
+
},
|
|
102
|
+
description: {
|
|
103
|
+
type: "string",
|
|
104
|
+
description: "Updated description",
|
|
105
|
+
},
|
|
106
|
+
is_default: {
|
|
107
|
+
type: "boolean",
|
|
108
|
+
description: "Set as default for its type",
|
|
109
|
+
},
|
|
110
|
+
},
|
|
111
|
+
required: ["id"],
|
|
112
|
+
},
|
|
113
|
+
},
|
|
114
|
+
executor: this.updateTemplate.bind(this),
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
definition: {
|
|
118
|
+
name: "pica_agreement_templates_delete",
|
|
119
|
+
description: "Delete an agreement template.",
|
|
120
|
+
inputSchema: {
|
|
121
|
+
type: "object",
|
|
122
|
+
properties: {
|
|
123
|
+
id: {
|
|
124
|
+
type: "string",
|
|
125
|
+
description: "Template ID",
|
|
126
|
+
},
|
|
127
|
+
},
|
|
128
|
+
required: ["id"],
|
|
129
|
+
},
|
|
130
|
+
},
|
|
131
|
+
executor: this.deleteTemplate.bind(this),
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
definition: {
|
|
135
|
+
name: "pica_agreement_templates_render",
|
|
136
|
+
description: "Fill an agreement template with work and people data — generates a ready-to-send agreement. Pass the template ID plus work_id and/or people_ids to populate the placeholders with real catalog data.",
|
|
137
|
+
inputSchema: {
|
|
138
|
+
type: "object",
|
|
139
|
+
properties: {
|
|
140
|
+
id: {
|
|
141
|
+
type: "string",
|
|
142
|
+
description: "Template ID to render",
|
|
143
|
+
},
|
|
144
|
+
work_id: {
|
|
145
|
+
type: "string",
|
|
146
|
+
description: "Work ID to pull title, credits, and metadata from",
|
|
147
|
+
},
|
|
148
|
+
people_ids: {
|
|
149
|
+
type: "array",
|
|
150
|
+
items: { type: "string" },
|
|
151
|
+
description: "People IDs to include as parties in the agreement",
|
|
152
|
+
},
|
|
153
|
+
variables: {
|
|
154
|
+
type: "object",
|
|
155
|
+
description: "Additional variables to substitute — keys match placeholder names in the template body",
|
|
156
|
+
},
|
|
157
|
+
},
|
|
158
|
+
required: ["id"],
|
|
159
|
+
},
|
|
160
|
+
},
|
|
161
|
+
executor: this.renderTemplate.bind(this),
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
definition: {
|
|
165
|
+
name: "pica_agreement_templates_duplicate",
|
|
166
|
+
description: "Duplicate an agreement template — creates a copy you can customise without changing the original.",
|
|
167
|
+
inputSchema: {
|
|
168
|
+
type: "object",
|
|
169
|
+
properties: {
|
|
170
|
+
id: {
|
|
171
|
+
type: "string",
|
|
172
|
+
description: "Template ID to duplicate",
|
|
173
|
+
},
|
|
174
|
+
},
|
|
175
|
+
required: ["id"],
|
|
176
|
+
},
|
|
177
|
+
},
|
|
178
|
+
executor: this.duplicateTemplate.bind(this),
|
|
179
|
+
},
|
|
180
|
+
{
|
|
181
|
+
definition: {
|
|
182
|
+
name: "pica_agreement_templates_set_default",
|
|
183
|
+
description: "Set a template as the default for its type — when creating agreements of that type, this template will be suggested first.",
|
|
184
|
+
inputSchema: {
|
|
185
|
+
type: "object",
|
|
186
|
+
properties: {
|
|
187
|
+
id: {
|
|
188
|
+
type: "string",
|
|
189
|
+
description: "Template ID to set as default",
|
|
190
|
+
},
|
|
191
|
+
},
|
|
192
|
+
required: ["id"],
|
|
193
|
+
},
|
|
194
|
+
},
|
|
195
|
+
executor: this.setDefaultTemplate.bind(this),
|
|
196
|
+
},
|
|
197
|
+
// ── Producer Agreements ──────────────────────────────────────────
|
|
198
|
+
{
|
|
199
|
+
definition: {
|
|
200
|
+
name: "pica_producer_agreements_list",
|
|
201
|
+
description: "List producer agreements — advance + points deals with recoupment tracking. Shows all producer deals for the catalogue.",
|
|
202
|
+
inputSchema: {
|
|
203
|
+
type: "object",
|
|
204
|
+
properties: {},
|
|
205
|
+
},
|
|
206
|
+
},
|
|
207
|
+
executor: this.listProducerAgreements.bind(this),
|
|
208
|
+
},
|
|
209
|
+
{
|
|
210
|
+
definition: {
|
|
211
|
+
name: "pica_producer_agreements_get",
|
|
212
|
+
description: "Get a producer agreement with full details including advance amount, points percentage, and recoupment status.",
|
|
213
|
+
inputSchema: {
|
|
214
|
+
type: "object",
|
|
215
|
+
properties: {
|
|
216
|
+
id: {
|
|
217
|
+
type: "string",
|
|
218
|
+
description: "Producer agreement ID",
|
|
219
|
+
},
|
|
220
|
+
},
|
|
221
|
+
required: ["id"],
|
|
222
|
+
},
|
|
223
|
+
},
|
|
224
|
+
executor: this.getProducerAgreement.bind(this),
|
|
225
|
+
},
|
|
226
|
+
{
|
|
227
|
+
definition: {
|
|
228
|
+
name: "pica_producer_agreements_create",
|
|
229
|
+
description: "Create a producer agreement — set advance, points percentage, and recoupment terms. Links a producer to a work or recording with specific commercial terms.",
|
|
230
|
+
inputSchema: {
|
|
231
|
+
type: "object",
|
|
232
|
+
properties: {
|
|
233
|
+
title: {
|
|
234
|
+
type: "string",
|
|
235
|
+
description: "Agreement title",
|
|
236
|
+
},
|
|
237
|
+
producer_id: {
|
|
238
|
+
type: "string",
|
|
239
|
+
description: "Person ID of the producer",
|
|
240
|
+
},
|
|
241
|
+
work_id: {
|
|
242
|
+
type: "string",
|
|
243
|
+
description: "Work this agreement covers",
|
|
244
|
+
},
|
|
245
|
+
recording_id: {
|
|
246
|
+
type: "string",
|
|
247
|
+
description: "Recording this agreement covers (if specific)",
|
|
248
|
+
},
|
|
249
|
+
advance_amount: {
|
|
250
|
+
type: "number",
|
|
251
|
+
description: "Advance amount in the agreement currency",
|
|
252
|
+
},
|
|
253
|
+
advance_currency: {
|
|
254
|
+
type: "string",
|
|
255
|
+
description: "Currency code (e.g. GBP, USD, EUR)",
|
|
256
|
+
},
|
|
257
|
+
points_percentage: {
|
|
258
|
+
type: "number",
|
|
259
|
+
description: "Producer points as a percentage of revenue (e.g. 3.5 for 3.5%)",
|
|
260
|
+
},
|
|
261
|
+
recoupment_terms: {
|
|
262
|
+
type: "string",
|
|
263
|
+
description: "Description of recoupment terms (e.g. 'Advance recouped from producer share before royalty payments begin')",
|
|
264
|
+
},
|
|
265
|
+
status: {
|
|
266
|
+
type: "string",
|
|
267
|
+
description: "Agreement status",
|
|
268
|
+
enum: ["draft", "active", "completed", "terminated"],
|
|
269
|
+
},
|
|
270
|
+
notes: {
|
|
271
|
+
type: "string",
|
|
272
|
+
description: "Internal notes",
|
|
273
|
+
},
|
|
274
|
+
},
|
|
275
|
+
required: ["title"],
|
|
276
|
+
},
|
|
277
|
+
},
|
|
278
|
+
executor: this.createProducerAgreement.bind(this),
|
|
279
|
+
},
|
|
280
|
+
{
|
|
281
|
+
definition: {
|
|
282
|
+
name: "pica_producer_agreements_update",
|
|
283
|
+
description: "Update a producer agreement — change advance, points, recoupment terms, or status.",
|
|
284
|
+
inputSchema: {
|
|
285
|
+
type: "object",
|
|
286
|
+
properties: {
|
|
287
|
+
id: {
|
|
288
|
+
type: "string",
|
|
289
|
+
description: "Producer agreement ID",
|
|
290
|
+
},
|
|
291
|
+
title: {
|
|
292
|
+
type: "string",
|
|
293
|
+
description: "Updated title",
|
|
294
|
+
},
|
|
295
|
+
producer_id: {
|
|
296
|
+
type: "string",
|
|
297
|
+
description: "Updated producer person ID",
|
|
298
|
+
},
|
|
299
|
+
work_id: {
|
|
300
|
+
type: "string",
|
|
301
|
+
description: "Updated work ID",
|
|
302
|
+
},
|
|
303
|
+
recording_id: {
|
|
304
|
+
type: "string",
|
|
305
|
+
description: "Updated recording ID",
|
|
306
|
+
},
|
|
307
|
+
advance_amount: {
|
|
308
|
+
type: "number",
|
|
309
|
+
description: "Updated advance amount",
|
|
310
|
+
},
|
|
311
|
+
advance_currency: {
|
|
312
|
+
type: "string",
|
|
313
|
+
description: "Updated currency code",
|
|
314
|
+
},
|
|
315
|
+
points_percentage: {
|
|
316
|
+
type: "number",
|
|
317
|
+
description: "Updated points percentage",
|
|
318
|
+
},
|
|
319
|
+
recoupment_terms: {
|
|
320
|
+
type: "string",
|
|
321
|
+
description: "Updated recoupment terms",
|
|
322
|
+
},
|
|
323
|
+
status: {
|
|
324
|
+
type: "string",
|
|
325
|
+
description: "Updated status",
|
|
326
|
+
enum: ["draft", "active", "completed", "terminated"],
|
|
327
|
+
},
|
|
328
|
+
notes: {
|
|
329
|
+
type: "string",
|
|
330
|
+
description: "Updated notes",
|
|
331
|
+
},
|
|
332
|
+
},
|
|
333
|
+
required: ["id"],
|
|
334
|
+
},
|
|
335
|
+
},
|
|
336
|
+
executor: this.updateProducerAgreement.bind(this),
|
|
337
|
+
},
|
|
338
|
+
{
|
|
339
|
+
definition: {
|
|
340
|
+
name: "pica_producer_agreements_delete",
|
|
341
|
+
description: "Delete a producer agreement.",
|
|
342
|
+
inputSchema: {
|
|
343
|
+
type: "object",
|
|
344
|
+
properties: {
|
|
345
|
+
id: {
|
|
346
|
+
type: "string",
|
|
347
|
+
description: "Producer agreement ID",
|
|
348
|
+
},
|
|
349
|
+
},
|
|
350
|
+
required: ["id"],
|
|
351
|
+
},
|
|
352
|
+
},
|
|
353
|
+
executor: this.deleteProducerAgreement.bind(this),
|
|
354
|
+
},
|
|
355
|
+
// ── Work-for-Hire ────────────────────────────────────────────────
|
|
356
|
+
{
|
|
357
|
+
definition: {
|
|
358
|
+
name: "pica_work_for_hire_list",
|
|
359
|
+
description: "List work-for-hire agreements — flat-fee contracts where all rights are assigned to the commissioning party.",
|
|
360
|
+
inputSchema: {
|
|
361
|
+
type: "object",
|
|
362
|
+
properties: {},
|
|
363
|
+
},
|
|
364
|
+
},
|
|
365
|
+
executor: this.listWorkForHire.bind(this),
|
|
366
|
+
},
|
|
367
|
+
{
|
|
368
|
+
definition: {
|
|
369
|
+
name: "pica_work_for_hire_get",
|
|
370
|
+
description: "Get a work-for-hire agreement with full details — fee, contractor, rights assignment, and linked works.",
|
|
371
|
+
inputSchema: {
|
|
372
|
+
type: "object",
|
|
373
|
+
properties: {
|
|
374
|
+
id: {
|
|
375
|
+
type: "string",
|
|
376
|
+
description: "Work-for-hire agreement ID",
|
|
377
|
+
},
|
|
378
|
+
},
|
|
379
|
+
required: ["id"],
|
|
380
|
+
},
|
|
381
|
+
},
|
|
382
|
+
executor: this.getWorkForHire.bind(this),
|
|
383
|
+
},
|
|
384
|
+
{
|
|
385
|
+
definition: {
|
|
386
|
+
name: "pica_work_for_hire_create",
|
|
387
|
+
description: "Create a work-for-hire agreement — flat fee, contractor assigns all rights. Used when commissioning music where the creator doesn't retain ownership.",
|
|
388
|
+
inputSchema: {
|
|
389
|
+
type: "object",
|
|
390
|
+
properties: {
|
|
391
|
+
title: {
|
|
392
|
+
type: "string",
|
|
393
|
+
description: "Agreement title",
|
|
394
|
+
},
|
|
395
|
+
contractor_id: {
|
|
396
|
+
type: "string",
|
|
397
|
+
description: "Person ID of the contractor (the one doing the work)",
|
|
398
|
+
},
|
|
399
|
+
work_id: {
|
|
400
|
+
type: "string",
|
|
401
|
+
description: "Work being created under this agreement",
|
|
402
|
+
},
|
|
403
|
+
fee_amount: {
|
|
404
|
+
type: "number",
|
|
405
|
+
description: "Flat fee amount",
|
|
406
|
+
},
|
|
407
|
+
fee_currency: {
|
|
408
|
+
type: "string",
|
|
409
|
+
description: "Currency code (e.g. GBP, USD, EUR)",
|
|
410
|
+
},
|
|
411
|
+
rights_assigned: {
|
|
412
|
+
type: "string",
|
|
413
|
+
description: "Description of rights being assigned (e.g. 'All publishing and master rights')",
|
|
414
|
+
},
|
|
415
|
+
status: {
|
|
416
|
+
type: "string",
|
|
417
|
+
description: "Agreement status",
|
|
418
|
+
enum: ["draft", "active", "completed", "terminated"],
|
|
419
|
+
},
|
|
420
|
+
notes: {
|
|
421
|
+
type: "string",
|
|
422
|
+
description: "Internal notes",
|
|
423
|
+
},
|
|
424
|
+
},
|
|
425
|
+
required: ["title"],
|
|
426
|
+
},
|
|
427
|
+
},
|
|
428
|
+
executor: this.createWorkForHire.bind(this),
|
|
429
|
+
},
|
|
430
|
+
{
|
|
431
|
+
definition: {
|
|
432
|
+
name: "pica_work_for_hire_update",
|
|
433
|
+
description: "Update a work-for-hire agreement — change fee, contractor, rights, or status.",
|
|
434
|
+
inputSchema: {
|
|
435
|
+
type: "object",
|
|
436
|
+
properties: {
|
|
437
|
+
id: {
|
|
438
|
+
type: "string",
|
|
439
|
+
description: "Work-for-hire agreement ID",
|
|
440
|
+
},
|
|
441
|
+
title: {
|
|
442
|
+
type: "string",
|
|
443
|
+
description: "Updated title",
|
|
444
|
+
},
|
|
445
|
+
contractor_id: {
|
|
446
|
+
type: "string",
|
|
447
|
+
description: "Updated contractor person ID",
|
|
448
|
+
},
|
|
449
|
+
work_id: {
|
|
450
|
+
type: "string",
|
|
451
|
+
description: "Updated work ID",
|
|
452
|
+
},
|
|
453
|
+
fee_amount: {
|
|
454
|
+
type: "number",
|
|
455
|
+
description: "Updated fee amount",
|
|
456
|
+
},
|
|
457
|
+
fee_currency: {
|
|
458
|
+
type: "string",
|
|
459
|
+
description: "Updated currency code",
|
|
460
|
+
},
|
|
461
|
+
rights_assigned: {
|
|
462
|
+
type: "string",
|
|
463
|
+
description: "Updated rights description",
|
|
464
|
+
},
|
|
465
|
+
status: {
|
|
466
|
+
type: "string",
|
|
467
|
+
description: "Updated status",
|
|
468
|
+
enum: ["draft", "active", "completed", "terminated"],
|
|
469
|
+
},
|
|
470
|
+
notes: {
|
|
471
|
+
type: "string",
|
|
472
|
+
description: "Updated notes",
|
|
473
|
+
},
|
|
474
|
+
},
|
|
475
|
+
required: ["id"],
|
|
476
|
+
},
|
|
477
|
+
},
|
|
478
|
+
executor: this.updateWorkForHire.bind(this),
|
|
479
|
+
},
|
|
480
|
+
{
|
|
481
|
+
definition: {
|
|
482
|
+
name: "pica_work_for_hire_delete",
|
|
483
|
+
description: "Delete a work-for-hire agreement.",
|
|
484
|
+
inputSchema: {
|
|
485
|
+
type: "object",
|
|
486
|
+
properties: {
|
|
487
|
+
id: {
|
|
488
|
+
type: "string",
|
|
489
|
+
description: "Work-for-hire agreement ID",
|
|
490
|
+
},
|
|
491
|
+
},
|
|
492
|
+
required: ["id"],
|
|
493
|
+
},
|
|
494
|
+
},
|
|
495
|
+
executor: this.deleteWorkForHire.bind(this),
|
|
496
|
+
},
|
|
497
|
+
];
|
|
498
|
+
}
|
|
499
|
+
// ── Template executors ─────────────────────────────────────────────
|
|
500
|
+
async listTemplates() {
|
|
501
|
+
const templates = await this.pica.agreementTemplates.list();
|
|
502
|
+
return formatList(templates, { total: templates.length });
|
|
503
|
+
}
|
|
504
|
+
async getTemplate(args) {
|
|
505
|
+
const template = await this.pica.agreementTemplates.get(args.id);
|
|
506
|
+
return formatAsText(template);
|
|
507
|
+
}
|
|
508
|
+
async createTemplate(args) {
|
|
509
|
+
const template = await this.pica.agreementTemplates.create(args);
|
|
510
|
+
return formatSuccess("Agreement template created", template);
|
|
511
|
+
}
|
|
512
|
+
async updateTemplate(args) {
|
|
513
|
+
const { id, ...updates } = args;
|
|
514
|
+
const template = await this.pica.agreementTemplates.update(id, updates);
|
|
515
|
+
return formatSuccess("Agreement template updated", template);
|
|
516
|
+
}
|
|
517
|
+
async deleteTemplate(args) {
|
|
518
|
+
await this.pica.agreementTemplates.delete(args.id);
|
|
519
|
+
return formatSuccess(`Agreement template ${args.id} deleted`);
|
|
520
|
+
}
|
|
521
|
+
async renderTemplate(args) {
|
|
522
|
+
const { id, ...renderData } = args;
|
|
523
|
+
const rendered = await this.pica.agreementTemplates.render(id, renderData);
|
|
524
|
+
return formatSuccess("Template rendered with catalog data", rendered);
|
|
525
|
+
}
|
|
526
|
+
async duplicateTemplate(args) {
|
|
527
|
+
const duplicate = await this.pica.agreementTemplates.duplicate(args.id);
|
|
528
|
+
return formatSuccess("Template duplicated", duplicate);
|
|
529
|
+
}
|
|
530
|
+
async setDefaultTemplate(args) {
|
|
531
|
+
const result = await this.pica.agreementTemplates.setDefault(args.id);
|
|
532
|
+
return formatSuccess("Template set as default for its type", result);
|
|
533
|
+
}
|
|
534
|
+
// ── Producer agreement executors ───────────────────────────────────
|
|
535
|
+
async listProducerAgreements() {
|
|
536
|
+
const agreements = await this.pica.producerAgreements.list();
|
|
537
|
+
return formatList(agreements, { total: agreements.length });
|
|
538
|
+
}
|
|
539
|
+
async getProducerAgreement(args) {
|
|
540
|
+
const agreement = await this.pica.producerAgreements.get(args.id);
|
|
541
|
+
return formatAsText(agreement);
|
|
542
|
+
}
|
|
543
|
+
async createProducerAgreement(args) {
|
|
544
|
+
const agreement = await this.pica.producerAgreements.create(args);
|
|
545
|
+
return formatSuccess("Producer agreement created", agreement);
|
|
546
|
+
}
|
|
547
|
+
async updateProducerAgreement(args) {
|
|
548
|
+
const { id, ...updates } = args;
|
|
549
|
+
const agreement = await this.pica.producerAgreements.update(id, updates);
|
|
550
|
+
return formatSuccess("Producer agreement updated", agreement);
|
|
551
|
+
}
|
|
552
|
+
async deleteProducerAgreement(args) {
|
|
553
|
+
await this.pica.producerAgreements.delete(args.id);
|
|
554
|
+
return formatSuccess(`Producer agreement ${args.id} deleted`);
|
|
555
|
+
}
|
|
556
|
+
// ── Work-for-hire executors ────────────────────────────────────────
|
|
557
|
+
async listWorkForHire() {
|
|
558
|
+
const agreements = await this.pica.workForHire.list();
|
|
559
|
+
return formatList(agreements, { total: agreements.length });
|
|
560
|
+
}
|
|
561
|
+
async getWorkForHire(args) {
|
|
562
|
+
const agreement = await this.pica.workForHire.get(args.id);
|
|
563
|
+
return formatAsText(agreement);
|
|
564
|
+
}
|
|
565
|
+
async createWorkForHire(args) {
|
|
566
|
+
const agreement = await this.pica.workForHire.create(args);
|
|
567
|
+
return formatSuccess("Work-for-hire agreement created", agreement);
|
|
568
|
+
}
|
|
569
|
+
async updateWorkForHire(args) {
|
|
570
|
+
const { id, ...updates } = args;
|
|
571
|
+
const agreement = await this.pica.workForHire.update(id, updates);
|
|
572
|
+
return formatSuccess("Work-for-hire agreement updated", agreement);
|
|
573
|
+
}
|
|
574
|
+
async deleteWorkForHire(args) {
|
|
575
|
+
await this.pica.workForHire.delete(args.id);
|
|
576
|
+
return formatSuccess(`Work-for-hire agreement ${args.id} deleted`);
|
|
577
|
+
}
|
|
578
|
+
}
|
|
579
|
+
//# sourceMappingURL=agreement-types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agreement-types.js","sourceRoot":"","sources":["../../src/tools/agreement-types.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAIH,OAAO,EACL,YAAY,EACZ,UAAU,EACV,aAAa,GACd,MAAM,wBAA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CAAC,iBAAiB,CAC7B,IAAyB;QAEzB,MAAM,SAAS,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;QAC3D,OAAO,aAAa,CAAC,iCAAiC,EAAE,SAAS,CAAC,CAAC;IACrE,CAAC;IAEO,KAAK,CAAC,iBAAiB,CAC7B,IAAyB;QAEzB,MAAM,EAAE,EAAE,EAAE,GAAG,OAAO,EAAE,GAAG,IAAI,CAAC;QAChC,MAAM,SAAS,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,EAAE,EAAE,OAAO,CAAC,CAAC;QAClE,OAAO,aAAa,CAAC,iCAAiC,EAAE,SAAS,CAAC,CAAC;IACrE,CAAC;IAEO,KAAK,CAAC,iBAAiB,CAC7B,IAAyB;QAEzB,MAAM,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QAC5C,OAAO,aAAa,CAAC,2BAA2B,IAAI,CAAC,EAAE,UAAU,CAAC,CAAC;IACrE,CAAC;CACF"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Agreements Tools - MCP tools for managing agreements and contracts
|
|
3
|
+
*/
|
|
4
|
+
import { PicaClient } from "../pica-sdk.js";
|
|
5
|
+
import { ToolDefinition, ToolExecutor } from "./index.js";
|
|
6
|
+
export declare class AgreementsTools {
|
|
7
|
+
private pica;
|
|
8
|
+
constructor(pica: PicaClient);
|
|
9
|
+
getTools(): Array<{
|
|
10
|
+
definition: ToolDefinition;
|
|
11
|
+
executor: ToolExecutor;
|
|
12
|
+
}>;
|
|
13
|
+
private listAgreements;
|
|
14
|
+
private getAgreement;
|
|
15
|
+
private createAgreement;
|
|
16
|
+
private updateAgreement;
|
|
17
|
+
private deleteAgreement;
|
|
18
|
+
private linkWork;
|
|
19
|
+
private getAgreementWorks;
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=agreements.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agreements.d.ts","sourceRoot":"","sources":["../../src/tools/agreements.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EAAE,cAAc,EAAE,YAAY,EAAc,MAAM,YAAY,CAAC;AAOtE,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;YA4R3D,cAAc;YAad,YAAY;YAKZ,eAAe;YAOf,eAAe;YAQf,eAAe;YAOf,QAAQ;YASR,iBAAiB;CAMhC"}
|