Skip to content

Commit bbe84b3

Browse files
chore(mcp): allow pointing docs_search tool at other URLs
1 parent 863e6b7 commit bbe84b3

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

.eslintcache

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
[{"/home/tempuser-z6aas2/run/codegen-output/imagekit-inc/imagekit-typescript/packages/mcp-server/src/docs-search-tool.ts":"1"},{"size":1462,"mtime":1758942838433}]

packages/mcp-server/src/docs-search-tool.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,13 @@ export const tool: Tool = {
3535
},
3636
};
3737

38+
const docsSearchURL =
39+
process.env['DOCS_SEARCH_URL'] || 'https://api.stainless.com/api/projects/imagekit/docs/search';
40+
3841
export const handler = async (_: unknown, args: Record<string, unknown> | undefined) => {
3942
const body = args as any;
4043
const query = new URLSearchParams(body).toString();
41-
const result = await fetch('https://api.stainless.com/api/projects/imagekit/docs/search?' + query);
44+
const result = await fetch(`${docsSearchURL}?${query}`);
4245
return asTextContentResult(await result.json());
4346
};
4447

0 commit comments

Comments
 (0)