Skip to content

Commit 3b4c644

Browse files
feat: respect toolMetadataOverrides for tools
This commit ensures that we register the tool with correct metadata , taking into consideration the toolMetadataOverrides provided by the users.
1 parent e93f155 commit 3b4c644

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+355
-117
lines changed

src/tools/atlas/connect/connectCluster.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ export const ConnectClusterArgs = {
3030
};
3131

3232
export class ConnectClusterTool extends AtlasToolBase {
33-
public name = "atlas-connect-cluster";
34-
protected description = "Connect to MongoDB Atlas cluster";
33+
public internalName = "atlas-connect-cluster";
34+
protected internalDescription = "Connect to MongoDB Atlas cluster";
3535
public operationType: OperationType = "connect";
3636
protected argsShape = {
3737
...ConnectClusterArgs,

src/tools/atlas/create/createAccessList.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ export const CreateAccessListArgs = {
1717
};
1818

1919
export class CreateAccessListTool extends AtlasToolBase {
20-
public name = "atlas-create-access-list";
21-
protected description = "Allow Ip/CIDR ranges to access your MongoDB Atlas clusters.";
20+
public internalName = "atlas-create-access-list";
21+
protected internalDescription = "Allow Ip/CIDR ranges to access your MongoDB Atlas clusters.";
2222
public operationType: OperationType = "create";
2323
protected argsShape = {
2424
...CreateAccessListArgs,

src/tools/atlas/create/createDBUser.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ export const CreateDBUserArgs = {
3434
};
3535

3636
export class CreateDBUserTool extends AtlasToolBase {
37-
public name = "atlas-create-db-user";
38-
protected description = "Create an MongoDB Atlas database user";
37+
public internalName = "atlas-create-db-user";
38+
protected internalDescription = "Create an MongoDB Atlas database user";
3939
public operationType: OperationType = "create";
4040
protected argsShape = {
4141
...CreateDBUserArgs,

src/tools/atlas/create/createFreeCluster.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ import { ensureCurrentIpInAccessList } from "../../../common/atlas/accessListUti
66
import { AtlasArgs } from "../../args.js";
77

88
export class CreateFreeClusterTool extends AtlasToolBase {
9-
public name = "atlas-create-free-cluster";
10-
protected description = "Create a free MongoDB Atlas cluster";
9+
public internalName = "atlas-create-free-cluster";
10+
protected internalDescription = "Create a free MongoDB Atlas cluster";
1111
public operationType: OperationType = "create";
1212
protected argsShape = {
1313
projectId: AtlasArgs.projectId().describe("Atlas project ID to create the cluster in"),

src/tools/atlas/create/createProject.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ import type { Group } from "../../../common/atlas/openapi.js";
55
import { AtlasArgs } from "../../args.js";
66

77
export class CreateProjectTool extends AtlasToolBase {
8-
public name = "atlas-create-project";
9-
protected description = "Create a MongoDB Atlas project";
8+
public internalName = "atlas-create-project";
9+
protected internalDescription = "Create a MongoDB Atlas project";
1010
public operationType: OperationType = "create";
1111
protected argsShape = {
1212
projectName: AtlasArgs.projectName().optional().describe("Name for the new project"),

src/tools/atlas/read/getPerformanceAdvisor.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ const PerformanceAdvisorOperationType = z.enum([
2424
]);
2525

2626
export class GetPerformanceAdvisorTool extends AtlasToolBase {
27-
public name = "atlas-get-performance-advisor";
28-
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`;
27+
public internalName = "atlas-get-performance-advisor";
28+
protected internalDescription = `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`;
2929
public operationType: OperationType = "read";
3030
protected argsShape = {
3131
projectId: AtlasArgs.projectId().describe(

src/tools/atlas/read/inspectAccessList.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ export const InspectAccessListArgs = {
88
};
99

1010
export class InspectAccessListTool extends AtlasToolBase {
11-
public name = "atlas-inspect-access-list";
12-
protected description = "Inspect Ip/CIDR ranges with access to your MongoDB Atlas clusters.";
11+
public internalName = "atlas-inspect-access-list";
12+
protected internalDescription = "Inspect Ip/CIDR ranges with access to your MongoDB Atlas clusters.";
1313
public operationType: OperationType = "read";
1414
protected argsShape = {
1515
...InspectAccessListArgs,

src/tools/atlas/read/inspectCluster.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ export const InspectClusterArgs = {
1111
};
1212

1313
export class InspectClusterTool extends AtlasToolBase {
14-
public name = "atlas-inspect-cluster";
15-
protected description = "Inspect MongoDB Atlas cluster";
14+
public internalName = "atlas-inspect-cluster";
15+
protected internalDescription = "Inspect MongoDB Atlas cluster";
1616
public operationType: OperationType = "read";
1717
protected argsShape = {
1818
...InspectClusterArgs,

src/tools/atlas/read/listAlerts.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ export const ListAlertsArgs = {
88
};
99

1010
export class ListAlertsTool extends AtlasToolBase {
11-
public name = "atlas-list-alerts";
12-
protected description = "List MongoDB Atlas alerts";
11+
public internalName = "atlas-list-alerts";
12+
protected internalDescription = "List MongoDB Atlas alerts";
1313
public operationType: OperationType = "read";
1414
protected argsShape = {
1515
...ListAlertsArgs,

src/tools/atlas/read/listClusters.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ export const ListClustersArgs = {
1616
};
1717

1818
export class ListClustersTool extends AtlasToolBase {
19-
public name = "atlas-list-clusters";
20-
protected description = "List MongoDB Atlas clusters";
19+
public internalName = "atlas-list-clusters";
20+
protected internalDescription = "List MongoDB Atlas clusters";
2121
public operationType: OperationType = "read";
2222
protected argsShape = {
2323
...ListClustersArgs,

0 commit comments

Comments
 (0)