-
Notifications
You must be signed in to change notification settings - Fork 166
feat: atlas-get-performance-advisor tool: tweak language for slow queries #645
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR updates the language for the slow query logs section in the Atlas performance advisor tool to clarify that the query limit is a restriction of the MCP server tool, not Atlas itself.
- Updated the slow query logs output message to inform users about the limit
- Added clarification that the limit is specific to the MCP server tool only
Pull Request Test Coverage Report for Build 18503133363Warning: This coverage report may be inaccurate.This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.
Details
💛 - Coveralls |
| }`, | ||
| `## Drop Index Suggestions\n${hasDropIndexSuggestions ? JSON.stringify(dropIndexSuggestionsResult.value) : "No drop index suggestions found."}`, | ||
| `## Slow Query Logs\n${hasSlowQueryLogs ? JSON.stringify(slowQueryLogsResult.value?.slowQueryLogs) : "No slow query logs found."}`, | ||
| `## Slow Query Logs\n${hasSlowQueryLogs ? `Please notify the user that the slow query logs are limited to the most recent ${DEFAULT_SLOW_QUERY_LOGS_LIMIT} slow query logs. This is a limitation of the MCP server tool only.\n${JSON.stringify(slowQueryLogsResult.value?.slowQueryLogs)}` : "No slow query logs found."}`, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
q: should we add this clarification only if the number of query logs we've extracted is lower than that limit? And should we include a CTA in the response? Something like "Please notify the user that the slow query logs are limited to the most recent ${DEFAULT_SLOW_QUERY_LOGS_LIMIT} slow query logs. This is done to optimize the performance of the MCP server - they can view the complete list of logs in the Atlas UI" or something similar?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adding a CTA to the Atlas UI for specifically the performance advisor is difficult because we need to get the metrics route, which is not as simple as using a group ID and cluster ID. Would need to check with InTel on implementation here as well, since the metrics route is different for flex, dedicated, sharded, etc. PM has decided not to add this step.
I think we should keep the clarification for the limit of slow query logs always so the user is aware of the limit for other cases and not just the current tool call.
If we can't add a CTA, then maybe we can just add that last sentence referencing the Atlas UI? Instead of a specific link to the performance advisor for the cluster, maybe we can link to some docs about accessing the performance advisor in the Atlas UI? What do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, that was what I meant by CTA - if we can get a link, that'd be great, but otherwise, just telling them they can see more logs if they go to their atlas UI is enough.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added in a CTA for the tool response.
Proposed changes
From a product request: Adjusts the language when getting the slow queries for the performance advisor tool. Conveys the language to the LLM that the max limit for number of slow queries is due to the MCP server tool only (and not across Atlas).
Checklist