Execute codeMINTLIFY_MCP_EXECUTE_CODE
Run TypeScript/JavaScript against the Admin MCP dashboard SDK inside a sandboxed Cloudflare isolate. The script body has access to top-level namespace proxies (workflows, deployment, members, billing, integrations, analytics, deployments) plus console. No outbound fetch, no bindings, no secrets. The OAuth scopes on the calling token gate each individual SDK call through the gateway. **Targeting deployments**: every namespace method takes an optional second argument `{ subdomain }` to target a specific deployment in the org — e.g. `workflows.listWorkflows({}, { subdomain: 'acme' })`; omit it to use the token's default deployment. You can target different deployments in a single run. `deployments.list()` enumerates the org's deployments (org-wide; requires the `deployment:read` scope) and returns `{ deployments: [{ _id, subdomain }, ...] }`. **Return semantics**: the script is wrapped in an async function and the value of the LAST expression statement becomes the result — `await workflows.listWorkflows();` on its own line works, but a bare `return X;` at top level is dropped (no enclosing function), and `export default async function() { return X; }` returns the function object, not `X`. To return a structured value either end with an expression (`({ a, b });` or just `x`) or assign to a variable and reference it on the last line. Returns a tagged-union envelope: { ok: true, result, logs, truncated, durationMs } | { ok: false, error: { code, message }, logs, truncated, durationMs }. `truncated: true` signals the result or logs hit the size cap. Error codes: unauthorized, invalid_json, invalid_request, misconfigured, timeout (30s wall-clock), sandbox_error (anything thrown inside the script), execution_failed (worker plumbing failure).