Skip to content

Commit 6044c34

Browse files
chore(mcp): allow pointing docs_search tool at other URLs
1 parent 697d742 commit 6044c34

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

.eslintcache

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
[{"/home/tempuser-7buwh2/run/codegen-output/beeper/beeper-desktop-api-typescript/packages/mcp-server/src/docs-search-tool.ts":"1"},{"size":1472,"mtime":1758940769742}]

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

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

38+
const docsSearchURL =
39+
process.env['DOCS_SEARCH_URL'] || 'https://api.stainless.com/api/projects/beeper-desktop-api/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(
42-
'https://api.stainless.com/api/projects/beeper-desktop-api/docs/search?' + query,
43-
);
44+
const result = await fetch(`${docsSearchURL}?${query}`);
4445
return asTextContentResult(await result.json());
4546
};
4647

0 commit comments

Comments
 (0)