@lovelybunch/mcp 1.0.70 → 1.0.71-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/architecture-context-tool.d.ts +11 -0
- package/dist/architecture-context-tool.d.ts.map +1 -0
- package/dist/architecture-context-tool.js +36 -0
- package/dist/architecture-context-tool.js.map +1 -0
- package/dist/events-tool.d.ts +11 -0
- package/dist/events-tool.d.ts.map +1 -0
- package/dist/events-tool.js +33 -0
- package/dist/events-tool.js.map +1 -0
- package/dist/index.d.ts +4 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -1
- package/dist/index.js.map +1 -1
- package/dist/knowledge-tool.d.ts.map +1 -1
- package/dist/knowledge-tool.js +5 -1
- package/dist/knowledge-tool.js.map +1 -1
- package/dist/project-context-tool.d.ts +11 -0
- package/dist/project-context-tool.d.ts.map +1 -0
- package/dist/project-context-tool.js +36 -0
- package/dist/project-context-tool.js.map +1 -0
- package/dist/proposals-tool.d.ts +6 -0
- package/dist/proposals-tool.d.ts.map +1 -1
- package/dist/proposals-tool.js +56 -3
- package/dist/proposals-tool.js.map +1 -1
- package/package.json +2 -2
- package/src/architecture-context-tool.ts +39 -0
- package/src/events-tool.ts +36 -0
- package/src/index.ts +4 -1
- package/src/knowledge-tool.ts +5 -1
- package/src/project-context-tool.ts +39 -0
- package/src/proposals-tool.ts +57 -3
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Architecture Context tool for MCP - READ + WRITE
|
|
3
|
+
* Allows the AI assistant to read and update the architecture document (.nut/context/architecture.md)
|
|
4
|
+
*/
|
|
5
|
+
import type { MCPTool } from './proposals-tool.js';
|
|
6
|
+
/**
|
|
7
|
+
* Architecture context tool for AI assistant.
|
|
8
|
+
* Read and update the core architecture document.
|
|
9
|
+
*/
|
|
10
|
+
export declare const architectureContextTool: MCPTool;
|
|
11
|
+
//# sourceMappingURL=architecture-context-tool.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"architecture-context-tool.d.ts","sourceRoot":"","sources":["../src/architecture-context-tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAElD;;;GAGG;AACH,eAAO,MAAM,uBAAuB,EAAE,OA0BrC,CAAA"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Architecture Context tool for MCP - READ + WRITE
|
|
3
|
+
* Allows the AI assistant to read and update the architecture document (.nut/context/architecture.md)
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* Architecture context tool for AI assistant.
|
|
7
|
+
* Read and update the core architecture document.
|
|
8
|
+
*/
|
|
9
|
+
export const architectureContextTool = {
|
|
10
|
+
name: "architecture_context",
|
|
11
|
+
description: "Read or update the architecture document (.nut/context/architecture.md). This document captures the technical foundation - stack, conventions, systems, and integration points. Use 'get' to read, 'append' to add content at the end, 'replace_section' to edit specific text (PREFERRED for edits), or 'update' to replace the entire document (only for new/small docs). When helping users define their architecture, ask about their tech stack, coding conventions, deployment strategy, and system boundaries.",
|
|
12
|
+
parameters: {
|
|
13
|
+
type: "object",
|
|
14
|
+
properties: {
|
|
15
|
+
operation: {
|
|
16
|
+
type: "string",
|
|
17
|
+
enum: ["get", "append", "replace_section", "update"],
|
|
18
|
+
description: "Operation: 'get' to read, 'append' to add at end, 'replace_section' to find-and-replace specific text (PREFERRED for edits), 'update' to replace entire document (only for new/small docs)"
|
|
19
|
+
},
|
|
20
|
+
content: {
|
|
21
|
+
type: "string",
|
|
22
|
+
description: "For append: the new section to add. For update: the complete document content. Not used for get/replace_section."
|
|
23
|
+
},
|
|
24
|
+
old_text: {
|
|
25
|
+
type: "string",
|
|
26
|
+
description: "For replace_section: the exact text to find and replace (must match exactly, including whitespace)"
|
|
27
|
+
},
|
|
28
|
+
new_text: {
|
|
29
|
+
type: "string",
|
|
30
|
+
description: "For replace_section: the new text to replace old_text with"
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
required: ["operation"]
|
|
34
|
+
}
|
|
35
|
+
};
|
|
36
|
+
//# sourceMappingURL=architecture-context-tool.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"architecture-context-tool.js","sourceRoot":"","sources":["../src/architecture-context-tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH;;;GAGG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAY;IAC9C,IAAI,EAAE,sBAAsB;IAC5B,WAAW,EAAE,ufAAuf;IACpgB,UAAU,EAAE;QACV,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,SAAS,EAAE;gBACT,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,CAAC,KAAK,EAAE,QAAQ,EAAE,iBAAiB,EAAE,QAAQ,CAAC;gBACpD,WAAW,EAAE,4LAA4L;aAC1M;YACD,OAAO,EAAE;gBACP,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,kHAAkH;aAChI;YACD,QAAQ,EAAE;gBACR,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,oGAAoG;aAClH;YACD,QAAQ,EAAE;gBACR,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,4DAA4D;aAC1E;SACF;QACD,QAAQ,EAAE,CAAC,WAAW,CAAC;KACxB;CACF,CAAA"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Events tool for MCP - READ ONLY
|
|
3
|
+
* Allows the AI assistant to read recent activity/events from the Coconut instance
|
|
4
|
+
*/
|
|
5
|
+
import type { MCPTool } from './proposals-tool.js';
|
|
6
|
+
/**
|
|
7
|
+
* Read-only events tool for AI assistant.
|
|
8
|
+
* Returns recent activity events, most recent first.
|
|
9
|
+
*/
|
|
10
|
+
export declare const eventsTool: MCPTool;
|
|
11
|
+
//# sourceMappingURL=events-tool.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"events-tool.d.ts","sourceRoot":"","sources":["../src/events-tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAElD;;;GAGG;AACH,eAAO,MAAM,UAAU,EAAE,OAuBxB,CAAA"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Events tool for MCP - READ ONLY
|
|
3
|
+
* Allows the AI assistant to read recent activity/events from the Coconut instance
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* Read-only events tool for AI assistant.
|
|
7
|
+
* Returns recent activity events, most recent first.
|
|
8
|
+
*/
|
|
9
|
+
export const eventsTool = {
|
|
10
|
+
name: "activity_events",
|
|
11
|
+
description: "READ-ONLY: Fetch recent activity events from this Coconut instance. Returns events in reverse chronological order (most recent first). Use this to understand what's been happening - proposal changes, knowledge updates, agent activity, etc. Offer to go deeper on any specific event the user is interested in.",
|
|
12
|
+
parameters: {
|
|
13
|
+
type: "object",
|
|
14
|
+
properties: {
|
|
15
|
+
operation: {
|
|
16
|
+
type: "string",
|
|
17
|
+
enum: ["list"],
|
|
18
|
+
description: "Operation to perform. Only 'list' is supported."
|
|
19
|
+
},
|
|
20
|
+
limit: {
|
|
21
|
+
type: "number",
|
|
22
|
+
description: "Maximum number of events to return. Defaults to 20, max 100.",
|
|
23
|
+
default: 20
|
|
24
|
+
},
|
|
25
|
+
kind: {
|
|
26
|
+
type: "string",
|
|
27
|
+
description: "Optional filter by event kind prefix (e.g., 'proposal', 'knowledge', 'agent'). Returns events where kind starts with this value."
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
required: ["operation"]
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
//# sourceMappingURL=events-tool.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"events-tool.js","sourceRoot":"","sources":["../src/events-tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH;;;GAGG;AACH,MAAM,CAAC,MAAM,UAAU,GAAY;IACjC,IAAI,EAAE,iBAAiB;IACvB,WAAW,EAAE,qTAAqT;IAClU,UAAU,EAAE;QACV,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,SAAS,EAAE;gBACT,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,CAAC,MAAM,CAAC;gBACd,WAAW,EAAE,iDAAiD;aAC/D;YACD,KAAK,EAAE;gBACL,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,8DAA8D;gBAC3E,OAAO,EAAE,EAAE;aACZ;YACD,IAAI,EAAE;gBACJ,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,kIAAkI;aAChJ;SACF;QACD,QAAQ,EAAE,CAAC,WAAW,CAAC;KACxB;CACF,CAAA"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
export { proposalsTool, listProposalsTool, validateProposalData, createToolCall } from './proposals-tool.js';
|
|
1
|
+
export { proposalsTool, proposalsReadOnlyTool, listProposalsTool, validateProposalData, createToolCall } from './proposals-tool.js';
|
|
2
|
+
export { eventsTool } from './events-tool.js';
|
|
3
|
+
export { projectContextTool } from './project-context-tool.js';
|
|
4
|
+
export { architectureContextTool } from './architecture-context-tool.js';
|
|
2
5
|
export { knowledgeTool, createKnowledgeToolCall, normalizeKnowledgeMetadata, buildKnowledgeActionPayload } from './knowledge-tool.js';
|
|
3
6
|
export type { KnowledgeActionPayload, KnowledgeActionType, KnowledgeDocument, KnowledgeDocumentMetadata } from './knowledge-tool.js';
|
|
4
7
|
export type { MCPTool, MCPToolCall } from './proposals-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,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,oBAAoB,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAA;AACnI,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,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,3 +1,6 @@
|
|
|
1
|
-
export { proposalsTool, listProposalsTool, validateProposalData, createToolCall } from './proposals-tool.js';
|
|
1
|
+
export { proposalsTool, proposalsReadOnlyTool, listProposalsTool, validateProposalData, createToolCall } from './proposals-tool.js';
|
|
2
|
+
export { eventsTool } from './events-tool.js';
|
|
3
|
+
export { projectContextTool } from './project-context-tool.js';
|
|
4
|
+
export { architectureContextTool } from './architecture-context-tool.js';
|
|
2
5
|
export { knowledgeTool, createKnowledgeToolCall, normalizeKnowledgeMetadata, buildKnowledgeActionPayload } from './knowledge-tool.js';
|
|
3
6
|
//# sourceMappingURL=index.js.map
|
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,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,oBAAoB,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAA;AACnI,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,EACL,aAAa,EACb,uBAAuB,EACvB,0BAA0B,EAC1B,2BAA2B,EAC5B,MAAM,qBAAqB,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"knowledge-tool.d.ts","sourceRoot":"","sources":["../src/knowledge-tool.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAA;AAE/D,MAAM,WAAW,yBAAyB;IACxC,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,OAAO,EAAE,MAAM,CAAA;IACf,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,IAAI,CAAC,EAAE,MAAM,EAAE,CAAA;IACf,OAAO,CAAC,EAAE,MAAM,EAAE,CAAA;IAClB,OAAO,CAAC,EAAE,MAAM,EAAE,CAAA;IAClB,KAAK,CAAC,EAAE;QACN,IAAI,EAAE,MAAM,CAAA;QACZ,KAAK,CAAC,EAAE,MAAM,CAAA;KACf,CAAA;IACD,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAA;IACnB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;CACvB;AAED,MAAM,MAAM,mBAAmB,GAAG,QAAQ,GA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G,QAAQ,CAAA;AAErD,MAAM,WAAW,sBAAsB;IACrC,MAAM,EAAE,mBAAmB,CAAA;IAC3B,KAAK,EAAE,MAAM,CAAA;IACb,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,OAAO,EAAE,MAAM,CAAA;IACf,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,QAAQ,CAAC,EAAE,yBAAyB,CAAA;IACpC,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB;AAED,MAAM,WAAW,iBAAiB;IAChC,QAAQ,EAAE,MAAM,CAAA;IAChB,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,EAAE,yBAAyB,CAAA;IACnC,OAAO,EAAE,MAAM,CAAA;CAChB;AA2BD,eAAO,MAAM,aAAa,EAAE,OAoC3B,CAAA;AAED,wBAAgB,uBAAuB,CAAC,SAAS,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,WAAW,CAQrG;AAED,wBAAgB,0BAA0B,CAAC,QAAQ,CAAC,EAAE,yBAAyB,GAAG,IAAI,GAAG,yBAAyB,CAWjH;AAED,wBAAgB,2BAA2B,CAAC,KAAK,EAAE,sBAAsB,GAAG,sBAAsB,CAMjG"}
|
package/dist/knowledge-tool.js
CHANGED
|
@@ -24,7 +24,7 @@ const metadataSchema = {
|
|
|
24
24
|
};
|
|
25
25
|
export const knowledgeTool = {
|
|
26
26
|
name: 'knowledge_documents',
|
|
27
|
-
description: 'Manage knowledge base markdown documents stored in .nut/context/knowledge',
|
|
27
|
+
description: 'Manage knowledge base markdown documents stored in .nut/context/knowledge. IMPORTANT: When searching for documents by topic or keyword, always use the query parameter to filter results server-side. The returned count reflects filtered results.',
|
|
28
28
|
parameters: {
|
|
29
29
|
type: 'object',
|
|
30
30
|
properties: {
|
|
@@ -33,6 +33,10 @@ export const knowledgeTool = {
|
|
|
33
33
|
enum: ['list', 'get', 'create', 'update', 'preview_update'],
|
|
34
34
|
description: 'The knowledge document operation to execute'
|
|
35
35
|
},
|
|
36
|
+
query: {
|
|
37
|
+
type: 'string',
|
|
38
|
+
description: 'Search query to filter documents by title, content, tags, or category. Always use this when looking for documents about a specific topic. Results include relevance-ranked matches with snippets.'
|
|
39
|
+
},
|
|
36
40
|
filename: {
|
|
37
41
|
type: 'string',
|
|
38
42
|
description: 'Existing knowledge filename (with or without .md) for get/update/preview operations'
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"knowledge-tool.js","sourceRoot":"","sources":["../src/knowledge-tool.ts"],"names":[],"mappings":"AAuCA,MAAM,cAAc,GAAG;IACrB,IAAI,EAAE,QAAQ;IACd,WAAW,EAAE,kEAAkE;IAC/E,UAAU,EAAE;QACV,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,4CAA4C,EAAE;QACtF,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,mEAAmE,EAAE;QAC7G,IAAI,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,sCAAsC,EAAE;QAC7E,QAAQ,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,4CAA4C,EAAE;QACvF,IAAI,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,WAAW,EAAE,+BAA+B,EAAE;QAChG,OAAO,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,WAAW,EAAE,iDAAiD,EAAE;QACrH,OAAO,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,WAAW,EAAE,+CAA+C,EAAE;QACnH,KAAK,EAAE;YACL,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE;gBACV,IAAI,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;g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+
* Project Context tool for MCP - READ + WRITE
|
|
3
|
+
* Allows the AI assistant to read and update the project definition document (.nut/context/project.md)
|
|
4
|
+
*/
|
|
5
|
+
import type { MCPTool } from './proposals-tool.js';
|
|
6
|
+
/**
|
|
7
|
+
* Project context tool for AI assistant.
|
|
8
|
+
* Read and update the core project definition document.
|
|
9
|
+
*/
|
|
10
|
+
export declare const projectContextTool: MCPTool;
|
|
11
|
+
//# sourceMappingURL=project-context-tool.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"project-context-tool.d.ts","sourceRoot":"","sources":["../src/project-context-tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAElD;;;GAGG;AACH,eAAO,MAAM,kBAAkB,EAAE,OA0BhC,CAAA"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Project Context tool for MCP - READ + WRITE
|
|
3
|
+
* Allows the AI assistant to read and update the project definition document (.nut/context/project.md)
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* Project context tool for AI assistant.
|
|
7
|
+
* Read and update the core project definition document.
|
|
8
|
+
*/
|
|
9
|
+
export const projectContextTool = {
|
|
10
|
+
name: "project_context",
|
|
11
|
+
description: "Read or update the project definition document (.nut/context/project.md). This document captures what the project is about - its goals, metrics, stakeholders, and roadmap. Use 'get' to read, 'append' to add content at the end, 'replace_section' to edit specific text (PREFERRED for edits), or 'update' to replace the entire document (only for new/small docs). When helping users define their project, ask discovery questions about what they're building, who it's for, and what success looks like.",
|
|
12
|
+
parameters: {
|
|
13
|
+
type: "object",
|
|
14
|
+
properties: {
|
|
15
|
+
operation: {
|
|
16
|
+
type: "string",
|
|
17
|
+
enum: ["get", "append", "replace_section", "update"],
|
|
18
|
+
description: "Operation: 'get' to read, 'append' to add at end, 'replace_section' to find-and-replace specific text (PREFERRED for edits), 'update' to replace entire document (only for new/small docs)"
|
|
19
|
+
},
|
|
20
|
+
content: {
|
|
21
|
+
type: "string",
|
|
22
|
+
description: "For append: the new section to add. For update: the complete document content. Not used for get/replace_section."
|
|
23
|
+
},
|
|
24
|
+
old_text: {
|
|
25
|
+
type: "string",
|
|
26
|
+
description: "For replace_section: the exact text to find and replace (must match exactly, including whitespace)"
|
|
27
|
+
},
|
|
28
|
+
new_text: {
|
|
29
|
+
type: "string",
|
|
30
|
+
description: "For replace_section: the new text to replace old_text with"
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
required: ["operation"]
|
|
34
|
+
}
|
|
35
|
+
};
|
|
36
|
+
//# sourceMappingURL=project-context-tool.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"project-context-tool.js","sourceRoot":"","sources":["../src/project-context-tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH;;;GAGG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAY;IACzC,IAAI,EAAE,iBAAiB;IACvB,WAAW,EAAE,kfAAkf;IAC/f,UAAU,EAAE;QACV,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,SAAS,EAAE;gBACT,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,CAAC,KAAK,EAAE,QAAQ,EAAE,iBAAiB,EAAE,QAAQ,CAAC;gBACpD,WAAW,EAAE,4LAA4L;aAC1M;YACD,OAAO,EAAE;gBACP,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,kHAAkH;aAChI;YACD,QAAQ,EAAE;gBACR,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,oGAAoG;aAClH;YACD,QAAQ,EAAE;gBACR,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,4DAA4D;aAC1E;SACF;QACD,QAAQ,EAAE,CAAC,WAAW,CAAC;KACxB;CACF,CAAA"}
|
package/dist/proposals-tool.d.ts
CHANGED
|
@@ -15,6 +15,12 @@ export interface MCPToolCall {
|
|
|
15
15
|
}
|
|
16
16
|
export declare const listProposalsTool: MCPTool;
|
|
17
17
|
export declare const proposalsTool: MCPTool;
|
|
18
|
+
/**
|
|
19
|
+
* Read-only version of the proposals tool for AI assistant.
|
|
20
|
+
* Only exposes list and get operations - no create/update/delete.
|
|
21
|
+
* Creating proposals should be done by coding agents (Claude Code, Cursor, etc.) or via the UI.
|
|
22
|
+
*/
|
|
23
|
+
export declare const proposalsReadOnlyTool: MCPTool;
|
|
18
24
|
export declare function validateProposalData(data: any): Partial<ChangeProposal>;
|
|
19
25
|
export declare function createToolCall(operation: string, args: any): MCPToolCall;
|
|
20
26
|
//# 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;AAExD,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;AAED,eAAO,MAAM,iBAAiB,EAAE,OAiC/B,CAAA;AAED,eAAO,MAAM,aAAa,EAAE,OA8J3B,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"}
|
|
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;AAExD,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;AAED,eAAO,MAAM,iBAAiB,EAAE,OAiC/B,CAAA;AAED,eAAO,MAAM,aAAa,EAAE,OA8J3B,CAAA;AAED;;;;GAIG;AACH,eAAO,MAAM,qBAAqB,EAAE,OA+CnC,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
|
@@ -34,7 +34,7 @@ export const listProposalsTool = {
|
|
|
34
34
|
};
|
|
35
35
|
export const proposalsTool = {
|
|
36
36
|
name: "change_proposals",
|
|
37
|
-
description: "Manage change proposals - create, read, update, delete proposals",
|
|
37
|
+
description: "Manage change proposals - create, read, update, delete proposals. IMPORTANT: When searching for proposals by topic or keyword, always use filters.search to filter results server-side. The returned count reflects filtered results.",
|
|
38
38
|
parameters: {
|
|
39
39
|
type: "object",
|
|
40
40
|
properties: {
|
|
@@ -49,7 +49,7 @@ export const proposalsTool = {
|
|
|
49
49
|
},
|
|
50
50
|
filters: {
|
|
51
51
|
type: "object",
|
|
52
|
-
description: "Filters for list operation",
|
|
52
|
+
description: "Filters for list operation. Use search to find proposals by keyword - results are filtered server-side for accuracy.",
|
|
53
53
|
properties: {
|
|
54
54
|
status: {
|
|
55
55
|
type: "string",
|
|
@@ -72,7 +72,7 @@ export const proposalsTool = {
|
|
|
72
72
|
},
|
|
73
73
|
search: {
|
|
74
74
|
type: "string",
|
|
75
|
-
description: "Search query for
|
|
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
76
|
}
|
|
77
77
|
}
|
|
78
78
|
},
|
|
@@ -191,6 +191,59 @@ export const proposalsTool = {
|
|
|
191
191
|
required: ["operation"]
|
|
192
192
|
}
|
|
193
193
|
};
|
|
194
|
+
/**
|
|
195
|
+
* Read-only version of the proposals tool for AI assistant.
|
|
196
|
+
* Only exposes list and get operations - no create/update/delete.
|
|
197
|
+
* Creating proposals should be done by coding agents (Claude Code, Cursor, etc.) or via the UI.
|
|
198
|
+
*/
|
|
199
|
+
export const proposalsReadOnlyTool = {
|
|
200
|
+
name: "change_proposals",
|
|
201
|
+
description: "READ-ONLY: Search and read change proposals. You can ONLY use 'list' and 'get' operations. You CANNOT create, update, or delete proposals — that should be done by coding agents (Claude Code, Cursor, etc.) which have broader codebase context, or via the Proposals UI.",
|
|
202
|
+
parameters: {
|
|
203
|
+
type: "object",
|
|
204
|
+
properties: {
|
|
205
|
+
operation: {
|
|
206
|
+
type: "string",
|
|
207
|
+
enum: ["list", "get"],
|
|
208
|
+
description: "ONLY 'list' or 'get' are allowed. 'list' to search/browse proposals, 'get' to retrieve a specific proposal by ID"
|
|
209
|
+
},
|
|
210
|
+
id: {
|
|
211
|
+
type: "string",
|
|
212
|
+
description: "Proposal ID (required for get operation)"
|
|
213
|
+
},
|
|
214
|
+
filters: {
|
|
215
|
+
type: "object",
|
|
216
|
+
description: "Filters for list operation. Use search to find proposals by keyword.",
|
|
217
|
+
properties: {
|
|
218
|
+
status: {
|
|
219
|
+
type: "string",
|
|
220
|
+
enum: ["draft", "proposed", "in-review", "code-complete", "approved", "merged", "rejected"],
|
|
221
|
+
description: "Filter by proposal status"
|
|
222
|
+
},
|
|
223
|
+
author: {
|
|
224
|
+
type: "string",
|
|
225
|
+
description: "Filter by author name or email"
|
|
226
|
+
},
|
|
227
|
+
priority: {
|
|
228
|
+
type: "string",
|
|
229
|
+
enum: ["low", "medium", "high", "critical"],
|
|
230
|
+
description: "Filter by priority level"
|
|
231
|
+
},
|
|
232
|
+
tags: {
|
|
233
|
+
type: "array",
|
|
234
|
+
items: { type: "string" },
|
|
235
|
+
description: "Filter by tags"
|
|
236
|
+
},
|
|
237
|
+
search: {
|
|
238
|
+
type: "string",
|
|
239
|
+
description: "Search query to filter proposals by intent, content, author, or tags"
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
},
|
|
244
|
+
required: ["operation"]
|
|
245
|
+
}
|
|
246
|
+
};
|
|
194
247
|
export function validateProposalData(data) {
|
|
195
248
|
const proposal = {};
|
|
196
249
|
if (data.intent)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"proposals-tool.js","sourceRoot":"","sources":["../src/proposals-tool.ts"],"names":[],"mappings":"AAkBA,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;oBACV,MAAM,EAAE;wBACN,IAAI,EAAE,QAAQ;wBACd,IAAI,EAAE,CAAC,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,eAAe,EAAE,UAAU,EAAE,QAAQ,EAAE,UAAU,CAAC;w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AQ,GAAG,IAAI,CAAC,QAAQ,CAAA;IACpD,IAAI,IAAI,CAAC,YAAY;QAAE,QAAQ,CAAC,YAAY,GAAG,IAAI,CAAC,YAAY,CAAA;IAChE,IAAI,IAAI,CAAC,WAAW;QAAE,QAAQ,CAAC,WAAW,GAAG,IAAI,CAAC,WAAW,CAAA;IAC7D,IAAI,IAAI,CAAC,kBAAkB;QAAE,QAAQ,CAAC,kBAAkB,GAAG,IAAI,CAAC,kBAAkB,CAAA;IAClF,IAAI,IAAI,CAAC,WAAW;QAAE,QAAQ,CAAC,WAAW,GAAG,IAAI,CAAC,WAAW,CAAA;IAC7D,IAAI,IAAI,CAAC,MAAM;QAAE,QAAQ,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,CAAA;IAC9C,IAAI,IAAI,CAAC,QAAQ;QAAE,QAAQ,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAA;IACpD,IAAI,IAAI,CAAC,cAAc;QAAE,QAAQ,CAAC,cAAc,GAAG,IAAI,CAAC,cAAc,CAAA;IAEtE,OAAO,QAAQ,CAAA;AACjB,CAAC;AAED,MAAM,UAAU,cAAc,CAAC,SAAiB,EAAE,IAAS;IACzD,OAAO;QACL,IAAI,EAAE,kBAAkB;QACxB,SAAS,EAAE;YACT,SAAS;YACT,GAAG,IAAI;SACR;KACF,CAAA;AACH,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lovelybunch/mcp",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.71-alpha.0",
|
|
4
4
|
"description": "MCP tools for Coconut",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"test:ui": "vitest --ui"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@lovelybunch/types": "^1.0.
|
|
17
|
+
"@lovelybunch/types": "^1.0.71-alpha.0",
|
|
18
18
|
"hono": "^4.0.0"
|
|
19
19
|
},
|
|
20
20
|
"devDependencies": {
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Architecture Context tool for MCP - READ + WRITE
|
|
3
|
+
* Allows the AI assistant to read and update the architecture document (.nut/context/architecture.md)
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import type { MCPTool } from './proposals-tool.js'
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Architecture context tool for AI assistant.
|
|
10
|
+
* Read and update the core architecture document.
|
|
11
|
+
*/
|
|
12
|
+
export const architectureContextTool: MCPTool = {
|
|
13
|
+
name: "architecture_context",
|
|
14
|
+
description: "Read or update the architecture document (.nut/context/architecture.md). This document captures the technical foundation - stack, conventions, systems, and integration points. Use 'get' to read, 'append' to add content at the end, 'replace_section' to edit specific text (PREFERRED for edits), or 'update' to replace the entire document (only for new/small docs). When helping users define their architecture, ask about their tech stack, coding conventions, deployment strategy, and system boundaries.",
|
|
15
|
+
parameters: {
|
|
16
|
+
type: "object",
|
|
17
|
+
properties: {
|
|
18
|
+
operation: {
|
|
19
|
+
type: "string",
|
|
20
|
+
enum: ["get", "append", "replace_section", "update"],
|
|
21
|
+
description: "Operation: 'get' to read, 'append' to add at end, 'replace_section' to find-and-replace specific text (PREFERRED for edits), 'update' to replace entire document (only for new/small docs)"
|
|
22
|
+
},
|
|
23
|
+
content: {
|
|
24
|
+
type: "string",
|
|
25
|
+
description: "For append: the new section to add. For update: the complete document content. Not used for get/replace_section."
|
|
26
|
+
},
|
|
27
|
+
old_text: {
|
|
28
|
+
type: "string",
|
|
29
|
+
description: "For replace_section: the exact text to find and replace (must match exactly, including whitespace)"
|
|
30
|
+
},
|
|
31
|
+
new_text: {
|
|
32
|
+
type: "string",
|
|
33
|
+
description: "For replace_section: the new text to replace old_text with"
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
required: ["operation"]
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Events tool for MCP - READ ONLY
|
|
3
|
+
* Allows the AI assistant to read recent activity/events from the Coconut instance
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import type { MCPTool } from './proposals-tool.js'
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Read-only events tool for AI assistant.
|
|
10
|
+
* Returns recent activity events, most recent first.
|
|
11
|
+
*/
|
|
12
|
+
export const eventsTool: MCPTool = {
|
|
13
|
+
name: "activity_events",
|
|
14
|
+
description: "READ-ONLY: Fetch recent activity events from this Coconut instance. Returns events in reverse chronological order (most recent first). Use this to understand what's been happening - proposal changes, knowledge updates, agent activity, etc. Offer to go deeper on any specific event the user is interested in.",
|
|
15
|
+
parameters: {
|
|
16
|
+
type: "object",
|
|
17
|
+
properties: {
|
|
18
|
+
operation: {
|
|
19
|
+
type: "string",
|
|
20
|
+
enum: ["list"],
|
|
21
|
+
description: "Operation to perform. Only 'list' is supported."
|
|
22
|
+
},
|
|
23
|
+
limit: {
|
|
24
|
+
type: "number",
|
|
25
|
+
description: "Maximum number of events to return. Defaults to 20, max 100.",
|
|
26
|
+
default: 20
|
|
27
|
+
},
|
|
28
|
+
kind: {
|
|
29
|
+
type: "string",
|
|
30
|
+
description: "Optional filter by event kind prefix (e.g., 'proposal', 'knowledge', 'agent'). Returns events where kind starts with this value."
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
required: ["operation"]
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
package/src/index.ts
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
export { proposalsTool, listProposalsTool, validateProposalData, createToolCall } from './proposals-tool.js'
|
|
1
|
+
export { proposalsTool, proposalsReadOnlyTool, listProposalsTool, validateProposalData, createToolCall } from './proposals-tool.js'
|
|
2
|
+
export { eventsTool } from './events-tool.js'
|
|
3
|
+
export { projectContextTool } from './project-context-tool.js'
|
|
4
|
+
export { architectureContextTool } from './architecture-context-tool.js'
|
|
2
5
|
export {
|
|
3
6
|
knowledgeTool,
|
|
4
7
|
createKnowledgeToolCall,
|
package/src/knowledge-tool.ts
CHANGED
|
@@ -64,7 +64,7 @@ const metadataSchema = {
|
|
|
64
64
|
|
|
65
65
|
export const knowledgeTool: MCPTool = {
|
|
66
66
|
name: 'knowledge_documents',
|
|
67
|
-
description: 'Manage knowledge base markdown documents stored in .nut/context/knowledge',
|
|
67
|
+
description: 'Manage knowledge base markdown documents stored in .nut/context/knowledge. IMPORTANT: When searching for documents by topic or keyword, always use the query parameter to filter results server-side. The returned count reflects filtered results.',
|
|
68
68
|
parameters: {
|
|
69
69
|
type: 'object',
|
|
70
70
|
properties: {
|
|
@@ -73,6 +73,10 @@ export const knowledgeTool: MCPTool = {
|
|
|
73
73
|
enum: ['list', 'get', 'create', 'update', 'preview_update'],
|
|
74
74
|
description: 'The knowledge document operation to execute'
|
|
75
75
|
},
|
|
76
|
+
query: {
|
|
77
|
+
type: 'string',
|
|
78
|
+
description: 'Search query to filter documents by title, content, tags, or category. Always use this when looking for documents about a specific topic. Results include relevance-ranked matches with snippets.'
|
|
79
|
+
},
|
|
76
80
|
filename: {
|
|
77
81
|
type: 'string',
|
|
78
82
|
description: 'Existing knowledge filename (with or without .md) for get/update/preview operations'
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Project Context tool for MCP - READ + WRITE
|
|
3
|
+
* Allows the AI assistant to read and update the project definition document (.nut/context/project.md)
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import type { MCPTool } from './proposals-tool.js'
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Project context tool for AI assistant.
|
|
10
|
+
* Read and update the core project definition document.
|
|
11
|
+
*/
|
|
12
|
+
export const projectContextTool: MCPTool = {
|
|
13
|
+
name: "project_context",
|
|
14
|
+
description: "Read or update the project definition document (.nut/context/project.md). This document captures what the project is about - its goals, metrics, stakeholders, and roadmap. Use 'get' to read, 'append' to add content at the end, 'replace_section' to edit specific text (PREFERRED for edits), or 'update' to replace the entire document (only for new/small docs). When helping users define their project, ask discovery questions about what they're building, who it's for, and what success looks like.",
|
|
15
|
+
parameters: {
|
|
16
|
+
type: "object",
|
|
17
|
+
properties: {
|
|
18
|
+
operation: {
|
|
19
|
+
type: "string",
|
|
20
|
+
enum: ["get", "append", "replace_section", "update"],
|
|
21
|
+
description: "Operation: 'get' to read, 'append' to add at end, 'replace_section' to find-and-replace specific text (PREFERRED for edits), 'update' to replace entire document (only for new/small docs)"
|
|
22
|
+
},
|
|
23
|
+
content: {
|
|
24
|
+
type: "string",
|
|
25
|
+
description: "For append: the new section to add. For update: the complete document content. Not used for get/replace_section."
|
|
26
|
+
},
|
|
27
|
+
old_text: {
|
|
28
|
+
type: "string",
|
|
29
|
+
description: "For replace_section: the exact text to find and replace (must match exactly, including whitespace)"
|
|
30
|
+
},
|
|
31
|
+
new_text: {
|
|
32
|
+
type: "string",
|
|
33
|
+
description: "For replace_section: the new text to replace old_text with"
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
required: ["operation"]
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
package/src/proposals-tool.ts
CHANGED
|
@@ -53,7 +53,7 @@ export const listProposalsTool: MCPTool = {
|
|
|
53
53
|
|
|
54
54
|
export const proposalsTool: MCPTool = {
|
|
55
55
|
name: "change_proposals",
|
|
56
|
-
description: "Manage change proposals - create, read, update, delete proposals",
|
|
56
|
+
description: "Manage change proposals - create, read, update, delete proposals. IMPORTANT: When searching for proposals by topic or keyword, always use filters.search to filter results server-side. The returned count reflects filtered results.",
|
|
57
57
|
parameters: {
|
|
58
58
|
type: "object",
|
|
59
59
|
properties: {
|
|
@@ -68,7 +68,7 @@ export const proposalsTool: MCPTool = {
|
|
|
68
68
|
},
|
|
69
69
|
filters: {
|
|
70
70
|
type: "object",
|
|
71
|
-
description: "Filters for list operation",
|
|
71
|
+
description: "Filters for list operation. Use search to find proposals by keyword - results are filtered server-side for accuracy.",
|
|
72
72
|
properties: {
|
|
73
73
|
status: {
|
|
74
74
|
type: "string",
|
|
@@ -91,7 +91,7 @@ export const proposalsTool: MCPTool = {
|
|
|
91
91
|
},
|
|
92
92
|
search: {
|
|
93
93
|
type: "string",
|
|
94
|
-
description: "Search query for
|
|
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
95
|
}
|
|
96
96
|
}
|
|
97
97
|
},
|
|
@@ -211,6 +211,60 @@ export const proposalsTool: MCPTool = {
|
|
|
211
211
|
}
|
|
212
212
|
}
|
|
213
213
|
|
|
214
|
+
/**
|
|
215
|
+
* Read-only version of the proposals tool for AI assistant.
|
|
216
|
+
* Only exposes list and get operations - no create/update/delete.
|
|
217
|
+
* Creating proposals should be done by coding agents (Claude Code, Cursor, etc.) or via the UI.
|
|
218
|
+
*/
|
|
219
|
+
export const proposalsReadOnlyTool: MCPTool = {
|
|
220
|
+
name: "change_proposals",
|
|
221
|
+
description: "READ-ONLY: Search and read change proposals. You can ONLY use 'list' and 'get' operations. You CANNOT create, update, or delete proposals — that should be done by coding agents (Claude Code, Cursor, etc.) which have broader codebase context, or via the Proposals UI.",
|
|
222
|
+
parameters: {
|
|
223
|
+
type: "object",
|
|
224
|
+
properties: {
|
|
225
|
+
operation: {
|
|
226
|
+
type: "string",
|
|
227
|
+
enum: ["list", "get"],
|
|
228
|
+
description: "ONLY 'list' or 'get' are allowed. 'list' to search/browse proposals, 'get' to retrieve a specific proposal by ID"
|
|
229
|
+
},
|
|
230
|
+
id: {
|
|
231
|
+
type: "string",
|
|
232
|
+
description: "Proposal ID (required for get operation)"
|
|
233
|
+
},
|
|
234
|
+
filters: {
|
|
235
|
+
type: "object",
|
|
236
|
+
description: "Filters for list operation. Use search to find proposals by keyword.",
|
|
237
|
+
properties: {
|
|
238
|
+
status: {
|
|
239
|
+
type: "string",
|
|
240
|
+
enum: ["draft", "proposed", "in-review", "code-complete", "approved", "merged", "rejected"],
|
|
241
|
+
description: "Filter by proposal status"
|
|
242
|
+
},
|
|
243
|
+
author: {
|
|
244
|
+
type: "string",
|
|
245
|
+
description: "Filter by author name or email"
|
|
246
|
+
},
|
|
247
|
+
priority: {
|
|
248
|
+
type: "string",
|
|
249
|
+
enum: ["low", "medium", "high", "critical"],
|
|
250
|
+
description: "Filter by priority level"
|
|
251
|
+
},
|
|
252
|
+
tags: {
|
|
253
|
+
type: "array",
|
|
254
|
+
items: { type: "string" },
|
|
255
|
+
description: "Filter by tags"
|
|
256
|
+
},
|
|
257
|
+
search: {
|
|
258
|
+
type: "string",
|
|
259
|
+
description: "Search query to filter proposals by intent, content, author, or tags"
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
},
|
|
264
|
+
required: ["operation"]
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
|
|
214
268
|
export function validateProposalData(data: any): Partial<ChangeProposal> {
|
|
215
269
|
const proposal: Partial<ChangeProposal> = {}
|
|
216
270
|
|