@crowley/rag-mcp 1.0.5 → 1.0.6
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/annotations.d.ts +16 -0
- package/dist/annotations.js +158 -0
- package/dist/context-enrichment.js +7 -0
- package/dist/formatters.d.ts +2 -0
- package/dist/formatters.js +12 -0
- package/dist/index.js +46 -47
- package/dist/schemas.d.ts +97 -0
- package/dist/schemas.js +128 -0
- package/dist/tool-middleware.d.ts +40 -0
- package/dist/tool-middleware.js +216 -0
- package/dist/tool-registry.js +2 -1
- package/dist/tools/advanced.d.ts +2 -2
- package/dist/tools/advanced.js +200 -275
- package/dist/tools/agents.d.ts +2 -2
- package/dist/tools/agents.js +59 -78
- package/dist/tools/analytics.d.ts +2 -2
- package/dist/tools/analytics.js +170 -210
- package/dist/tools/architecture.d.ts +2 -2
- package/dist/tools/architecture.js +506 -669
- package/dist/tools/ask.d.ts +2 -2
- package/dist/tools/ask.js +164 -219
- package/dist/tools/cache.d.ts +2 -2
- package/dist/tools/cache.js +63 -82
- package/dist/tools/clustering.d.ts +2 -2
- package/dist/tools/clustering.js +154 -215
- package/dist/tools/confluence.d.ts +2 -2
- package/dist/tools/confluence.js +80 -116
- package/dist/tools/database.d.ts +2 -2
- package/dist/tools/database.js +303 -380
- package/dist/tools/feedback.d.ts +2 -2
- package/dist/tools/feedback.js +143 -184
- package/dist/tools/guidelines.d.ts +2 -2
- package/dist/tools/guidelines.js +123 -135
- package/dist/tools/indexing.d.ts +2 -2
- package/dist/tools/indexing.js +100 -108
- package/dist/tools/memory.d.ts +2 -2
- package/dist/tools/memory.js +299 -485
- package/dist/tools/pm.d.ts +2 -2
- package/dist/tools/pm.js +367 -615
- package/dist/tools/review.d.ts +2 -2
- package/dist/tools/review.js +142 -189
- package/dist/tools/search.d.ts +2 -2
- package/dist/tools/search.js +230 -305
- package/dist/tools/session.d.ts +2 -2
- package/dist/tools/session.js +288 -345
- package/dist/tools/suggestions.d.ts +2 -2
- package/dist/tools/suggestions.js +425 -512
- package/dist/types.d.ts +19 -2
- package/package.json +4 -2
package/dist/types.d.ts
CHANGED
|
@@ -2,7 +2,9 @@
|
|
|
2
2
|
* Shared types for the MCP server tool modules.
|
|
3
3
|
*/
|
|
4
4
|
import type { AxiosInstance } from "axios";
|
|
5
|
-
|
|
5
|
+
import type { ZodObject, ZodRawShape } from "zod";
|
|
6
|
+
import type { ToolAnnotations } from "./annotations.js";
|
|
7
|
+
/** MCP tool input schema shape (raw JSON Schema) */
|
|
6
8
|
export interface ToolInputSchema {
|
|
7
9
|
type: "object";
|
|
8
10
|
properties: Record<string, unknown>;
|
|
@@ -13,6 +15,7 @@ export interface ToolDefinition {
|
|
|
13
15
|
name: string;
|
|
14
16
|
description: string;
|
|
15
17
|
inputSchema: ToolInputSchema;
|
|
18
|
+
annotations?: ToolAnnotations;
|
|
16
19
|
}
|
|
17
20
|
/** Context passed to every tool handler */
|
|
18
21
|
export interface ToolContext {
|
|
@@ -23,10 +26,24 @@ export interface ToolContext {
|
|
|
23
26
|
activeSessionId?: string;
|
|
24
27
|
enrichmentEnabled: boolean;
|
|
25
28
|
}
|
|
29
|
+
/** A handler result: plain text OR text + structured data for outputSchema */
|
|
30
|
+
export type ToolHandlerResult = string | {
|
|
31
|
+
text: string;
|
|
32
|
+
structured: Record<string, unknown>;
|
|
33
|
+
};
|
|
26
34
|
/** A tool handler function */
|
|
27
|
-
export type ToolHandler = (args: Record<string, unknown>, ctx: ToolContext) => Promise<
|
|
35
|
+
export type ToolHandler = (args: Record<string, unknown>, ctx: ToolContext) => Promise<ToolHandlerResult>;
|
|
28
36
|
/** A tool module exports definitions and handlers */
|
|
29
37
|
export interface ToolModule {
|
|
30
38
|
tools: ToolDefinition[];
|
|
31
39
|
handlers: Record<string, ToolHandler>;
|
|
32
40
|
}
|
|
41
|
+
/** Phase 3 tool spec: schema + handler colocated per tool */
|
|
42
|
+
export interface ToolSpec {
|
|
43
|
+
name: string;
|
|
44
|
+
description: string;
|
|
45
|
+
schema: ZodObject<ZodRawShape>;
|
|
46
|
+
outputSchema?: ZodObject<ZodRawShape>;
|
|
47
|
+
annotations?: ToolAnnotations;
|
|
48
|
+
handler: ToolHandler;
|
|
49
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@crowley/rag-mcp",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.6",
|
|
4
4
|
"description": "Universal RAG MCP Server for any project",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -32,7 +32,9 @@
|
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"@modelcontextprotocol/sdk": "^1.0.0",
|
|
34
34
|
"axios": "^1.6.0",
|
|
35
|
-
"glob": "^11.0.0"
|
|
35
|
+
"glob": "^11.0.0",
|
|
36
|
+
"zod": "^3.25.76",
|
|
37
|
+
"zod-to-json-schema": "^3.25.1"
|
|
36
38
|
},
|
|
37
39
|
"devDependencies": {
|
|
38
40
|
"@types/node": "^20.10.0",
|