You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: resolve biome lint errors and simplify README quickstart
Fix all biome lint errors (formatting, import sorting, noNonNullAssertion,
useTemplate, noDelete, useNumberNamespace) and trim the Quickstart for
Agents section to a one-liner install command.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@@ -61,8 +70,17 @@ export async function createServer(config: Config) {
61
70
PREFER THIS OVER BASH for: API calls (gh, curl, aws), test runners (npm test, pytest), git queries (git log, git diff), data processing, and ANY CLI command that may produce large output. Bash should only be used for file mutations, git writes, and navigation.`,
code: z.string().describe("Source code to execute. Use console.log (JS/TS), print (Python/Ruby/Perl/R), echo (Shell), echo (PHP), fmt.Println (Go), or IO.puts (Elixir) to output a summary to context."),
65
-
intent: z.string().optional().describe("What you're looking for in the output. When provided and output is large (>5KB), indexes output into knowledge base and returns section titles + previews — not full content. Use search(queries: [...]) to retrieve specific sections."),
73
+
code: z
74
+
.string()
75
+
.describe(
76
+
"Source code to execute. Use console.log (JS/TS), print (Python/Ruby/Perl/R), echo (Shell), echo (PHP), fmt.Println (Go), or IO.puts (Elixir) to output a summary to context.",
77
+
),
78
+
intent: z
79
+
.string()
80
+
.optional()
81
+
.describe(
82
+
"What you're looking for in the output. When provided and output is large (>5KB), indexes output into knowledge base and returns section titles + previews — not full content. Use search(queries: [...]) to retrieve specific sections.",
83
+
),
66
84
timeout: z.number().default(30000).describe("Max execution time in ms"),
67
85
},
68
86
async({ language, code, intent, timeout })=>{
@@ -93,7 +111,7 @@ PREFER THIS OVER BASH for: API calls (gh, curl, aws), test runners (npm test, py
filtered+=`\nUse search(queries: [...]) to retrieve full content of any section.`;
172
+
filtered+="\nUse search(queries: [...]) to retrieve full content of any section.";
151
173
output=filtered;
152
174
}
153
175
@@ -162,10 +184,16 @@ PREFER THIS OVER BASH for: API calls (gh, curl, aws), test runners (npm test, py
162
184
163
185
server.tool(
164
186
"index",
165
-
'Index documentation or knowledge content into a searchable BM25 knowledge base. Chunks markdown by headings (keeping code blocks intact) and stores in ephemeral FTS5 database. The full content does NOT stay in context — only a brief summary is returned.\n\nWHEN TO USE:\n- Documentation (API docs, framework guides, code examples)\n- README files, migration guides, changelog entries\n- Any content with code examples you may need to reference precisely\n\nAfter indexing, use \'search\' to retrieve specific sections on-demand.',
187
+
"Index documentation or knowledge content into a searchable BM25 knowledge base. Chunks markdown by headings (keeping code blocks intact) and stores in ephemeral FTS5 database. The full content does NOT stay in context — only a brief summary is returned.\n\nWHEN TO USE:\n- Documentation (API docs, framework guides, code examples)\n- README files, migration guides, changelog entries\n- Any content with code examples you may need to reference precisely\n\nAfter indexing, use 'search' to retrieve specific sections on-demand.",
166
188
{
167
-
content: z.string().optional().describe("Raw text/markdown to index. Provide this OR path, not both."),
168
-
path: z.string().optional().describe("File path to read and index (content never enters context)."),
189
+
content: z
190
+
.string()
191
+
.optional()
192
+
.describe("Raw text/markdown to index. Provide this OR path, not both."),
193
+
path: z
194
+
.string()
195
+
.optional()
196
+
.describe("File path to read and index (content never enters context)."),
169
197
source: z.string().optional().describe("Label for the indexed content"),
170
198
},
171
199
async({ content,path: filePath, source })=>{
@@ -198,10 +226,15 @@ PREFER THIS OVER BASH for: API calls (gh, curl, aws), test runners (npm test, py
198
226
199
227
server.tool(
200
228
"search",
201
-
'Search indexed content. Pass ALL search questions as queries array in ONE call.\n\nTIPS: 2-4 specific terms per query. Use \'source\' to scope results.',
229
+
"Search indexed content. Pass ALL search questions as queries array in ONE call.\n\nTIPS: 2-4 specific terms per query. Use 'source' to scope results.",
202
230
{
203
-
queries: z.array(z.string()).describe("Array of search queries. Batch ALL questions in one call."),
204
-
source: z.string().optional().describe("Filter to a specific indexed source (partial match)."),
231
+
queries: z
232
+
.array(z.string())
233
+
.describe("Array of search queries. Batch ALL questions in one call."),
234
+
source: z
235
+
.string()
236
+
.optional()
237
+
.describe("Filter to a specific indexed source (partial match)."),
205
238
limit: z.number().default(3).describe("Results per query (default: 3)"),
206
239
},
207
240
async({ queries, source, limit })=>{
@@ -216,12 +249,14 @@ PREFER THIS OVER BASH for: API calls (gh, curl, aws), test runners (npm test, py
216
249
constcallCount=searchCalls.length;
217
250
218
251
if(callCount>config.searchBlockAfter){
219
-
constmsg="Too many search calls in quick succession. Use batch_execute instead to run commands and search in one call.";
252
+
constmsg=
253
+
"Too many search calls in quick succession. Use batch_execute instead to run commands and search in one call.";
@@ -249,7 +284,9 @@ PREFER THIS OVER BASH for: API calls (gh, curl, aws), test runners (npm test, py
249
284
}
250
285
251
286
if(callCount>config.searchReduceAfter){
252
-
allResults.push(`\n⚠ Search rate limited (${callCount} calls in ${config.searchWindowMs/1000}s). Results reduced to 1 per query.`);
287
+
allResults.push(
288
+
`\n⚠ Search rate limited (${callCount} calls in ${config.searchWindowMs/1000}s). Results reduced to 1 per query.`,
289
+
);
253
290
}
254
291
255
292
constoutput=allResults.join("\n---\n\n");
@@ -315,11 +352,19 @@ PREFER THIS OVER BASH for: API calls (gh, curl, aws), test runners (npm test, py
315
352
"batch_execute",
316
353
"Execute multiple commands in ONE call, auto-index all output, and search with multiple queries. Returns search results directly — no follow-up calls needed.\n\nTHIS IS THE PRIMARY TOOL. Use this instead of multiple execute() calls.\n\nOne batch_execute call replaces 30+ execute calls + 10+ search calls.\nProvide all commands to run and all queries to search — everything happens in one round trip.",
317
354
{
318
-
commands: z.array(z.object({
319
-
label: z.string().describe("Section header for this command's output"),
320
-
command: z.string().describe("Shell command to execute"),
321
-
})).describe("Commands to execute as a batch."),
322
-
queries: z.array(z.string()).describe("Search queries to extract information from indexed output. Use 5-8 comprehensive queries."),
355
+
commands: z
356
+
.array(
357
+
z.object({
358
+
label: z.string().describe("Section header for this command's output"),
359
+
command: z.string().describe("Shell command to execute"),
360
+
}),
361
+
)
362
+
.describe("Commands to execute as a batch."),
363
+
queries: z
364
+
.array(z.string())
365
+
.describe(
366
+
"Search queries to extract information from indexed output. Use 5-8 comprehensive queries.",
367
+
),
323
368
timeout: z.number().default(60000).describe("Max execution time in ms (default: 60s)"),
0 commit comments