@dypai-ai/mcp 1.5.0 → 1.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/index.js +14 -40
- package/src/tools/manage-database.js +2 -12
package/package.json
CHANGED
package/src/index.js
CHANGED
|
@@ -201,15 +201,10 @@ NOTE: user IDs are TEXT (better-auth nanoids like "G1LIBXsbMLxUrs99ebCaL9X4auxW2
|
|
|
201
201
|
sort_order: { type: "string", enum: ["asc", "desc"], description: "Sort direction (default 'desc'). Optional for: list." },
|
|
202
202
|
},
|
|
203
203
|
required: ["operation"],
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
{ if: { properties: { operation: { const: "update_role" } }, required: ["operation"] }, then: { required: ["user_id", "role"] } },
|
|
209
|
-
{ if: { properties: { operation: { const: "delete" } }, required: ["operation"] }, then: { required: ["user_id"] } },
|
|
210
|
-
{ if: { properties: { operation: { const: "ban" } }, required: ["operation"] }, then: { required: ["user_id"] } },
|
|
211
|
-
{ if: { properties: { operation: { const: "unban" } }, required: ["operation"] }, then: { required: ["user_id"] } },
|
|
212
|
-
],
|
|
204
|
+
// NOTE: Anthropic's API rejects `oneOf`, `allOf`, `anyOf` at the top
|
|
205
|
+
// level of a tool input_schema. Per-operation required-field checks
|
|
206
|
+
// are enforced inside the tool's execute() (see description for the
|
|
207
|
+
// contract). Do not re-add the allOf block.
|
|
213
208
|
},
|
|
214
209
|
},
|
|
215
210
|
|
|
@@ -234,11 +229,8 @@ Operations:
|
|
|
234
229
|
permissions: { type: "object", description: "JSON of role flags. Keys: manage_users, manage_roles, manage_system. Optional for: create, update." },
|
|
235
230
|
},
|
|
236
231
|
required: ["operation"],
|
|
237
|
-
allOf
|
|
238
|
-
|
|
239
|
-
{ if: { properties: { operation: { const: "update" } }, required: ["operation"] }, then: { required: ["role_id"] } },
|
|
240
|
-
{ if: { properties: { operation: { const: "delete" } }, required: ["operation"] }, then: { required: ["role_id"] } },
|
|
241
|
-
],
|
|
232
|
+
// Anthropic API does not allow allOf/oneOf/anyOf at the top level of
|
|
233
|
+
// a tool input_schema; per-operation required fields validated in execute().
|
|
242
234
|
},
|
|
243
235
|
},
|
|
244
236
|
|
|
@@ -285,10 +277,8 @@ Typical flow:
|
|
|
285
277
|
resource_names: { type: "array", items: { type: "string" }, description: "Optional. For discard: scope to drafts whose resource_name matches one of these. Ignored by list/publish." },
|
|
286
278
|
},
|
|
287
279
|
required: ["operation"],
|
|
288
|
-
allOf
|
|
289
|
-
|
|
290
|
-
{ if: { properties: { operation: { const: "discard" } }, required: ["operation"] }, then: { required: ["confirm"] } },
|
|
291
|
-
],
|
|
280
|
+
// Anthropic API does not allow allOf/oneOf/anyOf at the top level of a
|
|
281
|
+
// tool input_schema. Per-operation required fields validated in execute().
|
|
292
282
|
},
|
|
293
283
|
},
|
|
294
284
|
|
|
@@ -355,14 +345,8 @@ Notes:
|
|
|
355
345
|
offset: { type: "integer", description: "Pagination offset. Default 0." },
|
|
356
346
|
},
|
|
357
347
|
required: [],
|
|
358
|
-
allOf
|
|
359
|
-
|
|
360
|
-
{ if: { properties: { operation: { const: "delete" } }, required: ["operation"] }, then: { required: ["name"] } },
|
|
361
|
-
{ if: { properties: { operation: { const: "upload_file" } }, required: ["operation"] }, then: { required: ["bucket", "local_path"] } },
|
|
362
|
-
{ if: { properties: { operation: { const: "list_objects" } }, required: ["operation"] }, then: { required: ["bucket"] } },
|
|
363
|
-
{ if: { properties: { operation: { const: "delete_object" } }, required: ["operation"] }, then: { required: ["bucket", "name"] } },
|
|
364
|
-
{ if: { properties: { operation: { const: "get_signed_download_url" } }, required: ["operation"] }, then: { required: ["bucket", "name"] } },
|
|
365
|
-
],
|
|
348
|
+
// Anthropic API does not allow allOf/oneOf/anyOf at the top level of a
|
|
349
|
+
// tool input_schema. Per-operation required fields validated in execute().
|
|
366
350
|
},
|
|
367
351
|
},
|
|
368
352
|
|
|
@@ -401,12 +385,8 @@ and \`dypai_push\`. This tool does NOT modify the schedule definition.`,
|
|
|
401
385
|
offset: { type: "integer", description: "Pagination offset. Optional for: list, history. Default 0." },
|
|
402
386
|
},
|
|
403
387
|
required: ["operation"],
|
|
404
|
-
allOf
|
|
405
|
-
|
|
406
|
-
{ if: { properties: { operation: { const: "pause" } }, required: ["operation"] }, then: { required: ["endpoint_name"] } },
|
|
407
|
-
{ if: { properties: { operation: { const: "resume" } }, required: ["operation"] }, then: { required: ["endpoint_name"] } },
|
|
408
|
-
{ if: { properties: { operation: { const: "history" } }, required: ["operation"] }, then: { required: ["endpoint_name"] } },
|
|
409
|
-
],
|
|
388
|
+
// Anthropic API does not allow allOf/oneOf/anyOf at the top level of a
|
|
389
|
+
// tool input_schema. Per-operation required fields validated in execute().
|
|
410
390
|
},
|
|
411
391
|
},
|
|
412
392
|
|
|
@@ -448,14 +428,8 @@ endpoint YAML and \`dypai_push\`. This tool does NOT modify the definition.`,
|
|
|
448
428
|
test_headers: { type: "object", description: "Extra headers to attach to the synthetic call. Optional for: test." },
|
|
449
429
|
},
|
|
450
430
|
required: ["operation"],
|
|
451
|
-
allOf
|
|
452
|
-
|
|
453
|
-
{ if: { properties: { operation: { const: "pause" } }, required: ["operation"] }, then: { required: ["endpoint_name"] } },
|
|
454
|
-
{ if: { properties: { operation: { const: "resume" } }, required: ["operation"] }, then: { required: ["endpoint_name"] } },
|
|
455
|
-
{ if: { properties: { operation: { const: "history" } }, required: ["operation"] }, then: { required: ["endpoint_name"] } },
|
|
456
|
-
{ if: { properties: { operation: { const: "test" } }, required: ["operation"] }, then: { required: ["endpoint_name"] } },
|
|
457
|
-
{ if: { properties: { operation: { const: "rotate_secret" } }, required: ["operation"] }, then: { required: ["endpoint_name"] } },
|
|
458
|
-
],
|
|
431
|
+
// Anthropic API does not allow allOf/oneOf/anyOf at the top level of a
|
|
432
|
+
// tool input_schema. Per-operation required fields validated in execute().
|
|
459
433
|
},
|
|
460
434
|
},
|
|
461
435
|
|
|
@@ -512,18 +512,8 @@ export const manageDatabaseTool = {
|
|
|
512
512
|
},
|
|
513
513
|
},
|
|
514
514
|
required: ["operation"],
|
|
515
|
-
allOf
|
|
516
|
-
|
|
517
|
-
then: { required: ["migration_file"] } },
|
|
518
|
-
{ if: { properties: { operation: { const: "introspect_schema" } }, required: ["operation"] },
|
|
519
|
-
then: { required: ["name"] } },
|
|
520
|
-
{ if: { properties: { operation: { const: "introspect_table" } }, required: ["operation"] },
|
|
521
|
-
then: { required: ["name"] } },
|
|
522
|
-
{ if: { properties: { operation: { const: "introspect_function" } }, required: ["operation"] },
|
|
523
|
-
then: { required: ["name"] } },
|
|
524
|
-
{ if: { properties: { operation: { const: "execute_script" } }, required: ["operation"] },
|
|
525
|
-
then: { required: ["sql"] } },
|
|
526
|
-
],
|
|
515
|
+
// Anthropic API does not allow allOf/oneOf/anyOf at the top level of a
|
|
516
|
+
// tool input_schema. Per-operation required fields validated in execute().
|
|
527
517
|
},
|
|
528
518
|
|
|
529
519
|
async execute(args = {}) {
|