Skip to content

Commit 106e28a

Browse files
committed
chore: make args optional
1 parent 2ad52a6 commit 106e28a

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

src/common/config.ts

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -160,8 +160,7 @@ function isConnectionSpecifier(arg: string | undefined): boolean {
160160
}
161161

162162
export const UserConfigSchema = z.object({
163-
// Atlas API Options
164-
apiBaseUrl: z.string(),
163+
apiBaseUrl: z.string().optional(),
165164
apiClientId: z
166165
.string()
167166
.optional()
@@ -183,6 +182,7 @@ export const UserConfigSchema = z.object({
183182
logPath: z.string().describe("Folder to store logs."),
184183
disabledTools: z
185184
.array(z.string())
185+
.optional()
186186
.describe("An array of tool names, operation types, and/or categories of tools that will be disabled."),
187187
confirmationRequiredTools: z
188188
.array(z.string())
@@ -200,14 +200,12 @@ export const UserConfigSchema = z.object({
200200
readOnly: z
201201
.boolean()
202202
.default(false)
203-
.optional()
204203
.describe(
205204
"When set to true, only allows read, connect, and metadata operation types, disabling create/update/delete operations."
206205
),
207206
indexCheck: z
208207
.boolean()
209208
.default(false)
210-
.optional()
211209
.describe(
212210
"When set to true, enforces that query operations must use an index, rejecting queries that perform a collection scan."
213211
),
@@ -226,6 +224,7 @@ export const UserConfigSchema = z.object({
226224
.describe("Host address to bind the HTTP server to (only used when transport is 'http')."),
227225
httpHeaders: z
228226
.record(z.string())
227+
.optional()
229228
.describe(
230229
"Custom HTTP headers to include in responses from the HTTP server (only used when transport is 'http'). Useful for adding CORS headers, authentication tokens, or other custom headers required by your client application."
231230
),
@@ -266,15 +265,21 @@ export const UserConfigSchema = z.object({
266265
),
267266
voyageApiKey: z
268267
.string()
268+
.optional()
269269
.describe(
270270
"API key for Voyage AI embeddings service (required for vector search operations with text-to-embedding conversion)."
271271
),
272272
disableEmbeddingsValidation: z
273273
.boolean()
274+
.optional()
274275
.describe("When set to true, disables validation of embeddings dimensions."),
275-
vectorSearchDimensions: z.number().describe("Default number of dimensions for vector search embeddings."),
276+
vectorSearchDimensions: z
277+
.number()
278+
.optional()
279+
.describe("Default number of dimensions for vector search embeddings."),
276280
vectorSearchSimilarityFunction: z
277281
.custom<Similarity>()
282+
.optional()
278283
.describe("Default similarity function for vector search: 'euclidean', 'cosine', or 'dotProduct'."),
279284
});
280285

0 commit comments

Comments
 (0)