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
Copy file name to clipboardExpand all lines: src/clients/mcp-server.ts
+28-28Lines changed: 28 additions & 28 deletions
Original file line number
Diff line number
Diff line change
@@ -103,7 +103,6 @@ export async function createMCPServer(
103
103
searchOnly: config.searchOnly,
104
104
});
105
105
106
-
const{ indexNames, indexes }=runner;
107
106
constsearchOnly=!runner.hasFileOperations();
108
107
109
108
// Create MCP server
@@ -151,6 +150,32 @@ export async function createMCPServer(
151
150
},
152
151
},
153
152
{
153
+
name: "search",
154
+
description: searchDescription,
155
+
inputSchema: {
156
+
type: "object",
157
+
properties: {
158
+
index_name: {
159
+
type: "string",
160
+
description: "Name of the index to search.",
161
+
},
162
+
query: {
163
+
type: "string",
164
+
description: "Natural language description of what you're looking for.",
165
+
},
166
+
maxChars: {
167
+
type: "number",
168
+
description: "Maximum characters in response (optional).",
169
+
},
170
+
},
171
+
required: ["index_name","query"],
172
+
},
173
+
},
174
+
];
175
+
176
+
// Add index_repo if store supports write operations
177
+
if('save'inconfig.store){
178
+
tools.push({
154
179
name: "index_repo",
155
180
description: "Create or update an index from a repository. This may take 30+ seconds for large repos. The index will be available for search, list_files, and read_file after creation.",
156
181
inputSchema: {
@@ -192,31 +217,8 @@ export async function createMCPServer(
192
217
},
193
218
required: ["name","source_type"],
194
219
},
195
-
},
196
-
{
197
-
name: "search",
198
-
description: searchDescription,
199
-
inputSchema: {
200
-
type: "object",
201
-
properties: {
202
-
index_name: {
203
-
type: "string",
204
-
description: "Name of the index to search.",
205
-
enum: indexNames,
206
-
},
207
-
query: {
208
-
type: "string",
209
-
description: "Natural language description of what you're looking for.",
210
-
},
211
-
maxChars: {
212
-
type: "number",
213
-
description: "Maximum characters in response (optional).",
214
-
},
215
-
},
216
-
required: ["index_name","query"],
217
-
},
218
-
},
219
-
];
220
+
});
221
+
}
220
222
221
223
// Add delete_index if store supports it
222
224
if('delete'inconfig.store){
@@ -248,7 +250,6 @@ export async function createMCPServer(
248
250
index_name: {
249
251
type: "string",
250
252
description: "Name of the index.",
251
-
enum: indexNames,
252
253
},
253
254
directory: {
254
255
type: "string",
@@ -279,7 +280,6 @@ export async function createMCPServer(
0 commit comments