Skip to content

Conversation

@kylelai1
Copy link
Collaborator

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

Screenshot 2025-10-13 at 6 15 31 PM

Copilot AI review requested due to automatic review settings October 13, 2025 22:18
@kylelai1 kylelai1 requested a review from a team as a code owner October 13, 2025 22:18
@kylelai1 kylelai1 requested review from blva and nirinchev October 13, 2025 22:18
Copy link
Contributor

Copilot AI left a 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

@coveralls
Copy link
Collaborator

coveralls commented Oct 13, 2025

Pull Request Test Coverage Report for Build 18503133363

Warning: 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

  • 4 of 4 (100.0%) changed or added relevant lines in 2 files are covered.
  • 7 unchanged lines in 1 file lost coverage.
  • Overall coverage increased (+0.08%) to 82.293%

Files with Coverage Reduction New Missed Lines %
src/common/config.ts 7 90.25%
Totals Coverage Status
Change from base Build 18478241913: 0.08%
Covered Lines: 5667
Relevant Lines: 6758

💛 - 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."}`,
Copy link
Collaborator

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?

Copy link
Collaborator Author

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?

Copy link
Collaborator

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.

Copy link
Collaborator Author

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.

@kylelai1 kylelai1 requested a review from nirinchev October 14, 2025 16:20
@kylelai1 kylelai1 merged commit a8c6425 into main Oct 15, 2025
18 checks passed
@kylelai1 kylelai1 deleted the atlas-get-performance-advisor-tweaks branch October 15, 2025 17:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants