Skip to content

Commit c447903

Browse files
committed
more tweaks
1 parent 38761a4 commit c447903

File tree

3 files changed

+7
-10
lines changed

3 files changed

+7
-10
lines changed

src/tools/atlas/read/getPerformanceAdvisor.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,9 @@ export class GetPerformanceAdvisorTool extends AtlasToolBase {
2626
protected description = `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`;
2727
public operationType: OperationType = "read";
2828
protected argsShape = {
29-
projectId: AtlasArgs.projectId().describe("Atlas project ID to get performance advisor recommendations"),
29+
projectId: AtlasArgs.projectId().describe(
30+
"Atlas project ID to get performance advisor recommendations. The project ID is a hexadecimal identifier of 24 characters. If the user has only specified the name, use the `atlas-list-projects` tool to retrieve the user's projects with their ids."
31+
),
3032
clusterName: AtlasArgs.clusterName().describe("Atlas cluster name to get performance advisor recommendations"),
3133
operations: z
3234
.array(PerformanceAdvisorOperationType)

tests/accuracy/explain.test.ts

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,6 @@
11
import { describeAccuracyTests } from "./sdk/describeAccuracyTests.js";
22
import { Matcher } from "./sdk/matcher.js";
33

4-
/**
5-
* None of these tests score a parameter match on any of the models, likely
6-
* because we are using Zod.union, when we probably should've used
7-
* Zod.discriminatedUnion
8-
*/
94
describeAccuracyTests([
105
{
116
prompt: `Will fetching documents, where release_year is 2020, from 'mflix.movies' namespace perform a collection scan?`,
@@ -23,7 +18,7 @@ describeAccuracyTests([
2318
},
2419
},
2520
],
26-
verbosity: Matcher.string(),
21+
verbosity: Matcher.anyOf(Matcher.string(), Matcher.undefined),
2722
},
2823
},
2924
],
@@ -49,7 +44,7 @@ describeAccuracyTests([
4944
},
5045
},
5146
],
52-
verbosity: Matcher.string(),
47+
verbosity: Matcher.anyOf(Matcher.string(), Matcher.undefined),
5348
},
5449
},
5550
],
@@ -70,7 +65,7 @@ describeAccuracyTests([
7065
},
7166
},
7267
],
73-
verbosity: Matcher.string(),
68+
verbosity: Matcher.anyOf(Matcher.string(), Matcher.undefined),
7469
},
7570
},
7671
],

tests/accuracy/getPerformanceAdvisor.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ describeAccuracyTests([
7979
},
8080
// Test for Drop Index Suggestions operation
8181
{
82-
prompt: "Show me drop index suggestions for the 'mflix' project and 'mflix-cluster' cluster",
82+
prompt: "Show me drop index suggestions for the project named 'mflix' and 'mflix-cluster' cluster",
8383
expectedToolCalls: [
8484
...listProjectsAndClustersToolCalls,
8585
{

0 commit comments

Comments
 (0)