- Notifications
You must be signed in to change notification settings - Fork 133
chore: method to detect if a cluster support search indexes and expose the same on debug resource MCP-247 MCP-248 #628
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
86d509d
209a44b
6549ce1
9ea5f6a
d7d2b09
db27dd9
8fac3a2
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
| @@ -56,13 +56,15 @@ export class DebugResource extends ReactiveResource< | |
} | ||
} | ||
| ||
toOutput(): string { | ||
async toOutput(): Promise<string> { | ||
let result = ""; | ||
| ||
switch (this.current.tag) { | ||
case "connected": | ||
result += "The user is connected to the MongoDB cluster."; | ||
case "connected": { | ||
const searchIndexesSupported = await this.session.isSearchIndexSupported(); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't mind these additions but this seems like a bit of random information to include. What will be the deciding factor in what output we'll show here? I imagine there's a ton of info which could be relevant in that sense. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. So far the idea is to have anything connection related that might help Agent debug a problem with tool calls / connectivity problems. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In this case - we're expecting Agent to use debug resource at some point when its attempting to do search related work like creating search index. Although the tool call would respond with the appropriate error but there is a good chance of agent pulling debug resource information so we should have search related metadata here as well. | ||
result += `The user is connected to the MongoDB cluster${searchIndexesSupported ? " with support for search indexes" : " without any support for search indexes"}.`; | ||
break; | ||
} | ||
case "errored": | ||
result += `The user is not connected to a MongoDB cluster because of an error.\n`; | ||
if (this.current.connectedAtlasCluster) { | ||
|
Uh oh!
There was an error while loading. Please reload this page.