@lovelybunch/mcp 1.0.72 → 1.0.74
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/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/proposals-tool.d.ts +5 -0
- package/dist/proposals-tool.d.ts.map +1 -1
- package/dist/proposals-tool.js +56 -179
- package/dist/proposals-tool.js.map +1 -1
- package/package.json +3 -2
- package/src/index.ts +1 -1
- package/src/proposals-tool.ts +58 -179
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { proposalsTool, proposalsReadOnlyTool, listProposalsTool, validateProposalData, createToolCall } from './proposals-tool.js';
|
|
1
|
+
export { proposalsTool, proposalsReadOnlyTool, proposalsFullTool, listProposalsTool, validateProposalData, createToolCall } from './proposals-tool.js';
|
|
2
2
|
export { eventsTool } from './events-tool.js';
|
|
3
3
|
export { projectContextTool } from './project-context-tool.js';
|
|
4
4
|
export { architectureContextTool } from './architecture-context-tool.js';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,qBAAqB,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,qBAAqB,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAA;AACtJ,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAC7C,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAA;AAC9D,OAAO,EAAE,uBAAuB,EAAE,MAAM,gCAAgC,CAAA;AACxE,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAA;AACxD,OAAO,EACL,aAAa,EACb,uBAAuB,EACvB,0BAA0B,EAC1B,2BAA2B,EAC5B,MAAM,qBAAqB,CAAA;AAC5B,YAAY,EACV,sBAAsB,EACtB,mBAAmB,EACnB,iBAAiB,EACjB,yBAAyB,EAC1B,MAAM,qBAAqB,CAAA;AAC5B,YAAY,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAA"}
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { proposalsTool, proposalsReadOnlyTool, listProposalsTool, validateProposalData, createToolCall } from './proposals-tool.js';
|
|
1
|
+
export { proposalsTool, proposalsReadOnlyTool, proposalsFullTool, listProposalsTool, validateProposalData, createToolCall } from './proposals-tool.js';
|
|
2
2
|
export { eventsTool } from './events-tool.js';
|
|
3
3
|
export { projectContextTool } from './project-context-tool.js';
|
|
4
4
|
export { architectureContextTool } from './architecture-context-tool.js';
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,qBAAqB,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAA;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,qBAAqB,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAA;AACtJ,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAC7C,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAA;AAC9D,OAAO,EAAE,uBAAuB,EAAE,MAAM,gCAAgC,CAAA;AACxE,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAA;AACxD,OAAO,EACL,aAAa,EACb,uBAAuB,EACvB,0BAA0B,EAC1B,2BAA2B,EAC5B,MAAM,qBAAqB,CAAA"}
|
package/dist/proposals-tool.d.ts
CHANGED
|
@@ -21,6 +21,11 @@ export declare const proposalsTool: MCPTool;
|
|
|
21
21
|
* Creating proposals should be done by coding agents (Claude Code, Cursor, etc.) or via the UI.
|
|
22
22
|
*/
|
|
23
23
|
export declare const proposalsReadOnlyTool: MCPTool;
|
|
24
|
+
/**
|
|
25
|
+
* Full CRUD proposals tool that includes create and update operations.
|
|
26
|
+
* Uses Zod schemas for validation.
|
|
27
|
+
*/
|
|
28
|
+
export declare const proposalsFullTool: MCPTool;
|
|
24
29
|
export declare function validateProposalData(data: any): Partial<ChangeProposal>;
|
|
25
30
|
export declare function createToolCall(operation: string, args: any): MCPToolCall;
|
|
26
31
|
//# sourceMappingURL=proposals-tool.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"proposals-tool.d.ts","sourceRoot":"","sources":["../src/proposals-tool.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAA;
|
|
1
|
+
{"version":3,"file":"proposals-tool.d.ts","sourceRoot":"","sources":["../src/proposals-tool.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAA;AAGxD,MAAM,WAAW,OAAO;IACtB,IAAI,EAAE,MAAM,CAAA;IACZ,WAAW,EAAE,MAAM,CAAA;IACnB,UAAU,EAAE;QACV,IAAI,EAAE,QAAQ,CAAA;QACd,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;QAC/B,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAA;QACnB,oBAAoB,CAAC,EAAE,OAAO,CAAA;KAC/B,CAAA;CACF;AAED,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAA;IACZ,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;CAC/B;AAQD,eAAO,MAAM,iBAAiB,EAAE,OAa/B,CAAA;AAED,eAAO,MAAM,aAAa,EAAE,OA+B3B,CAAA;AAED;;;;GAIG;AACH,eAAO,MAAM,qBAAqB,EAAE,OAwBnC,CAAA;AAED;;;GAGG;AACH,eAAO,MAAM,iBAAiB,EAAE,OAoC/B,CAAA;AAED,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,GAAG,GAAG,OAAO,CAAC,cAAc,CAAC,CAkBvE;AAED,wBAAgB,cAAc,CAAC,SAAS,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,GAAG,WAAW,CAQxE"}
|
package/dist/proposals-tool.js
CHANGED
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
import { proposalJsonSchemas } from '@lovelybunch/core';
|
|
2
|
+
// Use pre-computed JSON schemas from core
|
|
3
|
+
const filtersProperties = proposalJsonSchemas.filters;
|
|
4
|
+
const createProperties = proposalJsonSchemas.create;
|
|
5
|
+
const updateProperties = proposalJsonSchemas.update;
|
|
6
|
+
const createRequired = proposalJsonSchemas.createRequired;
|
|
1
7
|
export const listProposalsTool = {
|
|
2
8
|
name: "list_proposals",
|
|
3
9
|
description: "List all change proposals with metadata only (title, ID, status, priority, tags)",
|
|
@@ -7,27 +13,7 @@ export const listProposalsTool = {
|
|
|
7
13
|
filters: {
|
|
8
14
|
type: "object",
|
|
9
15
|
description: "Optional filters for the proposal list",
|
|
10
|
-
properties:
|
|
11
|
-
status: {
|
|
12
|
-
type: "string",
|
|
13
|
-
enum: ["draft", "proposed", "in-review", "code-complete", "approved", "merged", "rejected"],
|
|
14
|
-
description: "Filter by proposal status"
|
|
15
|
-
},
|
|
16
|
-
priority: {
|
|
17
|
-
type: "string",
|
|
18
|
-
enum: ["low", "medium", "high", "critical"],
|
|
19
|
-
description: "Filter by priority level"
|
|
20
|
-
},
|
|
21
|
-
tags: {
|
|
22
|
-
type: "array",
|
|
23
|
-
items: { type: "string" },
|
|
24
|
-
description: "Filter by tags"
|
|
25
|
-
},
|
|
26
|
-
search: {
|
|
27
|
-
type: "string",
|
|
28
|
-
description: "Search query for proposal content"
|
|
29
|
-
}
|
|
30
|
-
}
|
|
16
|
+
properties: filtersProperties
|
|
31
17
|
}
|
|
32
18
|
}
|
|
33
19
|
}
|
|
@@ -47,145 +33,18 @@ export const proposalsTool = {
|
|
|
47
33
|
type: "string",
|
|
48
34
|
description: "Proposal ID (required for get, update, delete operations)"
|
|
49
35
|
},
|
|
36
|
+
// Filters for list operation - auto-generated from Zod schema
|
|
50
37
|
filters: {
|
|
51
38
|
type: "object",
|
|
52
39
|
description: "Filters for list operation. Use search to find proposals by keyword - results are filtered server-side for accuracy.",
|
|
53
|
-
properties:
|
|
54
|
-
status: {
|
|
55
|
-
type: "string",
|
|
56
|
-
enum: ["draft", "proposed", "in-review", "code-complete", "approved", "merged", "rejected"],
|
|
57
|
-
description: "Filter by proposal status"
|
|
58
|
-
},
|
|
59
|
-
author: {
|
|
60
|
-
type: "string",
|
|
61
|
-
description: "Filter by author name or email"
|
|
62
|
-
},
|
|
63
|
-
priority: {
|
|
64
|
-
type: "string",
|
|
65
|
-
enum: ["low", "medium", "high", "critical"],
|
|
66
|
-
description: "Filter by priority level"
|
|
67
|
-
},
|
|
68
|
-
tags: {
|
|
69
|
-
type: "array",
|
|
70
|
-
items: { type: "string" },
|
|
71
|
-
description: "Filter by tags"
|
|
72
|
-
},
|
|
73
|
-
search: {
|
|
74
|
-
type: "string",
|
|
75
|
-
description: "Search query to filter proposals by intent, content, author, or tags. Always use this when looking for proposals about a specific topic."
|
|
76
|
-
}
|
|
77
|
-
}
|
|
40
|
+
properties: filtersProperties
|
|
78
41
|
},
|
|
42
|
+
// Proposal data for create operation - auto-generated from Zod schema
|
|
79
43
|
proposal: {
|
|
80
44
|
type: "object",
|
|
81
|
-
description: "Proposal data for create/update operations",
|
|
82
|
-
properties:
|
|
83
|
-
|
|
84
|
-
type: "string",
|
|
85
|
-
description: "Brief description of what the proposal aims to achieve"
|
|
86
|
-
},
|
|
87
|
-
content: {
|
|
88
|
-
type: "string",
|
|
89
|
-
description: "Detailed content of the proposal"
|
|
90
|
-
},
|
|
91
|
-
author: {
|
|
92
|
-
type: "object",
|
|
93
|
-
description: "Author information",
|
|
94
|
-
properties: {
|
|
95
|
-
id: { type: "string" },
|
|
96
|
-
name: { type: "string" },
|
|
97
|
-
email: { type: "string" },
|
|
98
|
-
role: { type: "string" },
|
|
99
|
-
type: { type: "string", enum: ["human", "agent"] }
|
|
100
|
-
}
|
|
101
|
-
},
|
|
102
|
-
planSteps: {
|
|
103
|
-
type: "array",
|
|
104
|
-
description: "Implementation plan steps. Each item may be a string (description) or an object with fields.",
|
|
105
|
-
items: {
|
|
106
|
-
oneOf: [
|
|
107
|
-
{ type: "string", description: "Step description" },
|
|
108
|
-
{
|
|
109
|
-
type: "object",
|
|
110
|
-
properties: {
|
|
111
|
-
id: { type: "string", description: "Step identifier (optional)" },
|
|
112
|
-
description: { type: "string", description: "Human-readable step description" },
|
|
113
|
-
status: { type: "string", enum: ["pending", "in-progress", "completed", "failed"], description: "Execution status" },
|
|
114
|
-
command: { type: "string", description: "Optional command to execute" },
|
|
115
|
-
expectedOutcome: { type: "string", description: "Expected outcome of the step" }
|
|
116
|
-
},
|
|
117
|
-
required: ["description"]
|
|
118
|
-
}
|
|
119
|
-
]
|
|
120
|
-
}
|
|
121
|
-
},
|
|
122
|
-
evidence: {
|
|
123
|
-
type: "array",
|
|
124
|
-
items: { type: "string" },
|
|
125
|
-
description: "Supporting evidence"
|
|
126
|
-
},
|
|
127
|
-
policies: {
|
|
128
|
-
type: "array",
|
|
129
|
-
items: { type: "string" },
|
|
130
|
-
description: "Related policies"
|
|
131
|
-
},
|
|
132
|
-
featureFlags: {
|
|
133
|
-
type: "array",
|
|
134
|
-
items: { type: "string" },
|
|
135
|
-
description: "Feature flags needed"
|
|
136
|
-
},
|
|
137
|
-
experiments: {
|
|
138
|
-
type: "array",
|
|
139
|
-
items: { type: "string" },
|
|
140
|
-
description: "A/B tests or experiments"
|
|
141
|
-
},
|
|
142
|
-
telemetryContracts: {
|
|
143
|
-
type: "array",
|
|
144
|
-
items: { type: "string" },
|
|
145
|
-
description: "Telemetry contracts"
|
|
146
|
-
},
|
|
147
|
-
releasePlan: {
|
|
148
|
-
type: "object",
|
|
149
|
-
description: "Release strategy",
|
|
150
|
-
properties: {
|
|
151
|
-
strategy: {
|
|
152
|
-
type: "string",
|
|
153
|
-
enum: ["immediate", "gradual", "scheduled", "gated"]
|
|
154
|
-
}
|
|
155
|
-
}
|
|
156
|
-
},
|
|
157
|
-
status: {
|
|
158
|
-
type: "string",
|
|
159
|
-
enum: ["draft", "proposed", "in-review", "code-complete", "approved", "merged", "rejected"],
|
|
160
|
-
description: "Current status of the proposal"
|
|
161
|
-
},
|
|
162
|
-
metadata: {
|
|
163
|
-
type: "object",
|
|
164
|
-
description: "Additional metadata",
|
|
165
|
-
properties: {
|
|
166
|
-
tags: {
|
|
167
|
-
type: "array",
|
|
168
|
-
items: { type: "string" },
|
|
169
|
-
description: "Tags for categorization"
|
|
170
|
-
},
|
|
171
|
-
priority: {
|
|
172
|
-
type: "string",
|
|
173
|
-
enum: ["low", "medium", "high", "critical"],
|
|
174
|
-
description: "Priority level"
|
|
175
|
-
},
|
|
176
|
-
reviewers: {
|
|
177
|
-
type: "array",
|
|
178
|
-
items: { type: "string" },
|
|
179
|
-
description: "List of reviewers"
|
|
180
|
-
}
|
|
181
|
-
}
|
|
182
|
-
},
|
|
183
|
-
productSpecRef: {
|
|
184
|
-
type: "string",
|
|
185
|
-
description: "Reference to related product specification"
|
|
186
|
-
}
|
|
187
|
-
},
|
|
188
|
-
required: ["intent", "content"]
|
|
45
|
+
description: "Proposal data for create/update operations. For create: intent and content are required. For update: at least one field is required.",
|
|
46
|
+
properties: createProperties,
|
|
47
|
+
required: [...createRequired]
|
|
189
48
|
}
|
|
190
49
|
},
|
|
191
50
|
required: ["operation"]
|
|
@@ -211,34 +70,52 @@ export const proposalsReadOnlyTool = {
|
|
|
211
70
|
type: "string",
|
|
212
71
|
description: "Proposal ID (required for get operation)"
|
|
213
72
|
},
|
|
73
|
+
// Filters auto-generated from Zod schema
|
|
214
74
|
filters: {
|
|
215
75
|
type: "object",
|
|
216
76
|
description: "Filters for list operation. Use search to find proposals by keyword.",
|
|
217
|
-
properties:
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
77
|
+
properties: filtersProperties
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
required: ["operation"]
|
|
81
|
+
}
|
|
82
|
+
};
|
|
83
|
+
/**
|
|
84
|
+
* Full CRUD proposals tool that includes create and update operations.
|
|
85
|
+
* Uses Zod schemas for validation.
|
|
86
|
+
*/
|
|
87
|
+
export const proposalsFullTool = {
|
|
88
|
+
name: "change_proposals",
|
|
89
|
+
description: "Full CRUD for change proposals - create, read, update, delete. Use this when you need to create or modify proposals via MCP.",
|
|
90
|
+
parameters: {
|
|
91
|
+
type: "object",
|
|
92
|
+
properties: {
|
|
93
|
+
operation: {
|
|
94
|
+
type: "string",
|
|
95
|
+
enum: ["list", "get", "create", "update", "delete"],
|
|
96
|
+
description: "The operation to perform"
|
|
97
|
+
},
|
|
98
|
+
id: {
|
|
99
|
+
type: "string",
|
|
100
|
+
description: "Proposal ID (required for get, update, delete operations)"
|
|
101
|
+
},
|
|
102
|
+
filters: {
|
|
103
|
+
type: "object",
|
|
104
|
+
description: "Filters for list operation",
|
|
105
|
+
properties: filtersProperties
|
|
106
|
+
},
|
|
107
|
+
// For create - all fields from CreateProposalInputSchema
|
|
108
|
+
proposal: {
|
|
109
|
+
type: "object",
|
|
110
|
+
description: "Proposal data for create operation",
|
|
111
|
+
properties: createProperties,
|
|
112
|
+
required: [...createRequired]
|
|
113
|
+
},
|
|
114
|
+
// For update - partial fields from UpdateProposalInputSchema
|
|
115
|
+
updates: {
|
|
116
|
+
type: "object",
|
|
117
|
+
description: "Fields to update (for update operation). At least one field required.",
|
|
118
|
+
properties: updateProperties
|
|
242
119
|
}
|
|
243
120
|
},
|
|
244
121
|
required: ["operation"]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"proposals-tool.js","sourceRoot":"","sources":["../src/proposals-tool.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"proposals-tool.js","sourceRoot":"","sources":["../src/proposals-tool.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAA;AAkBvD,0CAA0C;AAC1C,MAAM,iBAAiB,GAAG,mBAAmB,CAAC,OAAO,CAAA;AACrD,MAAM,gBAAgB,GAAG,mBAAmB,CAAC,MAAM,CAAA;AACnD,MAAM,gBAAgB,GAAG,mBAAmB,CAAC,MAAM,CAAA;AACnD,MAAM,cAAc,GAAG,mBAAmB,CAAC,cAAc,CAAA;AAEzD,MAAM,CAAC,MAAM,iBAAiB,GAAY;IACxC,IAAI,EAAE,gBAAgB;IACtB,WAAW,EAAE,kFAAkF;IAC/F,UAAU,EAAE;QACV,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,OAAO,EAAE;gBACP,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,wCAAwC;gBACrD,UAAU,EAAE,iBAAiB;aAC9B;SACF;KACF;CACF,CAAA;AAED,MAAM,CAAC,MAAM,aAAa,GAAY;IACpC,IAAI,EAAE,kBAAkB;IACxB,WAAW,EAAE,uOAAuO;IACpP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itest --ui"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@lovelybunch/
|
|
17
|
+
"@lovelybunch/core": "^1.0.74",
|
|
18
|
+
"@lovelybunch/types": "^1.0.74",
|
|
18
19
|
"hono": "^4.0.0"
|
|
19
20
|
},
|
|
20
21
|
"devDependencies": {
|
package/src/index.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { proposalsTool, proposalsReadOnlyTool, listProposalsTool, validateProposalData, createToolCall } from './proposals-tool.js'
|
|
1
|
+
export { proposalsTool, proposalsReadOnlyTool, proposalsFullTool, listProposalsTool, validateProposalData, createToolCall } from './proposals-tool.js'
|
|
2
2
|
export { eventsTool } from './events-tool.js'
|
|
3
3
|
export { projectContextTool } from './project-context-tool.js'
|
|
4
4
|
export { architectureContextTool } from './architecture-context-tool.js'
|
package/src/proposals-tool.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { ChangeProposal } from '@lovelybunch/types'
|
|
2
|
+
import { proposalJsonSchemas } from '@lovelybunch/core'
|
|
2
3
|
|
|
3
4
|
export interface MCPTool {
|
|
4
5
|
name: string
|
|
@@ -16,6 +17,12 @@ export interface MCPToolCall {
|
|
|
16
17
|
arguments: Record<string, any>
|
|
17
18
|
}
|
|
18
19
|
|
|
20
|
+
// Use pre-computed JSON schemas from core
|
|
21
|
+
const filtersProperties = proposalJsonSchemas.filters
|
|
22
|
+
const createProperties = proposalJsonSchemas.create
|
|
23
|
+
const updateProperties = proposalJsonSchemas.update
|
|
24
|
+
const createRequired = proposalJsonSchemas.createRequired
|
|
25
|
+
|
|
19
26
|
export const listProposalsTool: MCPTool = {
|
|
20
27
|
name: "list_proposals",
|
|
21
28
|
description: "List all change proposals with metadata only (title, ID, status, priority, tags)",
|
|
@@ -25,27 +32,7 @@ export const listProposalsTool: MCPTool = {
|
|
|
25
32
|
filters: {
|
|
26
33
|
type: "object",
|
|
27
34
|
description: "Optional filters for the proposal list",
|
|
28
|
-
properties:
|
|
29
|
-
status: {
|
|
30
|
-
type: "string",
|
|
31
|
-
enum: ["draft", "proposed", "in-review", "code-complete", "approved", "merged", "rejected"],
|
|
32
|
-
description: "Filter by proposal status"
|
|
33
|
-
},
|
|
34
|
-
priority: {
|
|
35
|
-
type: "string",
|
|
36
|
-
enum: ["low", "medium", "high", "critical"],
|
|
37
|
-
description: "Filter by priority level"
|
|
38
|
-
},
|
|
39
|
-
tags: {
|
|
40
|
-
type: "array",
|
|
41
|
-
items: { type: "string" },
|
|
42
|
-
description: "Filter by tags"
|
|
43
|
-
},
|
|
44
|
-
search: {
|
|
45
|
-
type: "string",
|
|
46
|
-
description: "Search query for proposal content"
|
|
47
|
-
}
|
|
48
|
-
}
|
|
35
|
+
properties: filtersProperties
|
|
49
36
|
}
|
|
50
37
|
}
|
|
51
38
|
}
|
|
@@ -66,145 +53,18 @@ export const proposalsTool: MCPTool = {
|
|
|
66
53
|
type: "string",
|
|
67
54
|
description: "Proposal ID (required for get, update, delete operations)"
|
|
68
55
|
},
|
|
56
|
+
// Filters for list operation - auto-generated from Zod schema
|
|
69
57
|
filters: {
|
|
70
58
|
type: "object",
|
|
71
59
|
description: "Filters for list operation. Use search to find proposals by keyword - results are filtered server-side for accuracy.",
|
|
72
|
-
properties:
|
|
73
|
-
status: {
|
|
74
|
-
type: "string",
|
|
75
|
-
enum: ["draft", "proposed", "in-review", "code-complete", "approved", "merged", "rejected"],
|
|
76
|
-
description: "Filter by proposal status"
|
|
77
|
-
},
|
|
78
|
-
author: {
|
|
79
|
-
type: "string",
|
|
80
|
-
description: "Filter by author name or email"
|
|
81
|
-
},
|
|
82
|
-
priority: {
|
|
83
|
-
type: "string",
|
|
84
|
-
enum: ["low", "medium", "high", "critical"],
|
|
85
|
-
description: "Filter by priority level"
|
|
86
|
-
},
|
|
87
|
-
tags: {
|
|
88
|
-
type: "array",
|
|
89
|
-
items: { type: "string" },
|
|
90
|
-
description: "Filter by tags"
|
|
91
|
-
},
|
|
92
|
-
search: {
|
|
93
|
-
type: "string",
|
|
94
|
-
description: "Search query to filter proposals by intent, content, author, or tags. Always use this when looking for proposals about a specific topic."
|
|
95
|
-
}
|
|
96
|
-
}
|
|
60
|
+
properties: filtersProperties
|
|
97
61
|
},
|
|
62
|
+
// Proposal data for create operation - auto-generated from Zod schema
|
|
98
63
|
proposal: {
|
|
99
64
|
type: "object",
|
|
100
|
-
description: "Proposal data for create/update operations",
|
|
101
|
-
properties:
|
|
102
|
-
|
|
103
|
-
type: "string",
|
|
104
|
-
description: "Brief description of what the proposal aims to achieve"
|
|
105
|
-
},
|
|
106
|
-
content: {
|
|
107
|
-
type: "string",
|
|
108
|
-
description: "Detailed content of the proposal"
|
|
109
|
-
},
|
|
110
|
-
author: {
|
|
111
|
-
type: "object",
|
|
112
|
-
description: "Author information",
|
|
113
|
-
properties: {
|
|
114
|
-
id: { type: "string" },
|
|
115
|
-
name: { type: "string" },
|
|
116
|
-
email: { type: "string" },
|
|
117
|
-
role: { type: "string" },
|
|
118
|
-
type: { type: "string", enum: ["human", "agent"] }
|
|
119
|
-
}
|
|
120
|
-
},
|
|
121
|
-
planSteps: {
|
|
122
|
-
type: "array",
|
|
123
|
-
description: "Implementation plan steps. Each item may be a string (description) or an object with fields.",
|
|
124
|
-
items: {
|
|
125
|
-
oneOf: [
|
|
126
|
-
{ type: "string", description: "Step description" },
|
|
127
|
-
{
|
|
128
|
-
type: "object",
|
|
129
|
-
properties: {
|
|
130
|
-
id: { type: "string", description: "Step identifier (optional)" },
|
|
131
|
-
description: { type: "string", description: "Human-readable step description" },
|
|
132
|
-
status: { type: "string", enum: ["pending", "in-progress", "completed", "failed"], description: "Execution status" },
|
|
133
|
-
command: { type: "string", description: "Optional command to execute" },
|
|
134
|
-
expectedOutcome: { type: "string", description: "Expected outcome of the step" }
|
|
135
|
-
},
|
|
136
|
-
required: ["description"]
|
|
137
|
-
}
|
|
138
|
-
]
|
|
139
|
-
}
|
|
140
|
-
},
|
|
141
|
-
evidence: {
|
|
142
|
-
type: "array",
|
|
143
|
-
items: { type: "string" },
|
|
144
|
-
description: "Supporting evidence"
|
|
145
|
-
},
|
|
146
|
-
policies: {
|
|
147
|
-
type: "array",
|
|
148
|
-
items: { type: "string" },
|
|
149
|
-
description: "Related policies"
|
|
150
|
-
},
|
|
151
|
-
featureFlags: {
|
|
152
|
-
type: "array",
|
|
153
|
-
items: { type: "string" },
|
|
154
|
-
description: "Feature flags needed"
|
|
155
|
-
},
|
|
156
|
-
experiments: {
|
|
157
|
-
type: "array",
|
|
158
|
-
items: { type: "string" },
|
|
159
|
-
description: "A/B tests or experiments"
|
|
160
|
-
},
|
|
161
|
-
telemetryContracts: {
|
|
162
|
-
type: "array",
|
|
163
|
-
items: { type: "string" },
|
|
164
|
-
description: "Telemetry contracts"
|
|
165
|
-
},
|
|
166
|
-
releasePlan: {
|
|
167
|
-
type: "object",
|
|
168
|
-
description: "Release strategy",
|
|
169
|
-
properties: {
|
|
170
|
-
strategy: {
|
|
171
|
-
type: "string",
|
|
172
|
-
enum: ["immediate", "gradual", "scheduled", "gated"]
|
|
173
|
-
}
|
|
174
|
-
}
|
|
175
|
-
},
|
|
176
|
-
status: {
|
|
177
|
-
type: "string",
|
|
178
|
-
enum: ["draft", "proposed", "in-review", "code-complete", "approved", "merged", "rejected"],
|
|
179
|
-
description: "Current status of the proposal"
|
|
180
|
-
},
|
|
181
|
-
metadata: {
|
|
182
|
-
type: "object",
|
|
183
|
-
description: "Additional metadata",
|
|
184
|
-
properties: {
|
|
185
|
-
tags: {
|
|
186
|
-
type: "array",
|
|
187
|
-
items: { type: "string" },
|
|
188
|
-
description: "Tags for categorization"
|
|
189
|
-
},
|
|
190
|
-
priority: {
|
|
191
|
-
type: "string",
|
|
192
|
-
enum: ["low", "medium", "high", "critical"],
|
|
193
|
-
description: "Priority level"
|
|
194
|
-
},
|
|
195
|
-
reviewers: {
|
|
196
|
-
type: "array",
|
|
197
|
-
items: { type: "string" },
|
|
198
|
-
description: "List of reviewers"
|
|
199
|
-
}
|
|
200
|
-
}
|
|
201
|
-
},
|
|
202
|
-
productSpecRef: {
|
|
203
|
-
type: "string",
|
|
204
|
-
description: "Reference to related product specification"
|
|
205
|
-
}
|
|
206
|
-
},
|
|
207
|
-
required: ["intent", "content"]
|
|
65
|
+
description: "Proposal data for create/update operations. For create: intent and content are required. For update: at least one field is required.",
|
|
66
|
+
properties: createProperties,
|
|
67
|
+
required: [...createRequired]
|
|
208
68
|
}
|
|
209
69
|
},
|
|
210
70
|
required: ["operation"]
|
|
@@ -231,34 +91,53 @@ export const proposalsReadOnlyTool: MCPTool = {
|
|
|
231
91
|
type: "string",
|
|
232
92
|
description: "Proposal ID (required for get operation)"
|
|
233
93
|
},
|
|
94
|
+
// Filters auto-generated from Zod schema
|
|
234
95
|
filters: {
|
|
235
96
|
type: "object",
|
|
236
97
|
description: "Filters for list operation. Use search to find proposals by keyword.",
|
|
237
|
-
properties:
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
98
|
+
properties: filtersProperties
|
|
99
|
+
}
|
|
100
|
+
},
|
|
101
|
+
required: ["operation"]
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* Full CRUD proposals tool that includes create and update operations.
|
|
107
|
+
* Uses Zod schemas for validation.
|
|
108
|
+
*/
|
|
109
|
+
export const proposalsFullTool: MCPTool = {
|
|
110
|
+
name: "change_proposals",
|
|
111
|
+
description: "Full CRUD for change proposals - create, read, update, delete. Use this when you need to create or modify proposals via MCP.",
|
|
112
|
+
parameters: {
|
|
113
|
+
type: "object",
|
|
114
|
+
properties: {
|
|
115
|
+
operation: {
|
|
116
|
+
type: "string",
|
|
117
|
+
enum: ["list", "get", "create", "update", "delete"],
|
|
118
|
+
description: "The operation to perform"
|
|
119
|
+
},
|
|
120
|
+
id: {
|
|
121
|
+
type: "string",
|
|
122
|
+
description: "Proposal ID (required for get, update, delete operations)"
|
|
123
|
+
},
|
|
124
|
+
filters: {
|
|
125
|
+
type: "object",
|
|
126
|
+
description: "Filters for list operation",
|
|
127
|
+
properties: filtersProperties
|
|
128
|
+
},
|
|
129
|
+
// For create - all fields from CreateProposalInputSchema
|
|
130
|
+
proposal: {
|
|
131
|
+
type: "object",
|
|
132
|
+
description: "Proposal data for create operation",
|
|
133
|
+
properties: createProperties,
|
|
134
|
+
required: [...createRequired]
|
|
135
|
+
},
|
|
136
|
+
// For update - partial fields from UpdateProposalInputSchema
|
|
137
|
+
updates: {
|
|
138
|
+
type: "object",
|
|
139
|
+
description: "Fields to update (for update operation). At least one field required.",
|
|
140
|
+
properties: updateProperties
|
|
262
141
|
}
|
|
263
142
|
},
|
|
264
143
|
required: ["operation"]
|