@dudamel/mcp-context 0.1.0 → 2026.917.2
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.test.d.ts +2 -0
- package/dist/annotations.test.d.ts.map +1 -0
- package/dist/cache-dir.d.ts +14 -0
- package/dist/cache-dir.d.ts.map +1 -0
- package/dist/cache-dir.test.d.ts +2 -0
- package/dist/cache-dir.test.d.ts.map +1 -0
- package/dist/context-backend.d.ts +36 -0
- package/dist/context-backend.d.ts.map +1 -0
- package/dist/context-client.d.ts +5 -2
- package/dist/context-client.d.ts.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1645 -3
- package/dist/mirror-backend.d.ts +61 -0
- package/dist/mirror-backend.d.ts.map +1 -0
- package/dist/mirror-backend.test.d.ts +2 -0
- package/dist/mirror-backend.test.d.ts.map +1 -0
- package/dist/server.d.ts.map +1 -1
- package/dist/stdio-server.d.ts +12 -0
- package/dist/stdio-server.d.ts.map +1 -1
- package/dist/stdio-server.js +1700 -36
- package/dist/tools/instructions.d.ts +2 -2
- package/dist/tools/instructions.d.ts.map +1 -1
- package/dist/tools/navigate.d.ts +4 -4
- package/dist/tools/navigate.d.ts.map +1 -1
- package/dist/tools/read.d.ts +7 -7
- package/dist/tools/read.d.ts.map +1 -1
- package/dist/tools/search.d.ts +3 -3
- package/dist/tools/search.d.ts.map +1 -1
- package/dist/types.d.ts +37 -0
- package/dist/types.d.ts.map +1 -1
- package/package.json +5 -3
- package/dist/context-client.js +0 -118
- package/dist/context-client.js.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/server.js +0 -90
- package/dist/server.js.map +0 -1
- package/dist/stdio-server.js.map +0 -1
- package/dist/tools/instructions.js +0 -40
- package/dist/tools/instructions.js.map +0 -1
- package/dist/tools/navigate.js +0 -121
- package/dist/tools/navigate.js.map +0 -1
- package/dist/tools/read.js +0 -352
- package/dist/tools/read.js.map +0 -1
- package/dist/tools/search.js +0 -103
- package/dist/tools/search.js.map +0 -1
- package/dist/types.js +0 -2
- package/dist/types.js.map +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"navigate.js","sourceRoot":"","sources":["../../src/tools/navigate.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAG1D;;;;GAIG;AACH,MAAM,UAAU,uBAAuB,CAAC,MAAiB,EAAE,MAA2B;IACpF,MAAM,CAAC,IAAI,CACT,cAAc,EACd,8RAA8R,EAC9R,EAAE,EACF,KAAK,IAAI,EAAE;QACT,MAAM,OAAO,GAAG,MAAM,MAAM,CAAC,oBAAoB,CAAC,EAAE,CAAC,CAAC;QACtD,MAAM,OAAO,GAAG,OAAO,CAAC,OAAO,IAAI,EAAE,CAAC;QACtC,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YACzB,OAAO;gBACL,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,2CAA2C,EAAE,CAAC;aAC/E,CAAC;QACJ,CAAC;QACD,MAAM,IAAI,GAAG,OAAO;aACjB,GAAG,CACF,CAAC,CAAC,EAAE,EAAE,CACJ,OAAO,CAAC,CAAC,IAAI,QAAQ,CAAC,CAAC,WAAW,IAAI,kBAAkB,EAAE,CAC7D;aACA,IAAI,CAAC,IAAI,CAAC,CAAC;QACd,OAAO,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,EAAE,CAAC;IAC/C,CAAC,CACF,CAAC;AACJ,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,kBAAkB,CAAC,MAAiB,EAAE,MAA2B;IAC/E,MAAM,CAAC,IAAI,CACT,QAAQ,EACR,kSAAkS,EAClS;QACE,IAAI,EAAE,CAAC;aACJ,MAAM,E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AC,CAAC,CAAC,MAAM,MAAM,CAAC,IAAI,IAAI,CAAC,CAAC,CAAC,cAAc,CAAC;QACpE,OAAO,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,KAAK,GAAG,MAAM,EAAE,CAAC,EAAE,CAAC;IACxE,CAAC,CACF,CAAC;AACJ,CAAC;AAED,SAAS,UAAU,CAAC,OAAoB;IACtC,OAAO,OAAO;SACX,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE;QACT,MAAM,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC,CAAC;QACrD,MAAM,MAAM,GAAG,CAAC,CAAC,IAAI,KAAK,WAAW,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC;QACjD,0EAA0E;QAC1E,sEAAsE;QACtE,sEAAsE;QACtE,6BAA6B;QAC7B,OAAO,GAAG,MAAM,KAAK,CAAC,CAAC,IAAI,GAAG,MAAM,EAAE,CAAC;IACzC,CAAC,CAAC;SACD,IAAI,CAAC,IAAI,CAAC,CAAC;AAChB,CAAC"}
|
package/dist/tools/read.js
DELETED
|
@@ -1,352 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
import { ContextServerError } from '../context-client.js';
|
|
3
|
-
const MAX_SLICE_BYTES = 256 * 1024; // 256 KB per read — keeps a single tool response well within context windows.
|
|
4
|
-
const MAX_TAIL_LINES = 1000;
|
|
5
|
-
/**
|
|
6
|
-
* `read_file` — fetch the text of a file in the VFS. Supports optional byte
|
|
7
|
-
* offset + length slicing so the caller can stream large files without
|
|
8
|
-
* blowing the MCP response size budget.
|
|
9
|
-
*/
|
|
10
|
-
export function registerReadFileTool(server, client) {
|
|
11
|
-
server.tool('read_file', `Read the full text of a file in the VFS. Path is VFS-relative, e.g. "AGENTS.md" or "my-source/tech/spec.md". Supports optional byte offset + length slicing for big files (max ${MAX_SLICE_BYTES} bytes per call). Prefer \`browse\` first to see descriptions before reading.`, {
|
|
12
|
-
path: z
|
|
13
|
-
.string()
|
|
14
|
-
.min(1)
|
|
15
|
-
.describe('VFS path to the file. Examples: "AGENTS.md", "my-source/tech/spec.md".'),
|
|
16
|
-
offset: z
|
|
17
|
-
.number()
|
|
18
|
-
.int()
|
|
19
|
-
.nonnegative()
|
|
20
|
-
.optional()
|
|
21
|
-
.describe('Optional byte offset to start reading from. Defaults to 0.'),
|
|
22
|
-
length: z
|
|
23
|
-
.number()
|
|
24
|
-
.int()
|
|
25
|
-
.positive()
|
|
26
|
-
.optional()
|
|
27
|
-
.describe(`Optional max bytes to return. Capped at ${MAX_SLICE_BYTES}.`),
|
|
28
|
-
}, async ({ path, offset, length }) => {
|
|
29
|
-
try {
|
|
30
|
-
const file = await client.readFile(path);
|
|
31
|
-
const start = offset ?? 0;
|
|
32
|
-
const requested = Math.min(length ?? MAX_SLICE_BYTES, MAX_SLICE_BYTES);
|
|
33
|
-
// Slicing happens over JS string chars, so total must be chars too —
|
|
34
|
-
// file.size is the on-disk byte count and for UTF-8 files with
|
|
35
|
-
// multi-byte chars they diverge, which previously caused false
|
|
36
|
-
// "truncated" reports even when the whole file had been returned.
|
|
37
|
-
const totalChars = file.content.length;
|
|
38
|
-
const totalBytes = file.size;
|
|
39
|
-
if (start >= totalChars) {
|
|
40
|
-
return {
|
|
41
|
-
content: [
|
|
42
|
-
{
|
|
43
|
-
type: 'text',
|
|
44
|
-
text: `File "${path}" is ${totalBytes} bytes. Offset ${start} is past the end.`,
|
|
45
|
-
},
|
|
46
|
-
],
|
|
47
|
-
};
|
|
48
|
-
}
|
|
49
|
-
const slice = file.content.slice(start, start + requested);
|
|
50
|
-
const end = start + slice.length;
|
|
51
|
-
const truncated = end < totalChars;
|
|
52
|
-
const header = start === 0 && !truncated
|
|
53
|
-
? `# ${path} (${totalBytes} bytes)`
|
|
54
|
-
: `# ${path} — chars ${start}..${end} of ${totalChars} (${totalBytes} bytes)${truncated ? ` (truncated, call again with offset=${end} for more)` : ''}`;
|
|
55
|
-
return {
|
|
56
|
-
content: [{ type: 'text', text: `${header}\n\n${slice}` }],
|
|
57
|
-
};
|
|
58
|
-
}
|
|
59
|
-
catch (error) {
|
|
60
|
-
if (error instanceof ContextServerError) {
|
|
61
|
-
if (error.status === 404) {
|
|
62
|
-
return {
|
|
63
|
-
content: [
|
|
64
|
-
{
|
|
65
|
-
type: 'text',
|
|
66
|
-
text: `File "${path}" not found. Use \`browse\` to see what exists at that path.`,
|
|
67
|
-
},
|
|
68
|
-
],
|
|
69
|
-
isError: true,
|
|
70
|
-
};
|
|
71
|
-
}
|
|
72
|
-
if (error.status === 413) {
|
|
73
|
-
return {
|
|
74
|
-
content: [
|
|
75
|
-
{
|
|
76
|
-
type: 'text',
|
|
77
|
-
text: `File "${path}" is too large to fetch in one call. Use the \`offset\` + \`length\` arguments to read it in chunks.`,
|
|
78
|
-
},
|
|
79
|
-
],
|
|
80
|
-
isError: true,
|
|
81
|
-
};
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
throw error;
|
|
85
|
-
}
|
|
86
|
-
});
|
|
87
|
-
}
|
|
88
|
-
/**
|
|
89
|
-
* `stat` — path metadata without reading the content.
|
|
90
|
-
* Useful to decide whether a file is worth reading (size, line count) or to
|
|
91
|
-
* check that a directory is populated before diving in with `browse`/`tree`.
|
|
92
|
-
*/
|
|
93
|
-
export function registerStatTool(server, client) {
|
|
94
|
-
server.tool('stat', 'Return metadata for a VFS path (exists, type, size, lines, entries, modified). Use this to size a file before reading or to confirm a path before acting on it.', {
|
|
95
|
-
path: z.string().min(1).describe('VFS path. Examples: "AGENTS.md", "my-source/tech", "my-source/CLAUDE.md".'),
|
|
96
|
-
}, async ({ path }) => {
|
|
97
|
-
const info = await client.stat(path);
|
|
98
|
-
if (!info.exists) {
|
|
99
|
-
return {
|
|
100
|
-
content: [{ type: 'text', text: `"${path}" does not exist in the VFS.` }],
|
|
101
|
-
};
|
|
102
|
-
}
|
|
103
|
-
const bits = [`# ${path}`, `type: ${info.type ?? 'unknown'}`];
|
|
104
|
-
if (info.size !== undefined)
|
|
105
|
-
bits.push(`size: ${info.size} bytes`);
|
|
106
|
-
if (info.lines !== undefined)
|
|
107
|
-
bits.push(`lines: ${info.lines}`);
|
|
108
|
-
if (info.entries !== undefined)
|
|
109
|
-
bits.push(`entries: ${info.entries}`);
|
|
110
|
-
if (info.modified)
|
|
111
|
-
bits.push(`modified: ${info.modified}`);
|
|
112
|
-
return { content: [{ type: 'text', text: bits.join('\n') }] };
|
|
113
|
-
});
|
|
114
|
-
}
|
|
115
|
-
/**
|
|
116
|
-
* `tail` — last N lines of a file. Mirrors the shell `tail -n`, handy for
|
|
117
|
-
* logs or files where only the end is relevant. For arbitrary slices use
|
|
118
|
-
* `read_file` with `offset` / `length` instead.
|
|
119
|
-
*/
|
|
120
|
-
export function registerTailTool(server, client) {
|
|
121
|
-
server.tool('tail', `Return the last N lines of a VFS file (default 20, max ${MAX_TAIL_LINES}). Use this for logs or when you only need the tail of a large file — for arbitrary byte slices, use \`read_file\` with offset/length.`, {
|
|
122
|
-
path: z.string().min(1).describe('VFS path to the file.'),
|
|
123
|
-
lines: z
|
|
124
|
-
.number()
|
|
125
|
-
.int()
|
|
126
|
-
.positive()
|
|
127
|
-
.max(MAX_TAIL_LINES)
|
|
128
|
-
.optional()
|
|
129
|
-
.describe(`Number of trailing lines to return (default 20, max ${MAX_TAIL_LINES}).`),
|
|
130
|
-
}, async ({ path, lines }) => {
|
|
131
|
-
try {
|
|
132
|
-
const result = await client.tail(path, lines);
|
|
133
|
-
if (!result.exists) {
|
|
134
|
-
return {
|
|
135
|
-
content: [{ type: 'text', text: `File "${path}" does not exist in the VFS.` }],
|
|
136
|
-
isError: true,
|
|
137
|
-
};
|
|
138
|
-
}
|
|
139
|
-
const header = `# ${path} — last ${result.returnedLines} line${result.returnedLines === 1 ? '' : 's'} of ${result.size} bytes`;
|
|
140
|
-
return { content: [{ type: 'text', text: `${header}\n\n${result.content}` }] };
|
|
141
|
-
}
|
|
142
|
-
catch (error) {
|
|
143
|
-
if (error instanceof ContextServerError && error.status === 404) {
|
|
144
|
-
return {
|
|
145
|
-
content: [{ type: 'text', text: `File "${path}" not found.` }],
|
|
146
|
-
isError: true,
|
|
147
|
-
};
|
|
148
|
-
}
|
|
149
|
-
throw error;
|
|
150
|
-
}
|
|
151
|
-
});
|
|
152
|
-
}
|
|
153
|
-
/**
|
|
154
|
-
* `read_section` — grab a single markdown section by heading. Useful for
|
|
155
|
-
* "show me the Screens table from luna-android.arch.md" kind of queries
|
|
156
|
-
* where `read_file` would pull the whole doc to extract a few lines.
|
|
157
|
-
* When `heading` is omitted, the tool returns the available headings so
|
|
158
|
-
* the caller can pick one without guessing.
|
|
159
|
-
*/
|
|
160
|
-
export function registerReadSectionTool(server, client) {
|
|
161
|
-
server.tool('read_section', 'Read a single section of a markdown file by heading (case-insensitive substring match). The section spans from the matched heading down to the next heading at the same or higher level. Omit `heading` to just list the file\'s available headings. Ideal to pull one part of a large doc without reading it all.', {
|
|
162
|
-
path: z.string().min(1).describe('VFS path to the markdown file.'),
|
|
163
|
-
heading: z
|
|
164
|
-
.string()
|
|
165
|
-
.optional()
|
|
166
|
-
.describe('Heading text or case-insensitive substring (e.g. "Screens", "state management"). Omit to list headings.'),
|
|
167
|
-
}, async ({ path, heading }) => {
|
|
168
|
-
try {
|
|
169
|
-
const result = await client.readSection(path, heading);
|
|
170
|
-
if (!result.exists) {
|
|
171
|
-
return {
|
|
172
|
-
content: [{ type: 'text', text: `File "${path}" does not exist in the VFS.` }],
|
|
173
|
-
isError: true,
|
|
174
|
-
};
|
|
175
|
-
}
|
|
176
|
-
if (!heading) {
|
|
177
|
-
if (result.headings.length === 0) {
|
|
178
|
-
return { content: [{ type: 'text', text: `File "${path}" has no markdown headings.` }] };
|
|
179
|
-
}
|
|
180
|
-
const lines = result.headings.map((h) => `${' '.repeat(Math.max(0, h.level - 1))}- L${h.line} (h${h.level}): ${h.text}`);
|
|
181
|
-
return {
|
|
182
|
-
content: [{ type: 'text', text: `# Headings in ${path}\n\n${lines.join('\n')}` }],
|
|
183
|
-
};
|
|
184
|
-
}
|
|
185
|
-
if (!result.match) {
|
|
186
|
-
const suggestions = result.headings.length === 0
|
|
187
|
-
? ' No headings in this file.'
|
|
188
|
-
: ` Available headings: ${result.headings.map((h) => `"${h.text}"`).join(', ')}.`;
|
|
189
|
-
return {
|
|
190
|
-
content: [
|
|
191
|
-
{
|
|
192
|
-
type: 'text',
|
|
193
|
-
text: `No heading in "${path}" matched "${heading}".${suggestions}`,
|
|
194
|
-
},
|
|
195
|
-
],
|
|
196
|
-
isError: true,
|
|
197
|
-
};
|
|
198
|
-
}
|
|
199
|
-
const { match } = result;
|
|
200
|
-
const ambig = match.ambiguousMatches ? ` (${match.ambiguousMatches} headings matched; returning the first)` : '';
|
|
201
|
-
const header = `# ${path} — section "${match.heading.text}" (L${match.startLine}..${match.endLine})${ambig}`;
|
|
202
|
-
return {
|
|
203
|
-
content: [{ type: 'text', text: `${header}\n\n${match.content}` }],
|
|
204
|
-
};
|
|
205
|
-
}
|
|
206
|
-
catch (error) {
|
|
207
|
-
if (error instanceof ContextServerError && error.status === 404) {
|
|
208
|
-
return {
|
|
209
|
-
content: [{ type: 'text', text: `File "${path}" not found.` }],
|
|
210
|
-
isError: true,
|
|
211
|
-
};
|
|
212
|
-
}
|
|
213
|
-
throw error;
|
|
214
|
-
}
|
|
215
|
-
});
|
|
216
|
-
}
|
|
217
|
-
/**
|
|
218
|
-
* `read_yaml` — navigate a YAML file by dot-path key. Without `keyPath`,
|
|
219
|
-
* lists top-level keys with types and previews so the caller can drill down.
|
|
220
|
-
* With `keyPath`, returns the value at that path (scalars as text, objects/arrays
|
|
221
|
-
* as YAML). Supports array index access (e.g. "servers.0.host").
|
|
222
|
-
*/
|
|
223
|
-
export function registerReadYamlTool(server, client) {
|
|
224
|
-
server.tool('read_yaml', 'Read a YAML file by key path. Omit `keyPath` to list top-level keys with types and previews. Provide a dot-separated `keyPath` (e.g. "database.host", "servers.0.port") to extract a specific value. Ideal for inspecting config files, workflow definitions, or catalog metadata without reading the whole file.', {
|
|
225
|
-
path: z.string().min(1).describe('VFS path to the YAML file.'),
|
|
226
|
-
keyPath: z
|
|
227
|
-
.string()
|
|
228
|
-
.optional()
|
|
229
|
-
.describe('Dot-separated key path (e.g. "database.host", "items.0.name"). Omit to list top-level keys.'),
|
|
230
|
-
}, async ({ path, keyPath }) => {
|
|
231
|
-
try {
|
|
232
|
-
const result = await client.readYaml(path, keyPath);
|
|
233
|
-
if (!result.exists) {
|
|
234
|
-
return {
|
|
235
|
-
content: [{ type: 'text', text: `File "${path}" does not exist in the VFS.` }],
|
|
236
|
-
isError: true,
|
|
237
|
-
};
|
|
238
|
-
}
|
|
239
|
-
if (!keyPath) {
|
|
240
|
-
if (result.keys.length === 0) {
|
|
241
|
-
return { content: [{ type: 'text', text: `File "${path}" is empty or not a valid YAML structure.` }] };
|
|
242
|
-
}
|
|
243
|
-
const lines = result.keys.map((k) => `- **${k.key}** (${k.type}): ${k.preview}`);
|
|
244
|
-
return {
|
|
245
|
-
content: [{ type: 'text', text: `# Keys in ${path}\n\n${lines.join('\n')}` }],
|
|
246
|
-
};
|
|
247
|
-
}
|
|
248
|
-
if (!result.match) {
|
|
249
|
-
const available = result.keys.length > 0
|
|
250
|
-
? ` Available keys: ${result.keys.map((k) => `"${k.key}"`).join(', ')}.`
|
|
251
|
-
: ' No keys found.';
|
|
252
|
-
return {
|
|
253
|
-
content: [{ type: 'text', text: `Key path "${keyPath}" not found in "${path}".${available}` }],
|
|
254
|
-
isError: true,
|
|
255
|
-
};
|
|
256
|
-
}
|
|
257
|
-
const { match } = result;
|
|
258
|
-
const childInfo = result.keys.length > 0
|
|
259
|
-
? `\n\nChild keys: ${result.keys.map((k) => `${k.key} (${k.type})`).join(', ')}`
|
|
260
|
-
: '';
|
|
261
|
-
const header = `# ${path} → ${match.keyPath} (${match.type})${childInfo}`;
|
|
262
|
-
return {
|
|
263
|
-
content: [{ type: 'text', text: `${header}\n\n${match.content}` }],
|
|
264
|
-
};
|
|
265
|
-
}
|
|
266
|
-
catch (error) {
|
|
267
|
-
if (error instanceof ContextServerError && error.status === 404) {
|
|
268
|
-
return {
|
|
269
|
-
content: [{ type: 'text', text: `File "${path}" not found.` }],
|
|
270
|
-
isError: true,
|
|
271
|
-
};
|
|
272
|
-
}
|
|
273
|
-
throw error;
|
|
274
|
-
}
|
|
275
|
-
});
|
|
276
|
-
}
|
|
277
|
-
const MAX_CSV_ROWS = 200;
|
|
278
|
-
/**
|
|
279
|
-
* `read_csv` — structured CSV reader with filtering and column selection.
|
|
280
|
-
* Without filters, returns headers and a preview of the first rows. With
|
|
281
|
-
* `filterColumn` + `filterValue`, returns matching rows (case-insensitive
|
|
282
|
-
* substring). Use `columns` to select only specific columns.
|
|
283
|
-
*/
|
|
284
|
-
export function registerReadCsvTool(server, client) {
|
|
285
|
-
server.tool('read_csv', `Read a CSV file with optional filtering. Without filters, returns column headers and a preview of the first rows. With \`filterColumn\` + \`filterValue\`, returns rows where that column matches (case-insensitive substring). Use \`columns\` to select only specific columns and reduce output size. Max ${MAX_CSV_ROWS} rows per call.`, {
|
|
286
|
-
path: z.string().min(1).describe('VFS path to the CSV file.'),
|
|
287
|
-
filterColumn: z
|
|
288
|
-
.string()
|
|
289
|
-
.optional()
|
|
290
|
-
.describe('Column name to filter on (case-insensitive).'),
|
|
291
|
-
filterValue: z
|
|
292
|
-
.string()
|
|
293
|
-
.optional()
|
|
294
|
-
.describe('Value to match in the filter column (case-insensitive substring).'),
|
|
295
|
-
columns: z
|
|
296
|
-
.array(z.string())
|
|
297
|
-
.optional()
|
|
298
|
-
.describe('Column names to include in the output. Omit for all columns.'),
|
|
299
|
-
maxRows: z
|
|
300
|
-
.number()
|
|
301
|
-
.int()
|
|
302
|
-
.positive()
|
|
303
|
-
.max(MAX_CSV_ROWS)
|
|
304
|
-
.optional()
|
|
305
|
-
.describe(`Max rows to return (default 10, max ${MAX_CSV_ROWS}).`),
|
|
306
|
-
}, async ({ path, filterColumn, filterValue, columns, maxRows }) => {
|
|
307
|
-
try {
|
|
308
|
-
const result = await client.readCsv(path, { filterColumn, filterValue, columns, maxRows });
|
|
309
|
-
if (!result.exists) {
|
|
310
|
-
return {
|
|
311
|
-
content: [{ type: 'text', text: `File "${path}" does not exist in the VFS.` }],
|
|
312
|
-
isError: true,
|
|
313
|
-
};
|
|
314
|
-
}
|
|
315
|
-
if (result.headers.length === 0) {
|
|
316
|
-
return { content: [{ type: 'text', text: `File "${path}" is empty or has no CSV headers.` }] };
|
|
317
|
-
}
|
|
318
|
-
const colList = result.headers.map((h) => h.name).join(', ');
|
|
319
|
-
const filterInfo = result.filterApplied
|
|
320
|
-
? ` | filter: ${result.filterApplied.column}="${result.filterApplied.value}" → ${result.filterApplied.matchedRows} matches`
|
|
321
|
-
: '';
|
|
322
|
-
const truncInfo = result.truncated ? ' (truncated)' : '';
|
|
323
|
-
const header = `# ${path} — ${result.totalRows} rows, ${result.headers.length} columns${filterInfo}${truncInfo}\nColumns: ${colList}`;
|
|
324
|
-
if (result.rows.length === 0) {
|
|
325
|
-
const msg = result.filterApplied
|
|
326
|
-
? `No rows matched filter ${result.filterApplied.column}="${result.filterApplied.value}".`
|
|
327
|
-
: 'No data rows found.';
|
|
328
|
-
return { content: [{ type: 'text', text: `${header}\n\n${msg}` }] };
|
|
329
|
-
}
|
|
330
|
-
const displayCols = columns && columns.length > 0
|
|
331
|
-
? result.headers
|
|
332
|
-
.filter((h) => columns.some((c) => c.toLowerCase() === h.name.toLowerCase()))
|
|
333
|
-
.map((h) => h.name)
|
|
334
|
-
: result.headers.map((h) => h.name);
|
|
335
|
-
const lines = result.rows.map((row) => displayCols.map((col) => `${col}: ${row[col] ?? ''}`).join(' | '));
|
|
336
|
-
const body = lines.join('\n');
|
|
337
|
-
return {
|
|
338
|
-
content: [{ type: 'text', text: `${header}\n\n${body}` }],
|
|
339
|
-
};
|
|
340
|
-
}
|
|
341
|
-
catch (error) {
|
|
342
|
-
if (error instanceof ContextServerError && error.status === 404) {
|
|
343
|
-
return {
|
|
344
|
-
content: [{ type: 'text', text: `File "${path}" not found.` }],
|
|
345
|
-
isError: true,
|
|
346
|
-
};
|
|
347
|
-
}
|
|
348
|
-
throw error;
|
|
349
|
-
}
|
|
350
|
-
});
|
|
351
|
-
}
|
|
352
|
-
//# sourceMappingURL=read.js.map
|
package/dist/tools/read.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"read.js","sourceRoot":"","sources":["../../src/tools/read.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAG1D,MAAM,eAAe,GAAG,GAAG,GAAG,IAAI,CAAC,CAAC,8EAA8E;AAClH,MAAM,cAAc,GAAG,IAAI,CAAC;AAE5B;;;;GAIG;AACH,MAAM,UAAU,oBAAoB,CAAC,MAAiB,EAAE,MAA2B;IACjF,MAAM,CAAC,IAAI,CACT,WAAW,EACX,kLAAkL,eAAe,+EAA+E,EAChR;QACE,IAAI,EAAE,CAAC;aACJ,MAAM,EAAE;aACR,GAAG,CAAC,CAAC,CAAC;aACN,QAAQ,CAAC,wEAAwE,CAAC;QACrF,MAAM,EAAE,CAAC;aACN,MAAM,EAAE;aACR,GAAG,EAAE;aACL,WAAW,EAAE;aACb,QAAQ,EAAE;aACV,QAAQ,CAAC,4DAA4D,CAAC;QACzE,MAAM,EAAE,CAAC;aACN,MAAM,EAAE;aACR,GAAG,EAAE;aACL,QAAQ,EAAE;aACV,QAAQ,EAAE;aACV,QAAQ,CAAC,2CAA2C,eAAe,GAAG,CAAC;KAC3E,EACD,KAAK,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,EAAE,E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IAAI,EAAE,SAAS,IAAI,cAAc,EAAE,CAAC;oBAC9D,OAAO,EAAE,IAAI;iBACd,CAAC;YACJ,CAAC;YACD,MAAM,KAAK,CAAC;QACd,CAAC;IACH,CAAC,CACF,CAAC;AACJ,CAAC"}
|
package/dist/tools/search.js
DELETED
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
/**
|
|
3
|
-
* `grep` — regex search across VFS file contents. Thin MCP wrapper around
|
|
4
|
-
* the context-server's `POST /search/grep` (which shells out to real `grep
|
|
5
|
-
* -rn` with safety caps). Skips dotfiles and .index.yaml catalogs so results
|
|
6
|
-
* stay focused on actual documentation.
|
|
7
|
-
*/
|
|
8
|
-
export function registerGrepTool(server, client) {
|
|
9
|
-
server.tool('grep', 'Search file contents across the VFS with a regex (or a literal string if `fixedString` is true). Returns matching lines with their file path and line number. `path` accepts a source, a subfolder, or a single file — narrow the scope as much as you can. Prefer `browse` + catalog descriptions to narrow first; broad greps are cheap but noisy.', {
|
|
10
|
-
pattern: z
|
|
11
|
-
.string()
|
|
12
|
-
.min(1)
|
|
13
|
-
.describe('The regex (ERE) or literal string to search for.'),
|
|
14
|
-
path: z
|
|
15
|
-
.string()
|
|
16
|
-
.optional()
|
|
17
|
-
.describe('Scope the search to this VFS path (e.g. "my-source" or "my-source/tech"). Omit for the whole VFS.'),
|
|
18
|
-
maxResults: z
|
|
19
|
-
.number()
|
|
20
|
-
.int()
|
|
21
|
-
.positive()
|
|
22
|
-
.max(500)
|
|
23
|
-
.optional()
|
|
24
|
-
.describe('Max hits to return (default 50, hard cap 500).'),
|
|
25
|
-
fixedString: z
|
|
26
|
-
.boolean()
|
|
27
|
-
.optional()
|
|
28
|
-
.describe('Treat `pattern` as a literal string, not a regex (grep -F).'),
|
|
29
|
-
ignoreCase: z
|
|
30
|
-
.boolean()
|
|
31
|
-
.optional()
|
|
32
|
-
.describe('Case-insensitive match (grep -i).'),
|
|
33
|
-
}, async (args) => {
|
|
34
|
-
const result = await client.grep(args);
|
|
35
|
-
if (result.results.length === 0) {
|
|
36
|
-
return {
|
|
37
|
-
content: [
|
|
38
|
-
{
|
|
39
|
-
type: 'text',
|
|
40
|
-
text: `No matches for /${args.pattern}/${args.ignoreCase ? 'i' : ''}${args.path ? ` under "${args.path}"` : ''}.`,
|
|
41
|
-
},
|
|
42
|
-
],
|
|
43
|
-
};
|
|
44
|
-
}
|
|
45
|
-
const body = result.results
|
|
46
|
-
.map((hit) => `${hit.path}:${hit.line}: ${hit.text}`)
|
|
47
|
-
.join('\n');
|
|
48
|
-
const footer = result.truncated
|
|
49
|
-
? `\n\n(truncated at ${result.results.length} hits — narrow the scope with \`path\` or tighten the pattern)`
|
|
50
|
-
: '';
|
|
51
|
-
return {
|
|
52
|
-
content: [{ type: 'text', text: body + footer }],
|
|
53
|
-
};
|
|
54
|
-
});
|
|
55
|
-
}
|
|
56
|
-
/**
|
|
57
|
-
* `find` — locate files by name glob across the VFS. Scoped by `path`.
|
|
58
|
-
* Returns a plain list of VFS paths. Use this to discover where specific
|
|
59
|
-
* filenames live when `browse` would take too many hops.
|
|
60
|
-
*/
|
|
61
|
-
export function registerFindTool(server, client) {
|
|
62
|
-
server.tool('find', 'Find files or directories by name across the VFS. `name` accepts find-style globs ("*.md", "foo?", "[ab]*"). Optionally scope with `path` and/or restrict to files ("f") or directories ("d"). Returns a list of VFS paths — use `read_file` / `browse` to inspect them.', {
|
|
63
|
-
name: z
|
|
64
|
-
.string()
|
|
65
|
-
.min(1)
|
|
66
|
-
.describe('Filename glob. Examples: "*.md", "README*", "spec.*".'),
|
|
67
|
-
path: z
|
|
68
|
-
.string()
|
|
69
|
-
.optional()
|
|
70
|
-
.describe('Scope to this VFS path. Omit for the whole VFS.'),
|
|
71
|
-
maxResults: z
|
|
72
|
-
.number()
|
|
73
|
-
.int()
|
|
74
|
-
.positive()
|
|
75
|
-
.max(500)
|
|
76
|
-
.optional()
|
|
77
|
-
.describe('Max paths to return (default 50, hard cap 500).'),
|
|
78
|
-
type: z
|
|
79
|
-
.enum(['f', 'd'])
|
|
80
|
-
.optional()
|
|
81
|
-
.describe('Restrict to files ("f") or directories ("d").'),
|
|
82
|
-
}, async (args) => {
|
|
83
|
-
const result = await client.find(args);
|
|
84
|
-
if (result.results.length === 0) {
|
|
85
|
-
return {
|
|
86
|
-
content: [
|
|
87
|
-
{
|
|
88
|
-
type: 'text',
|
|
89
|
-
text: `No ${args.type === 'd' ? 'directories' : args.type === 'f' ? 'files' : 'paths'} match "${args.name}"${args.path ? ` under "${args.path}"` : ''}.`,
|
|
90
|
-
},
|
|
91
|
-
],
|
|
92
|
-
};
|
|
93
|
-
}
|
|
94
|
-
const body = result.results.map((p) => `- ${p}`).join('\n');
|
|
95
|
-
const footer = result.truncated
|
|
96
|
-
? `\n\n(truncated at ${result.results.length} hits — narrow the scope with \`path\` or use a tighter name pattern)`
|
|
97
|
-
: '';
|
|
98
|
-
return {
|
|
99
|
-
content: [{ type: 'text', text: body + footer }],
|
|
100
|
-
};
|
|
101
|
-
});
|
|
102
|
-
}
|
|
103
|
-
//# sourceMappingURL=search.js.map
|
package/dist/tools/search.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"search.js","sourceRoot":"","sources":["../../src/tools/search.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB;;;;;GAKG;AACH,MAAM,UAAU,gBAAgB,CAAC,MAAiB,EAAE,MAA2B;IAC7E,MAAM,CAAC,IAAI,CACT,MAAM,EACN,sVAAsV,EACtV;QACE,OAAO,EAAE,CAAC;aACP,MAAM,EAAE;aACR,GAAG,CAAC,CAAC,CAAC;aACN,QAAQ,CAAC,kDAAkD,CAAC;QAC/D,IAAI,EAAE,CAAC;aACJ,MAAM,EAAE;aACR,QAAQ,EAAE;aACV,QAAQ,CAAC,mGAAmG,CAAC;QAChH,UAAU,EAAE,CAAC;aACV,MAAM,EAAE;aACR,GAAG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