Stu Mason · Folkestone, Kent
One entryClosed issue· StuMason/coolify-mcp· TypeScript

Issue #234 closed: scheduled_tasks: command length limit surfaces as bare 'HTTP 500' — validate client-side and document

What happens

Coolify rejects scheduled-task commands beyond roughly ~250 characters, and the failure comes back as a bodyless HTTP 500 which the MCP passes through verbatim (Error: HTTP 500: Internal Server Error). Measured empirically (2026-07-02, Coolify 4.1.2): commands of 132/155/165/247 chars created fine; ~265/~270/~320/~330 chars all 500'd. Burned four create/update attempts bisecting whether the cause was quoting, special characters (->, =>), or length — it was length.

Where

  • command is an unconstrained z.string() in the scheduled_tasks shape: src/lib/mcp-server.ts:1665.
  • Error passthrough: src/lib/coolify-client.ts:512 (request() builds HTTP {status}: {statusText} when there's no body).
  • The limit is documented nowhere in the repo (grepped src, types, site/concepts/coolify-api-gotchas.md, bundled OpenAPI).

Suggested fix

  1. Pin down the exact limit against a current Coolify (it sits somewhere in 248–264 based on the datapoints above; likely a 255 varchar column upstream) and add .max(N, "Coolify rejects scheduled-task commands longer than N chars — split the command or write a script into the container image") on the command field for create AND update.
  2. Add the gotcha (with the workaround) to site/concepts/coolify-api-gotchas.md and the tool description.
  3. (Broader, optional) In request(), when a scheduled-task create/update 500s with no body, append a hint listing known causes — a bare 500 is the worst possible error for an agent to act on.

Acceptance

  • An over-long command fails locally with an actionable message, before any HTTP call.
  • Docs mention the limit.