@ductape/mcp 0.1.9 → 0.1.11

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/dist/index.js CHANGED
@@ -65,6 +65,23 @@ There are THREE categories of operations. Use the right tool for each:
65
65
  cloud connections, and secrets. Environments, app actions, auths, features, quotas,
66
66
  fallbacks, jobs, and healthchecks are configured in the Workbench UI.
67
67
 
68
+ ⚠ MULTI-ENV REQUIREMENT — applies to ALL product assets (storage, database, cache,
69
+ messageBroker, graph, vector, and any other resource with an envs array):
70
+ The envs array MUST contain one entry for EVERY environment defined on the product.
71
+ Omitting an env causes a validation error ("env X is not defined, please provide
72
+ connection details"). You cannot scope an asset to a subset of environments.
73
+
74
+ BEFORE constructing any resource file:
75
+ 1. Run: ductape_cli("products environments list <product_tag> --json")
76
+ 2. Note every slug returned (e.g. dev, snd, prd).
77
+ 3. Collect connection details or confirmation for EACH slug from the user.
78
+
79
+ Sharing one resource across multiple envs is allowed but must be confirmed per env:
80
+ - Ask the user explicitly: "Should <env> use the same <resource> as <other_env>?"
81
+ - Never assume shared configuration without confirmation.
82
+ - For cloud-linked envs, set config.cloud to the connection tag for that env and
83
+ omit raw credentials; the cloud connection must exist for that env too.
84
+
68
85
  2. RUNTIME OPERATIONS (run, dispatch, execute, start, send, produce, query, insert, update, delete…)
69
86
  The "input" field shape is product- and operation-specific — it is NOT derivable from Joi validators.
70
87
  It is defined by how the product's action/feature/session/quota/etc. was configured in Ductape.
@@ -636,7 +653,8 @@ ALL params are passed as a JSON array in positional order matching the SDK signa
636
653
  "graphs.create", "graphs.update", "vectors.create", "vectors.update",
637
654
  "sessions.create", "sessions.update", "healthchecks.create",
638
655
  "quotas.create", "quotas.update", "functions.create", "functions.update",
639
- "agents.create", "agents.update", "models.create", "models.update"
656
+ "agents.create", "agents.update", "models.create", "models.update",
657
+ "storage.create", "storage.update"
640
658
 
641
659
  When to use this tool:
642
660
  - Before calling ductape_execute to create or update any asset — use this to discover required fields
@@ -1112,7 +1130,14 @@ async function main() {
1112
1130
  description: 'Returns the full field manifest for Ductape asset creation/update methods, ' +
1113
1131
  'derived live from the SDK Joi validators. Includes field types, required flags, ' +
1114
1132
  'enum values, nested structures, and all enum constants. ' +
1115
- 'Pass module="app" or module="product" to scope the result.',
1133
+ 'Pass module="app" or module="product" to scope the result.\n\n' +
1134
+ 'ALWAYS call this before constructing a file for "resources <type> create" or any cloud ' +
1135
+ 'import/provision operation — field shapes are not guessable from context.\n\n' +
1136
+ 'Conditional fields: some fields are returned as oneOf (an array of variant shapes). ' +
1137
+ 'For example, storage.create envs[].config is oneOf [awsConfig, gcpConfig, azureConfig] — ' +
1138
+ 'pick the variant whose fields match the envs[].type value (aws/gcp/azure). ' +
1139
+ 'Fields inside oneOf variants are context-dependent and should all be treated as optional ' +
1140
+ 'unless the chosen variant explicitly marks them required.',
1116
1141
  inputSchema: schemaInputSchema,
1117
1142
  }, schemaHandler);
1118
1143
  server.registerTool('ductape_cli', {
@@ -1122,6 +1147,28 @@ async function main() {
1122
1147
  ' - Creating or updating products (products create/update) and apps (apps create/update)\n' +
1123
1148
  ' - Importing an app from a Postman v2.1 or OpenAPI 3.0 file: "apps import <file> -t postman|openapi"\n' +
1124
1149
  ' - Managing resources via "resources <type> <verb>" (databases, storage, caches…)\n' +
1150
+ ' ALWAYS call ductape_schema(module="product") first to get the exact field shape before\n' +
1151
+ ' constructing a file. Storage envs[].config is conditional on envs[].type (aws/gcp/azure)\n' +
1152
+ ' and returned as oneOf — pick the variant matching the type.\n' +
1153
+ ' REQUIRED: before building any resource file, run\n' +
1154
+ ' ductape_cli("products environments list <product_tag> --json")\n' +
1155
+ ' and include an envs entry for EVERY environment returned. Omitting any env causes a\n' +
1156
+ ' validation error. If the user has not supplied connection details for every env, ask\n' +
1157
+ ' them explicitly. Confirm per-env before reusing the same resource across environments.\n' +
1158
+ ' - Three distinct storage registration flows — choose the right one:\n' +
1159
+ ' 1. Manual credentials (bucket already exists, you supply keys directly):\n' +
1160
+ ' resources storage create -f storage.json\n' +
1161
+ ' File shape: { name, tag, envs: [{ slug, type: "aws"|"gcp"|"azure", config: { bucketName, ...creds } }] }\n' +
1162
+ ' For cloud-linked envs set config.cloud to the connection tag and omit raw credentials.\n' +
1163
+ ' 2. Import an existing cloud bucket via a cloud connection (no provisioning):\n' +
1164
+ ' cloud resources import-persist -f import.json --json\n' +
1165
+ ' File requires: cloud (connection tag), service (e.g. "gcs","s3"), type ("storage"),\n' +
1166
+ ' product, component (new tag), env, and the existing bucket identifier (e.g. bucketName).\n' +
1167
+ ' Example: {"cloud":"gcp-conn","service":"gcs","type":"storage","product":"my-product",\n' +
1168
+ ' "component":"assets","env":"snd","bucketName":"my-existing-bucket"}.\n' +
1169
+ ' If import-persist fails, the error message now reports both the create failure and the\n' +
1170
+ ' update fallback failure — read both to diagnose. Do not retry blindly.\n' +
1171
+ ' 3. Provision a brand-new bucket AND register it (see provision-persist docs below).\n' +
1125
1172
  ' - Managing cloud connections and cloud-linked resources\n' +
1126
1173
  ' - Discovering cloud tiers: "cloud tiers --provider <provider> --type <database|storage> [--db-type <type>] --json"\n' +
1127
1174
  ' IMPORTANT: `cloud tiers` has no `list` verb. Use only a tier returned for the selected provider/type.\n' +
@@ -1135,6 +1182,11 @@ async function main() {
1135
1182
  ' the provider resource and component draft. Tier discovery does not by itself prove that a connection supports\n' +
1136
1183
  ' provisioning that service: if provisioning reports an unsupported provider/service pair, stop and report it.\n' +
1137
1184
  ' Never infer an environment, provider service, region, tier, or cost. List/verify each before provisioning.\n' +
1185
+ ' - Known provisioning limitations: MongoDB Atlas (M0 free tier) and Neo4j Aura cannot be provisioned via\n' +
1186
+ ' Ductape — they are import-only. Only AWS, GCP, and Azure managed services support provision-persist.\n' +
1187
+ ' Supported service/component pairs include: rds→database, aurora→database, gcs→storage, s3→storage,\n' +
1188
+ ' azure-blob→storage, cloud-sql→database, neptune→graph, opensearch→vector. Attempting an unsupported pair\n' +
1189
+ ' will return an error; do not retry with a different tier — report the limitation to the user.\n' +
1138
1190
  ' - Listing workspaces, products, secrets\n' +
1139
1191
  ' - Linking a project folder: "link --product <tag> --env <slug>"\n' +
1140
1192
  ' - Syncing sessions/notifications/events: "apply" or "apply sessions" etc.\n' +
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ductape/mcp",
3
- "version": "0.1.9",
3
+ "version": "0.1.11",
4
4
  "description": "MCP server that exposes Ductape SDK operations via the backend proxy",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
package/src/index.ts CHANGED
@@ -76,6 +76,23 @@ There are THREE categories of operations. Use the right tool for each:
76
76
  cloud connections, and secrets. Environments, app actions, auths, features, quotas,
77
77
  fallbacks, jobs, and healthchecks are configured in the Workbench UI.
78
78
 
79
+ ⚠ MULTI-ENV REQUIREMENT — applies to ALL product assets (storage, database, cache,
80
+ messageBroker, graph, vector, and any other resource with an envs array):
81
+ The envs array MUST contain one entry for EVERY environment defined on the product.
82
+ Omitting an env causes a validation error ("env X is not defined, please provide
83
+ connection details"). You cannot scope an asset to a subset of environments.
84
+
85
+ BEFORE constructing any resource file:
86
+ 1. Run: ductape_cli("products environments list <product_tag> --json")
87
+ 2. Note every slug returned (e.g. dev, snd, prd).
88
+ 3. Collect connection details or confirmation for EACH slug from the user.
89
+
90
+ Sharing one resource across multiple envs is allowed but must be confirmed per env:
91
+ - Ask the user explicitly: "Should <env> use the same <resource> as <other_env>?"
92
+ - Never assume shared configuration without confirmation.
93
+ - For cloud-linked envs, set config.cloud to the connection tag for that env and
94
+ omit raw credentials; the cloud connection must exist for that env too.
95
+
79
96
  2. RUNTIME OPERATIONS (run, dispatch, execute, start, send, produce, query, insert, update, delete…)
80
97
  The "input" field shape is product- and operation-specific — it is NOT derivable from Joi validators.
81
98
  It is defined by how the product's action/feature/session/quota/etc. was configured in Ductape.
@@ -647,7 +664,8 @@ ALL params are passed as a JSON array in positional order matching the SDK signa
647
664
  "graphs.create", "graphs.update", "vectors.create", "vectors.update",
648
665
  "sessions.create", "sessions.update", "healthchecks.create",
649
666
  "quotas.create", "quotas.update", "functions.create", "functions.update",
650
- "agents.create", "agents.update", "models.create", "models.update"
667
+ "agents.create", "agents.update", "models.create", "models.update",
668
+ "storage.create", "storage.update"
651
669
 
652
670
  When to use this tool:
653
671
  - Before calling ductape_execute to create or update any asset — use this to discover required fields
@@ -1201,7 +1219,14 @@ async function main() {
1201
1219
  'Returns the full field manifest for Ductape asset creation/update methods, ' +
1202
1220
  'derived live from the SDK Joi validators. Includes field types, required flags, ' +
1203
1221
  'enum values, nested structures, and all enum constants. ' +
1204
- 'Pass module="app" or module="product" to scope the result.',
1222
+ 'Pass module="app" or module="product" to scope the result.\n\n' +
1223
+ 'ALWAYS call this before constructing a file for "resources <type> create" or any cloud ' +
1224
+ 'import/provision operation — field shapes are not guessable from context.\n\n' +
1225
+ 'Conditional fields: some fields are returned as oneOf (an array of variant shapes). ' +
1226
+ 'For example, storage.create envs[].config is oneOf [awsConfig, gcpConfig, azureConfig] — ' +
1227
+ 'pick the variant whose fields match the envs[].type value (aws/gcp/azure). ' +
1228
+ 'Fields inside oneOf variants are context-dependent and should all be treated as optional ' +
1229
+ 'unless the chosen variant explicitly marks them required.',
1205
1230
  inputSchema: schemaInputSchema,
1206
1231
  },
1207
1232
  schemaHandler,
@@ -1216,6 +1241,28 @@ async function main() {
1216
1241
  ' - Creating or updating products (products create/update) and apps (apps create/update)\n' +
1217
1242
  ' - Importing an app from a Postman v2.1 or OpenAPI 3.0 file: "apps import <file> -t postman|openapi"\n' +
1218
1243
  ' - Managing resources via "resources <type> <verb>" (databases, storage, caches…)\n' +
1244
+ ' ALWAYS call ductape_schema(module="product") first to get the exact field shape before\n' +
1245
+ ' constructing a file. Storage envs[].config is conditional on envs[].type (aws/gcp/azure)\n' +
1246
+ ' and returned as oneOf — pick the variant matching the type.\n' +
1247
+ ' REQUIRED: before building any resource file, run\n' +
1248
+ ' ductape_cli("products environments list <product_tag> --json")\n' +
1249
+ ' and include an envs entry for EVERY environment returned. Omitting any env causes a\n' +
1250
+ ' validation error. If the user has not supplied connection details for every env, ask\n' +
1251
+ ' them explicitly. Confirm per-env before reusing the same resource across environments.\n' +
1252
+ ' - Three distinct storage registration flows — choose the right one:\n' +
1253
+ ' 1. Manual credentials (bucket already exists, you supply keys directly):\n' +
1254
+ ' resources storage create -f storage.json\n' +
1255
+ ' File shape: { name, tag, envs: [{ slug, type: "aws"|"gcp"|"azure", config: { bucketName, ...creds } }] }\n' +
1256
+ ' For cloud-linked envs set config.cloud to the connection tag and omit raw credentials.\n' +
1257
+ ' 2. Import an existing cloud bucket via a cloud connection (no provisioning):\n' +
1258
+ ' cloud resources import-persist -f import.json --json\n' +
1259
+ ' File requires: cloud (connection tag), service (e.g. "gcs","s3"), type ("storage"),\n' +
1260
+ ' product, component (new tag), env, and the existing bucket identifier (e.g. bucketName).\n' +
1261
+ ' Example: {"cloud":"gcp-conn","service":"gcs","type":"storage","product":"my-product",\n' +
1262
+ ' "component":"assets","env":"snd","bucketName":"my-existing-bucket"}.\n' +
1263
+ ' If import-persist fails, the error message now reports both the create failure and the\n' +
1264
+ ' update fallback failure — read both to diagnose. Do not retry blindly.\n' +
1265
+ ' 3. Provision a brand-new bucket AND register it (see provision-persist docs below).\n' +
1219
1266
  ' - Managing cloud connections and cloud-linked resources\n' +
1220
1267
  ' - Discovering cloud tiers: "cloud tiers --provider <provider> --type <database|storage> [--db-type <type>] --json"\n' +
1221
1268
  ' IMPORTANT: `cloud tiers` has no `list` verb. Use only a tier returned for the selected provider/type.\n' +
@@ -1229,6 +1276,11 @@ async function main() {
1229
1276
  ' the provider resource and component draft. Tier discovery does not by itself prove that a connection supports\n' +
1230
1277
  ' provisioning that service: if provisioning reports an unsupported provider/service pair, stop and report it.\n' +
1231
1278
  ' Never infer an environment, provider service, region, tier, or cost. List/verify each before provisioning.\n' +
1279
+ ' - Known provisioning limitations: MongoDB Atlas (M0 free tier) and Neo4j Aura cannot be provisioned via\n' +
1280
+ ' Ductape — they are import-only. Only AWS, GCP, and Azure managed services support provision-persist.\n' +
1281
+ ' Supported service/component pairs include: rds→database, aurora→database, gcs→storage, s3→storage,\n' +
1282
+ ' azure-blob→storage, cloud-sql→database, neptune→graph, opensearch→vector. Attempting an unsupported pair\n' +
1283
+ ' will return an error; do not retry with a different tier — report the limitation to the user.\n' +
1232
1284
  ' - Listing workspaces, products, secrets\n' +
1233
1285
  ' - Linking a project folder: "link --product <tag> --env <slug>"\n' +
1234
1286
  ' - Syncing sessions/notifications/events: "apply" or "apply sessions" etc.\n' +