Skip to content

Commit 5df72aa

Browse files
chore(mcp): allow pointing docs_search tool at other URLs
1 parent 170eef2 commit 5df72aa

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-nyody4/run/codegen-output/cas-parser/cas-parser-typescript/packages/mcp-server/src/docs-search-tool.ts":"1"},{"size":1464,"mtime":1758940329025}]

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/cas-parser/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/cas-parser/docs/search?' + query);
44+
const result = await fetch(`${docsSearchURL}?${query}`);
4245
return asTextContentResult(await result.json());
4346
};
4447

0 commit comments

Comments
 (0)