You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"Get MongoDB Atlas performance advisor recommendations, which includes the operations: suggested indexes, drop index suggestions, slow query logs, and schema suggestions";
24
+
protecteddescription=`Get MongoDB Atlas performance advisor recommendations, which includes the operations: suggested indexes, drop index suggestions, schema suggestions, and a sample of the most recent (max ${DEFAULT_SLOW_QUERY_LOGS_LIMIT}) slow query logs`;
25
25
publicoperationType: OperationType="read";
26
26
protectedargsShape={
27
27
projectId: AtlasArgs.projectId().describe("Atlas project ID to get performance advisor recommendations"),
@@ -31,8 +31,11 @@ export class GetPerformanceAdvisorTool extends AtlasToolBase {
31
31
.default(PerformanceAdvisorOperationType.options)
32
32
.describe("Operations to get performance advisor recommendations"),
33
33
since: z
34
-
.date()
35
-
.describe("Date to get slow query logs since. Only relevant for the slowQueryLogs operation.")
34
+
.string()
35
+
.datetime()
36
+
.describe(
37
+
"Date to get slow query logs since. Must be a string in ISO 8601 format. Only relevant for the slowQueryLogs operation."
38
+
)
36
39
.optional(),
37
40
namespaces: z
38
41
.array(z.string())
@@ -49,34 +52,58 @@ export class GetPerformanceAdvisorTool extends AtlasToolBase {
? `Note: The "Weight" field is measured in bytes, and represents the estimated number of bytes saved in disk reads per executed read query that would be saved by implementing an index suggestion. Please convert this to MB or GB for easier readability.\n${JSON.stringify(suggestedIndexesResult.value?.suggestedIndexes)}`
102
+
: "No suggested indexes found."
103
+
}`,
104
+
`## Drop Index Suggestions\n${hasDropIndexSuggestions ? JSON.stringify(dropIndexSuggestionsResult.value) : "No drop index suggestions found."}`,
0 commit comments