Skip to content

Commit 809aa9a

Browse files
committed
tweak descriptions and errors
1 parent 3fab3b7 commit 809aa9a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/tools/mongodb/create/createIndex.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -114,10 +114,10 @@ export class CreateIndexTool extends MongoDBToolBase {
114114
})
115115
.refine((data) => data.dynamic !== !!(data.fields && Object.keys(data.fields).length > 0), {
116116
message:
117-
"Either `mappings.dynamic` must be true or at least one field must be defined in `mappings.fields`",
117+
"Either `dynamic` must be `true` and `fields` empty or `dynamic` must be `false` and at least one field must be defined in `fields`",
118118
})
119119
.describe(
120-
"Document describing the index to create. Either `dynamic` must be true or at least one field must be defined in the `fields` document."
120+
"Document describing the index to create. Either `dynamic` must be `true` and `fields` empty or `dynamic` must be `false` and at least one field must be defined in the `fields` document."
121121
),
122122
})
123123
.describe("Definition for an Atlas Search (lexical) index.");
@@ -142,7 +142,7 @@ export class CreateIndexTool extends MongoDBToolBase {
142142
])
143143
)
144144
.describe(
145-
"The index definition. Use 'classic' for standard indexes, 'vectorSearch' for vector search indexes, and 'search' for Atlas Search (lexical) indexes."
145+
`The index definition.${this.isFeatureEnabled("vectorSearch") ? " Use 'classic' for standard indexes, 'vectorSearch' for vector search indexes, and 'search' for Atlas Search (lexical) indexes." : ""}`
146146
),
147147
};
148148

0 commit comments

Comments
 (0)