Skip to content

Commit 446225c

Browse files
fix(mcp): clarify filterByFilepaths accepts regular expressions
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 5b55f96 commit 446225c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/web/src/features/mcp/server.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ export function createMcpServer(): McpServer {
9898
.optional(),
9999
filterByFilepaths: z
100100
.array(z.string())
101-
.describe(`Scope the search to the provided filepaths.`)
101+
.describe(`Scope the search to the provided filepaths. Each filepath is a regular expression matched against the full file path.`)
102102
.optional(),
103103
caseSensitive: z
104104
.boolean()
@@ -147,7 +147,7 @@ export function createMcpServer(): McpServer {
147147
query += ` (lang:${languages.join(' or lang:')})`;
148148
}
149149
if (filepaths.length > 0) {
150-
query += ` (file:${filepaths.map(fp => escapeStringRegexp(fp)).join(' or file:')})`;
150+
query += ` (file:${filepaths.join(' or file:')})`;
151151
}
152152
if (ref) {
153153
query += ` ( rev:${ref} )`;

0 commit comments

Comments
 (0)