Skip to content

Commit e4fb282

Browse files
handle potential future developer error more gracefully
1 parent c79cb48 commit e4fb282

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

src/tools/atlasLocal/atlasLocalTool.ts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,16 @@ export abstract class AtlasLocalToolBase extends ToolBase {
2323
// verifyAllowed in the base class would still return false preventing the tool from being registered,
2424
// preventing the tool from being executed
2525
if (!client) {
26-
throw new Error("Atlas Local client not found, tool should have been disabled.");
26+
return {
27+
content: [
28+
{
29+
type: "text",
30+
text: `Something went wrong on our end, this tool should have been disabled but it was not.
31+
please log a ticket here: https://github.com/mongodb-js/mongodb-mcp-server/issues/new?template=bug_report.yml`,
32+
},
33+
],
34+
isError: true,
35+
};
2736
}
2837

2938
return this.executeWithAtlasLocalClient(client);

0 commit comments

Comments
 (0)