MCP tool

    exo_activate_flow

    Switch on a flow in staging, after the same checks as the app.

    For tools and AI agents: this page as Markdown · the public OpenAPI file

    Description

    Runs the same activation checks as the app (connections, error handling, trigger and structure) and activates the flow in staging. It never touches production: a flow whose environment is production is refused. A flow in development is moved to staging. New flows are created with production as their environment, so a person first moves a flow to staging in the app. On a flow that is already active in staging it changes nothing.

    Before it activates a flow, it also checks that flow and the flows it runs as sub-flows (up to six levels deep). It refuses when any of them runs a Nafath, Muqeem or Tamm government step withheld from AI clients, has a sub-flow step without a fixed target flow (including one an AI agent would fill in at run time), or has a step with two conflicting step types, and when the sub-flows go deeper than six levels. A person activates such a flow in the app.

    Once active, the flow is also offered as a flow tool to keys with execute; its runs carry the environment staging.

    Permission

    Needs an API key or OAuth connection with the build permission.

    Input

    NameTypeRequiredDescription
    flowIdstringYesThe tenant-owned flow id to activate in staging.
    environmentstring: stagingNoOptional explicit environment. Only staging is accepted.

    Returns

    activated: true, flowId, status: "active", environment: "staging", productionPromoted: false, lintWarnings and repairNotes. When the checks fail: activated: false and gateFailures, with isError: true.

    Errors

    Returned as a normal result with isError: true:

    • `flowId` is required.
    • MCP activation is staging-only. Production promotion must be performed by a human in Exomations.
    • Flow "<flowId>" not found.
    • This flow is currently in production. MCP cannot demote or alter a production flow; create or switch to a staging draft first.
    • Flow "<name>" was NOT activated: it runs a Nafath, Muqeem or Tamm government step that is withheld from AI clients, directly or through a sub-flow. Activate it in the Exomations app.
    • Flow "<name>" was NOT activated: a sub-flow step in it (or in a flow it runs) has no fixed target flow, so its target is chosen at run time and cannot be checked here. Activate it in the Exomations app.
    • Flow "<name>" was NOT activated: a step in it (or in a flow it runs) carries two different step types, so it cannot be checked here. Activate it in the Exomations app.
    • Flow "<name>" was NOT activated: it runs sub-flows nested deeper than can be checked here. Activate it in the Exomations app.
    • Flow "<name>" was NOT activated: the workspace's flows could not be read to check it. Activate it in the Exomations app.
    • Flow NOT activated — the shared activation quality gate found <n> blocking issue(s): <issues>
    • Activation failed before the flow was saved.
    • Flow "<name>" was not activated because its schedule could not be registered: <reason>

    Returned as a JSON-RPC error:

    CodeHTTPMessage
    -32001403API key lacks the 'build' permission required for flow authoring tools

    Messages are shown exactly as the server sends them, in English. A value in angle brackets is filled in at run time.

    Examples

    Example call

    {
      "jsonrpc": "2.0",
      "id": 1,
      "method": "tools/call",
      "params": {
        "name": "exo_activate_flow",
        "arguments": {
          "flowId": "7a17617d-3c4e-4f0a-9b1e-2d5c8e0f4a61"
        }
      }
    }

    Example result

    {
      "jsonrpc": "2.0",
      "id": 1,
      "result": {
        "content": [
          {
            "type": "text",
            "text": "Flow \"Overdue invoice reminders\" activated in STAGING. Production promotion was not changed.\n{ ... }"
          }
        ],
        "structuredContent": {
          "activated": true,
          "flowId": "7a17617d-3c4e-4f0a-9b1e-2d5c8e0f4a61",
          "status": "active",
          "environment": "staging",
          "productionPromoted": false,
          "lintWarnings": [],
          "repairNotes": []
        },
        "isError": false
      }
    }

    Example values. In content, the text after the summary line is the same data as structuredContent.