research-powerpack-mcp 3.3.2 → 3.4.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 +43 -0
- package/dist/config/index.d.ts +1 -1
- package/dist/config/index.d.ts.map +1 -1
- package/dist/config/loader.d.ts +40 -0
- package/dist/config/loader.d.ts.map +1 -0
- package/dist/config/loader.js +300 -0
- package/dist/config/loader.js.map +1 -0
- package/dist/config/types.d.ts +80 -0
- package/dist/config/types.d.ts.map +1 -0
- package/dist/config/types.js +6 -0
- package/dist/config/types.js.map +1 -0
- package/dist/config/yaml/tools.yaml +617 -0
- package/dist/index.js +13 -122
- package/dist/index.js.map +1 -1
- package/dist/schemas/web-search.js +2 -2
- package/dist/schemas/web-search.js.map +1 -1
- package/dist/tools/definitions.d.ts +12 -62
- package/dist/tools/definitions.d.ts.map +1 -1
- package/dist/tools/definitions.js +13 -159
- package/dist/tools/definitions.js.map +1 -1
- package/dist/tools/registry.d.ts +71 -0
- package/dist/tools/registry.d.ts.map +1 -0
- package/dist/tools/registry.js +238 -0
- package/dist/tools/registry.js.map +1 -0
- package/dist/tools/utils.d.ts +92 -0
- package/dist/tools/utils.d.ts.map +1 -0
- package/dist/tools/utils.js +142 -0
- package/dist/tools/utils.js.map +1 -0
- package/package.json +3 -2
package/README.md
CHANGED
|
@@ -624,6 +624,49 @@ npm run typecheck
|
|
|
624
624
|
|
|
625
625
|
---
|
|
626
626
|
|
|
627
|
+
## 🏗️ Architecture (v3.4.0+)
|
|
628
|
+
|
|
629
|
+
The codebase uses a **YAML-driven configuration system** with **aggressive LLM optimization** (v3.5.0+):
|
|
630
|
+
|
|
631
|
+
### Core Architecture
|
|
632
|
+
|
|
633
|
+
| Component | File | Purpose |
|
|
634
|
+
|-----------|------|---------|
|
|
635
|
+
| **Tool Definitions** | `src/config/yaml/tools.yaml` | Single source of truth for all tool metadata |
|
|
636
|
+
| **Handler Registry** | `src/tools/registry.ts` | Declarative tool registration + `executeTool` wrapper |
|
|
637
|
+
| **YAML Loader** | `src/config/loader.ts` | Parses YAML, generates MCP-compatible definitions |
|
|
638
|
+
| **Shared Utils** | `src/tools/utils.ts` | Common utility functions |
|
|
639
|
+
|
|
640
|
+
**Adding a new tool:**
|
|
641
|
+
1. Add tool definition to `tools.yaml`
|
|
642
|
+
2. Create handler in `src/tools/`
|
|
643
|
+
3. Register in `src/tools/registry.ts`
|
|
644
|
+
|
|
645
|
+
See `docs/refactoring/04-migration-guide.md` for detailed instructions.
|
|
646
|
+
|
|
647
|
+
### LLM Optimization (v3.5.0+)
|
|
648
|
+
|
|
649
|
+
All tools include **aggressive guidance** to force LLMs to use them optimally:
|
|
650
|
+
|
|
651
|
+
| Feature | Description |
|
|
652
|
+
|---------|-------------|
|
|
653
|
+
| **Configurable Limits** | All min/max values in YAML (`limits` section) |
|
|
654
|
+
| **BAD vs GOOD Examples** | Every tool shows anti-patterns and perfect usage |
|
|
655
|
+
| **Aggressive Phrasing** | Changed from "you can" to "you MUST" |
|
|
656
|
+
| **Visual Formatting** | Emoji headers (🔥), section dividers (━━━), icons (📊🎯❌✅) |
|
|
657
|
+
| **Templates** | Structured formats for questions, extractions, file descriptions |
|
|
658
|
+
|
|
659
|
+
**Key Enhancements:**
|
|
660
|
+
- `search_reddit`: Minimum 10 queries (was 3), 10-category formula
|
|
661
|
+
- `deep_research`: 7-section question template, file attachment requirements
|
|
662
|
+
- `scrape_links`: Extraction template with OR statements, use_llm=true push
|
|
663
|
+
- `web_search`: Minimum 3 keywords, search operator examples
|
|
664
|
+
- `file_attachments`: Numbered 5-section description template
|
|
665
|
+
|
|
666
|
+
See `docs/refactoring/07-llm-optimization-summary.md` for full details.
|
|
667
|
+
|
|
668
|
+
---
|
|
669
|
+
|
|
627
670
|
## 🔥 Common Issues & Quick Fixes
|
|
628
671
|
|
|
629
672
|
<details>
|
package/dist/config/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/config/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAoDH,UAAU,SAAS;IACjB,eAAe,EAAE,MAAM,CAAC;IACxB,cAAc,EAAE,MAAM,GAAG,SAAS,CAAC;IACnC,gBAAgB,EAAE,MAAM,GAAG,SAAS,CAAC;IACrC,oBAAoB,EAAE,MAAM,GAAG,SAAS,CAAC;CAC1C;AAED,wBAAgB,QAAQ,IAAI,SAAS,CAOpC;AAMD,eAAO,MAAM,QAAQ;;;;;;;;CAUX,CAAC;AAQX,eAAO,MAAM,MAAM;;;;CAIT,CAAC;AAMX,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/config/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAoDH,UAAU,SAAS;IACjB,eAAe,EAAE,MAAM,CAAC;IACxB,cAAc,EAAE,MAAM,GAAG,SAAS,CAAC;IACnC,gBAAgB,EAAE,MAAM,GAAG,SAAS,CAAC;IACrC,oBAAoB,EAAE,MAAM,GAAG,SAAS,CAAC;CAC1C;AAED,wBAAgB,QAAQ,IAAI,SAAS,CAOpC;AAMD,eAAO,MAAM,QAAQ;;;;;;;;CAUX,CAAC;AAQX,eAAO,MAAM,MAAM;;;;CAIT,CAAC;AAMX,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,OAAO,CAAC;IAChB,MAAM,EAAE,OAAO,CAAC;IAChB,QAAQ,EAAE,OAAO,CAAC;IAClB,YAAY,EAAE,OAAO,CAAC;IACtB,aAAa,EAAE,OAAO,CAAC;CACxB;AAED,wBAAgB,eAAe,IAAI,YAAY,CAS9C;AAED,wBAAgB,oBAAoB,CAAC,UAAU,EAAE,MAAM,YAAY,GAAG,MAAM,CAS3E;AAMD,eAAO,MAAM,OAAO;;;;;;;;;CASV,CAAC;AAMX,eAAO,MAAM,MAAM;;;;;;;;;CAST,CAAC;AAMX,eAAO,MAAM,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAWrC,CAAC;AAMX,eAAO,MAAM,cAAc;;;;CAIjB,CAAC"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* YAML Configuration Loader
|
|
3
|
+
* Loads tools.yaml and generates MCP-compatible tool definitions
|
|
4
|
+
*/
|
|
5
|
+
import { z } from 'zod';
|
|
6
|
+
import type { YamlConfig, YamlToolConfig, YamlParameter, McpTool, LoadedTool } from './types.js';
|
|
7
|
+
/**
|
|
8
|
+
* Recursively convert YAML parameter to Zod schema
|
|
9
|
+
*/
|
|
10
|
+
declare function yamlParamToZod(param: YamlParameter): z.ZodTypeAny;
|
|
11
|
+
/**
|
|
12
|
+
* Convert YAML parameters to Zod object schema
|
|
13
|
+
*/
|
|
14
|
+
declare function yamlParamsToZodSchema(params: Record<string, YamlParameter>): z.ZodObject<Record<string, z.ZodTypeAny>>;
|
|
15
|
+
/**
|
|
16
|
+
* Load and parse tools.yaml
|
|
17
|
+
*/
|
|
18
|
+
export declare function loadYamlConfig(): YamlConfig;
|
|
19
|
+
/**
|
|
20
|
+
* Load all tools from YAML configuration
|
|
21
|
+
*/
|
|
22
|
+
export declare function loadToolsFromYaml(): LoadedTool[];
|
|
23
|
+
/**
|
|
24
|
+
* Get tool configuration by name
|
|
25
|
+
*/
|
|
26
|
+
export declare function getToolConfig(name: string): YamlToolConfig | undefined;
|
|
27
|
+
/**
|
|
28
|
+
* Get schema descriptions for a tool (for injecting into existing Zod schemas)
|
|
29
|
+
*/
|
|
30
|
+
export declare function getSchemaDescriptions(name: string): Record<string, string> | undefined;
|
|
31
|
+
/**
|
|
32
|
+
* Get Zod schema by reference name
|
|
33
|
+
*/
|
|
34
|
+
export declare function getZodSchemaByRef(ref: string): z.ZodTypeAny | undefined;
|
|
35
|
+
/**
|
|
36
|
+
* Generate complete MCP tools list with all schemas resolved
|
|
37
|
+
*/
|
|
38
|
+
export declare function generateMcpTools(): McpTool[];
|
|
39
|
+
export { yamlParamsToZodSchema, yamlParamToZod };
|
|
40
|
+
//# sourceMappingURL=loader.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"loader.d.ts","sourceRoot":"","sources":["../../src/config/loader.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAMH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,KAAK,EACV,UAAU,EACV,cAAc,EACd,aAAa,EAEb,OAAO,EACP,UAAU,EACX,MAAM,YAAY,CAAC;AA2DpB;;GAEG;AACH,iBAAS,cAAc,CAAC,KAAK,EAAE,aAAa,GAAG,CAAC,CAAC,UAAU,CAqE1D;AAED;;GAEG;AACH,iBAAS,qBAAqB,CAC5B,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,GACpC,CAAC,CAAC,SAAS,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC,UAAU,CAAC,CAAC,CAU3C;AAyBD;;GAEG;AACH,wBAAgB,cAAc,IAAI,UAAU,CAI3C;AAwCD;;GAEG;AACH,wBAAgB,iBAAiB,IAAI,UAAU,EAAE,CAYhD;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,cAAc,GAAG,SAAS,CAGtE;AAED;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,SAAS,CAGtF;AAmBD;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,MAAM,GAAG,CAAC,CAAC,UAAU,GAAG,SAAS,CAEvE;AAED;;GAEG;AACH,wBAAgB,gBAAgB,IAAI,OAAO,EAAE,CA+B5C;AAMD,OAAO,EAAE,qBAAqB,EAAE,cAAc,EAAE,CAAC"}
|
|
@@ -0,0 +1,300 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* YAML Configuration Loader
|
|
3
|
+
* Loads tools.yaml and generates MCP-compatible tool definitions
|
|
4
|
+
*/
|
|
5
|
+
import { readFileSync } from 'fs';
|
|
6
|
+
import { fileURLToPath } from 'url';
|
|
7
|
+
import { dirname, join } from 'path';
|
|
8
|
+
import { parse as parseYaml } from 'yaml';
|
|
9
|
+
import { z } from 'zod';
|
|
10
|
+
import { zodToJsonSchema } from 'zod-to-json-schema';
|
|
11
|
+
// Get directory of this file for relative YAML path
|
|
12
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
13
|
+
const __dirname = dirname(__filename);
|
|
14
|
+
// ============================================================================
|
|
15
|
+
// YAML to Zod Schema Conversion
|
|
16
|
+
// ============================================================================
|
|
17
|
+
/**
|
|
18
|
+
* Convert YAML validation rules to Zod string schema
|
|
19
|
+
*/
|
|
20
|
+
function applyStringValidation(schema, validation) {
|
|
21
|
+
if (!validation)
|
|
22
|
+
return schema;
|
|
23
|
+
let result = schema;
|
|
24
|
+
if (validation.minLength !== undefined)
|
|
25
|
+
result = result.min(validation.minLength);
|
|
26
|
+
if (validation.maxLength !== undefined)
|
|
27
|
+
result = result.max(validation.maxLength);
|
|
28
|
+
if (validation.pattern)
|
|
29
|
+
result = result.regex(new RegExp(validation.pattern));
|
|
30
|
+
if (validation.format === 'uri')
|
|
31
|
+
result = result.url();
|
|
32
|
+
if (validation.format === 'email')
|
|
33
|
+
result = result.email();
|
|
34
|
+
if (validation.format === 'uuid')
|
|
35
|
+
result = result.uuid();
|
|
36
|
+
return result;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Convert YAML validation rules to Zod number schema
|
|
40
|
+
*/
|
|
41
|
+
function applyNumberValidation(schema, validation) {
|
|
42
|
+
if (!validation)
|
|
43
|
+
return schema;
|
|
44
|
+
let result = schema;
|
|
45
|
+
if (validation.min !== undefined)
|
|
46
|
+
result = result.min(validation.min);
|
|
47
|
+
if (validation.max !== undefined)
|
|
48
|
+
result = result.max(validation.max);
|
|
49
|
+
if (validation.int)
|
|
50
|
+
result = result.int();
|
|
51
|
+
if (validation.positive)
|
|
52
|
+
result = result.positive();
|
|
53
|
+
if (validation.negative)
|
|
54
|
+
result = result.negative();
|
|
55
|
+
return result;
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Convert YAML validation rules to Zod array schema
|
|
59
|
+
*/
|
|
60
|
+
function applyArrayValidation(schema, validation) {
|
|
61
|
+
if (!validation)
|
|
62
|
+
return schema;
|
|
63
|
+
let result = schema;
|
|
64
|
+
if (validation.minItems !== undefined)
|
|
65
|
+
result = result.min(validation.minItems);
|
|
66
|
+
if (validation.maxItems !== undefined)
|
|
67
|
+
result = result.max(validation.maxItems);
|
|
68
|
+
return result;
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* Recursively convert YAML parameter to Zod schema
|
|
72
|
+
*/
|
|
73
|
+
function yamlParamToZod(param) {
|
|
74
|
+
let schema;
|
|
75
|
+
switch (param.type) {
|
|
76
|
+
case 'string': {
|
|
77
|
+
let strSchema = z.string();
|
|
78
|
+
strSchema = applyStringValidation(strSchema, param.validation);
|
|
79
|
+
if (param.description)
|
|
80
|
+
strSchema = strSchema.describe(param.description);
|
|
81
|
+
schema = strSchema;
|
|
82
|
+
break;
|
|
83
|
+
}
|
|
84
|
+
case 'number': {
|
|
85
|
+
let numSchema = z.number();
|
|
86
|
+
numSchema = applyNumberValidation(numSchema, param.validation);
|
|
87
|
+
if (param.description)
|
|
88
|
+
numSchema = numSchema.describe(param.description);
|
|
89
|
+
schema = numSchema;
|
|
90
|
+
break;
|
|
91
|
+
}
|
|
92
|
+
case 'boolean': {
|
|
93
|
+
let boolSchema = z.boolean();
|
|
94
|
+
if (param.description)
|
|
95
|
+
boolSchema = boolSchema.describe(param.description);
|
|
96
|
+
schema = boolSchema;
|
|
97
|
+
break;
|
|
98
|
+
}
|
|
99
|
+
case 'array': {
|
|
100
|
+
if (!param.items) {
|
|
101
|
+
throw new Error('Array parameter must have items definition');
|
|
102
|
+
}
|
|
103
|
+
const itemSchema = yamlParamToZod(param.items);
|
|
104
|
+
let arrSchema = z.array(itemSchema);
|
|
105
|
+
arrSchema = applyArrayValidation(arrSchema, param.validation);
|
|
106
|
+
if (param.description)
|
|
107
|
+
arrSchema = arrSchema.describe(param.description);
|
|
108
|
+
schema = arrSchema;
|
|
109
|
+
break;
|
|
110
|
+
}
|
|
111
|
+
case 'object': {
|
|
112
|
+
if (!param.properties) {
|
|
113
|
+
throw new Error('Object parameter must have properties definition');
|
|
114
|
+
}
|
|
115
|
+
const shape = {};
|
|
116
|
+
for (const [key, propDef] of Object.entries(param.properties)) {
|
|
117
|
+
let propSchema = yamlParamToZod(propDef);
|
|
118
|
+
if (propDef.required === false) {
|
|
119
|
+
propSchema = propSchema.optional();
|
|
120
|
+
}
|
|
121
|
+
shape[key] = propSchema;
|
|
122
|
+
}
|
|
123
|
+
let objSchema = z.object(shape);
|
|
124
|
+
if (param.description)
|
|
125
|
+
objSchema = objSchema.describe(param.description);
|
|
126
|
+
schema = objSchema;
|
|
127
|
+
break;
|
|
128
|
+
}
|
|
129
|
+
default:
|
|
130
|
+
throw new Error(`Unknown parameter type: ${param.type}`);
|
|
131
|
+
}
|
|
132
|
+
// Apply optional/default
|
|
133
|
+
if (param.required === false && param.default !== undefined) {
|
|
134
|
+
schema = schema.default(param.default);
|
|
135
|
+
}
|
|
136
|
+
else if (param.required === false) {
|
|
137
|
+
schema = schema.optional();
|
|
138
|
+
}
|
|
139
|
+
return schema;
|
|
140
|
+
}
|
|
141
|
+
/**
|
|
142
|
+
* Convert YAML parameters to Zod object schema
|
|
143
|
+
*/
|
|
144
|
+
function yamlParamsToZodSchema(params) {
|
|
145
|
+
const shape = {};
|
|
146
|
+
for (const [key, param] of Object.entries(params)) {
|
|
147
|
+
let schema = yamlParamToZod(param);
|
|
148
|
+
// Note: required is handled in yamlParamToZod via optional()
|
|
149
|
+
shape[key] = schema;
|
|
150
|
+
}
|
|
151
|
+
return z.object(shape);
|
|
152
|
+
}
|
|
153
|
+
/**
|
|
154
|
+
* Convert Zod schema to JSON Schema for MCP inputSchema
|
|
155
|
+
*/
|
|
156
|
+
function zodToMcpInputSchema(schema) {
|
|
157
|
+
const jsonSchema = zodToJsonSchema(schema, { $refStrategy: 'none' });
|
|
158
|
+
// Extract properties and required from JSON Schema
|
|
159
|
+
if (typeof jsonSchema === 'object' && jsonSchema !== null) {
|
|
160
|
+
const obj = jsonSchema;
|
|
161
|
+
return {
|
|
162
|
+
type: 'object',
|
|
163
|
+
properties: obj.properties || {},
|
|
164
|
+
required: obj.required,
|
|
165
|
+
};
|
|
166
|
+
}
|
|
167
|
+
return { type: 'object', properties: {} };
|
|
168
|
+
}
|
|
169
|
+
// ============================================================================
|
|
170
|
+
// Tool Loading
|
|
171
|
+
// ============================================================================
|
|
172
|
+
/**
|
|
173
|
+
* Load and parse tools.yaml
|
|
174
|
+
*/
|
|
175
|
+
export function loadYamlConfig() {
|
|
176
|
+
const yamlPath = join(__dirname, 'yaml', 'tools.yaml');
|
|
177
|
+
const yamlContent = readFileSync(yamlPath, 'utf8');
|
|
178
|
+
return parseYaml(yamlContent);
|
|
179
|
+
}
|
|
180
|
+
/**
|
|
181
|
+
* Convert a single YAML tool config to MCP Tool
|
|
182
|
+
* For tools with inline parameters only
|
|
183
|
+
*/
|
|
184
|
+
function yamlToolToMcpTool(toolConfig) {
|
|
185
|
+
if (!toolConfig.parameters) {
|
|
186
|
+
throw new Error(`Tool ${toolConfig.name} must have parameters or useZodSchema`);
|
|
187
|
+
}
|
|
188
|
+
const zodSchema = yamlParamsToZodSchema(toolConfig.parameters);
|
|
189
|
+
const inputSchema = zodToMcpInputSchema(zodSchema);
|
|
190
|
+
return {
|
|
191
|
+
name: toolConfig.name,
|
|
192
|
+
description: toolConfig.description.trim(),
|
|
193
|
+
inputSchema,
|
|
194
|
+
category: toolConfig.category,
|
|
195
|
+
capability: toolConfig.capability,
|
|
196
|
+
useZodSchema: false,
|
|
197
|
+
};
|
|
198
|
+
}
|
|
199
|
+
/**
|
|
200
|
+
* Create placeholder for tools using existing Zod schemas
|
|
201
|
+
* These will be enriched with actual schemas at runtime
|
|
202
|
+
*/
|
|
203
|
+
function createZodSchemaPlaceholder(toolConfig) {
|
|
204
|
+
return {
|
|
205
|
+
name: toolConfig.name,
|
|
206
|
+
description: toolConfig.description.trim(),
|
|
207
|
+
inputSchema: { type: 'object', properties: {} }, // Placeholder
|
|
208
|
+
category: toolConfig.category,
|
|
209
|
+
capability: toolConfig.capability,
|
|
210
|
+
useZodSchema: true,
|
|
211
|
+
zodSchemaRef: toolConfig.zodSchemaRef,
|
|
212
|
+
};
|
|
213
|
+
}
|
|
214
|
+
/**
|
|
215
|
+
* Load all tools from YAML configuration
|
|
216
|
+
*/
|
|
217
|
+
export function loadToolsFromYaml() {
|
|
218
|
+
const config = loadYamlConfig();
|
|
219
|
+
return config.tools.map((toolConfig) => {
|
|
220
|
+
if (toolConfig.useZodSchema) {
|
|
221
|
+
// Tool uses existing Zod schema - return placeholder
|
|
222
|
+
return createZodSchemaPlaceholder(toolConfig);
|
|
223
|
+
}
|
|
224
|
+
else {
|
|
225
|
+
// Tool has inline parameters - generate schema from YAML
|
|
226
|
+
return yamlToolToMcpTool(toolConfig);
|
|
227
|
+
}
|
|
228
|
+
});
|
|
229
|
+
}
|
|
230
|
+
/**
|
|
231
|
+
* Get tool configuration by name
|
|
232
|
+
*/
|
|
233
|
+
export function getToolConfig(name) {
|
|
234
|
+
const config = loadYamlConfig();
|
|
235
|
+
return config.tools.find((t) => t.name === name);
|
|
236
|
+
}
|
|
237
|
+
/**
|
|
238
|
+
* Get schema descriptions for a tool (for injecting into existing Zod schemas)
|
|
239
|
+
*/
|
|
240
|
+
export function getSchemaDescriptions(name) {
|
|
241
|
+
const tool = getToolConfig(name);
|
|
242
|
+
return tool?.schemaDescriptions;
|
|
243
|
+
}
|
|
244
|
+
// ============================================================================
|
|
245
|
+
// Zod Schema Registry (for tools using existing schemas)
|
|
246
|
+
// ============================================================================
|
|
247
|
+
import { deepResearchParamsSchema } from '../schemas/deep-research.js';
|
|
248
|
+
import { scrapeLinksParamsSchema } from '../schemas/scrape-links.js';
|
|
249
|
+
import { webSearchParamsSchema } from '../schemas/web-search.js';
|
|
250
|
+
/**
|
|
251
|
+
* Registry of existing Zod schemas for complex tools
|
|
252
|
+
*/
|
|
253
|
+
const zodSchemaRegistry = {
|
|
254
|
+
deepResearchParamsSchema,
|
|
255
|
+
scrapeLinksParamsSchema,
|
|
256
|
+
webSearchParamsSchema,
|
|
257
|
+
};
|
|
258
|
+
/**
|
|
259
|
+
* Get Zod schema by reference name
|
|
260
|
+
*/
|
|
261
|
+
export function getZodSchemaByRef(ref) {
|
|
262
|
+
return zodSchemaRegistry[ref];
|
|
263
|
+
}
|
|
264
|
+
/**
|
|
265
|
+
* Generate complete MCP tools list with all schemas resolved
|
|
266
|
+
*/
|
|
267
|
+
export function generateMcpTools() {
|
|
268
|
+
const loadedTools = loadToolsFromYaml();
|
|
269
|
+
return loadedTools.map((tool) => {
|
|
270
|
+
if (tool.useZodSchema && tool.zodSchemaRef) {
|
|
271
|
+
// Resolve the actual Zod schema
|
|
272
|
+
const schema = getZodSchemaByRef(tool.zodSchemaRef);
|
|
273
|
+
if (!schema) {
|
|
274
|
+
console.error(`[Loader] Schema not found: ${tool.zodSchemaRef}`);
|
|
275
|
+
return {
|
|
276
|
+
name: tool.name,
|
|
277
|
+
description: tool.description,
|
|
278
|
+
inputSchema: { type: 'object', properties: {} },
|
|
279
|
+
};
|
|
280
|
+
}
|
|
281
|
+
const inputSchema = zodToMcpInputSchema(schema);
|
|
282
|
+
return {
|
|
283
|
+
name: tool.name,
|
|
284
|
+
description: tool.description,
|
|
285
|
+
inputSchema,
|
|
286
|
+
};
|
|
287
|
+
}
|
|
288
|
+
// Tool already has generated inputSchema
|
|
289
|
+
return {
|
|
290
|
+
name: tool.name,
|
|
291
|
+
description: tool.description,
|
|
292
|
+
inputSchema: tool.inputSchema,
|
|
293
|
+
};
|
|
294
|
+
});
|
|
295
|
+
}
|
|
296
|
+
// ============================================================================
|
|
297
|
+
// Exports
|
|
298
|
+
// ============================================================================
|
|
299
|
+
export { yamlParamsToZodSchema, yamlParamToZod };
|
|
300
|
+
//# sourceMappingURL=loader.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"loader.js","sourceRoot":"","sources":["../../src/config/loader.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,IAAI,CAAC;AAClC,OAAO,EAAE,aAAa,EAAE,MAAM,KAAK,CAAC;AACpC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AACrC,OAAO,EAAE,KAAK,IAAI,SAAS,EAAE,MAAM,MAAM,CAAC;AAC1C,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAWrD,oDAAoD;AACpD,MAAM,UAAU,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAClD,MAAM,SAAS,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;AAEtC,+EAA+E;AAC/E,gCAAgC;AAChC,+EAA+E;AAE/E;;GAEG;AACH,SAAS,qBAAqB,CAAC,MAAmB,EAAE,UAA2B;IAC7E,IAAI,CAAC,UAAU;QAAE,OAAO,MAAM,CAAC;IAE/B,IAAI,MAAM,GAAG,MAAM,CAAC;IACpB,IAAI,UAAU,CAAC,SAAS,KAAK,SAAS;QAAE,MAAM,GAAG,MAAM,CAAC,GAAG,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC;IAClF,IAAI,UAAU,CAAC,SAAS,KAAK,SAAS;QAAE,MAAM,GAAG,MAAM,CAAC,GAAG,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC;IAClF,IAAI,UAAU,CAAC,OAAO;QAAE,MAAM,GAAG,MAAM,CAAC,KAAK,CAAC,IAAI,MAAM,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC,CAAC;IAC9E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AC9B,MAAM,WAAW,GAAG,iBAAiB,EAAE,CAAC;IAExC,OAAO,WAAW,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE;QAC9B,IAAI,IAAI,CAAC,YAAY,IAAI,IAAI,CAAC,YAAY,EAAE,CAAC;YAC3C,gCAAgC;YAChC,MAAM,MAAM,GAAG,iBAAiB,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;YACpD,IAAI,CAAC,MAAM,EAAE,CAAC;gBACZ,OAAO,CAAC,KAAK,CAAC,8BAA8B,IAAI,CAAC,YAAY,EAAE,CAAC,CAAC;gBACjE,OAAO;oBACL,IAAI,EAAE,IAAI,CAAC,IAAI;oBACf,WAAW,EAAE,IAAI,CAAC,WAAW;oBAC7B,WAAW,EAAE,EAAE,IAAI,EAAE,QAAiB,EAAE,UAAU,EAAE,EAAE,EAAE;iBACzD,CAAC;YACJ,CAAC;YAED,MAAM,WAAW,GAAG,mBAAmB,CAAC,MAAM,CAAC,CAAC;YAChD,OAAO;gBACL,IAAI,EAAE,IAAI,CAAC,IAAI;gBACf,WAAW,EAAE,IAAI,CAAC,WAAW;gBAC7B,WAAW;aACZ,CAAC;QACJ,CAAC;QAED,yCAAyC;QACzC,OAAO;YACL,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,WAAW,EAAE,IAAI,CAAC,WAAW;YAC7B,WAAW,EAAE,IAAI,CAAC,WAAW;SAC9B,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC;AAED,+EAA+E;AAC/E,UAAU;AACV,+EAA+E;AAE/E,OAAO,EAAE,qBAAqB,EAAE,cAAc,EAAE,CAAC"}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* TypeScript interfaces for YAML tool configuration
|
|
3
|
+
* Matches structure defined in yaml/tools.yaml
|
|
4
|
+
*/
|
|
5
|
+
import type { Capabilities } from './index.js';
|
|
6
|
+
/**
|
|
7
|
+
* Validation rules for parameters
|
|
8
|
+
*/
|
|
9
|
+
export interface YamlValidation {
|
|
10
|
+
minLength?: number;
|
|
11
|
+
maxLength?: number;
|
|
12
|
+
pattern?: string;
|
|
13
|
+
format?: 'uri' | 'email' | 'uuid';
|
|
14
|
+
min?: number;
|
|
15
|
+
max?: number;
|
|
16
|
+
int?: boolean;
|
|
17
|
+
positive?: boolean;
|
|
18
|
+
negative?: boolean;
|
|
19
|
+
minItems?: number;
|
|
20
|
+
maxItems?: number;
|
|
21
|
+
nonempty?: boolean;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Parameter definition in YAML
|
|
25
|
+
*/
|
|
26
|
+
export interface YamlParameter {
|
|
27
|
+
type: 'string' | 'number' | 'boolean' | 'array' | 'object';
|
|
28
|
+
required?: boolean;
|
|
29
|
+
default?: unknown;
|
|
30
|
+
description?: string;
|
|
31
|
+
validation?: YamlValidation;
|
|
32
|
+
items?: YamlParameter;
|
|
33
|
+
properties?: Record<string, YamlParameter>;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Tool definition in YAML
|
|
37
|
+
*/
|
|
38
|
+
export interface YamlToolConfig {
|
|
39
|
+
name: string;
|
|
40
|
+
category?: string;
|
|
41
|
+
capability?: keyof Capabilities;
|
|
42
|
+
description: string;
|
|
43
|
+
parameters?: Record<string, YamlParameter>;
|
|
44
|
+
useZodSchema?: boolean;
|
|
45
|
+
zodSchemaRef?: string;
|
|
46
|
+
schemaDescriptions?: Record<string, string>;
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Root YAML configuration structure
|
|
50
|
+
*/
|
|
51
|
+
export interface YamlConfig {
|
|
52
|
+
version: string;
|
|
53
|
+
metadata: {
|
|
54
|
+
name: string;
|
|
55
|
+
description: string;
|
|
56
|
+
};
|
|
57
|
+
tools: YamlToolConfig[];
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* MCP Tool definition (matches SDK)
|
|
61
|
+
*/
|
|
62
|
+
export interface McpTool {
|
|
63
|
+
name: string;
|
|
64
|
+
description: string;
|
|
65
|
+
inputSchema: {
|
|
66
|
+
type: 'object';
|
|
67
|
+
properties: Record<string, unknown>;
|
|
68
|
+
required?: string[];
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Loaded tool with additional metadata
|
|
73
|
+
*/
|
|
74
|
+
export interface LoadedTool extends McpTool {
|
|
75
|
+
category?: string;
|
|
76
|
+
capability?: keyof Capabilities;
|
|
77
|
+
useZodSchema?: boolean;
|
|
78
|
+
zodSchemaRef?: string;
|
|
79
|
+
}
|
|
80
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/config/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAE/C;;GAEG;AACH,MAAM,WAAW,cAAc;IAE7B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,KAAK,GAAG,OAAO,GAAG,MAAM,CAAC;IAGlC,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IAGnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,QAAQ,GAAG,QAAQ,GAAG,SAAS,GAAG,OAAO,GAAG,QAAQ,CAAC;IAC3D,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC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