Skip to main content
Glama

update_sub_flow

Replaces the cc:steps body of a named sub-flow in assembly.xml to fill TODO stubs from planning, preserving async-mediation settings and validating XML before writing a backup.

Instructions

Replaces the cc:steps body of a named sub-flow in assembly.xml. Use this to fill in a TODO stub generated by plan_integration.

Finds <cc:async-mediation id="Do{sub_flow_id}"> and replaces its cc:steps content with steps_xml. Everything else on the async-mediation is preserved: routes-to, handle-downstream-errors, and the trailing cc:send-error.

steps_xml format:

  • Provide the step elements that go INSIDE cc:steps. Do not include the wrapper.

  • Use \t for tabs. Steps should sit at 4-tab depth (matching skeleton indent).

  • Example for a RAAS fetch + eval: \t\t\t\t<cc:workday-out-rest id="GetWorkers" routes-response-to="TODO_next" \t\t\t\t extra-path="@{intsys.reportService.getExtrapath('alias')}"/>

TOP-LEVEL ELEMENTS WARNING (Studio schema rule confirmed in multiple production builds): The following elements CANNOT appear inside steps_xml — they MUST be top-level elements placed directly inside cc:assembly, not inside cc:steps:

  • cc:workday-out-rest

  • cc:splitter

  • cc:http-out

  • cc:email-out

  • cc:workday-out-soap If your sub-flow needs to call any of these, place them as top-level elements in the assembly and chain to them via routes-to on the async-mediation itself. The validate_assembly tool will catch this mistake automatically.

A .bak backup is written before every change. XML well-formedness is validated before the write is committed.

To also change the routes-to on the async-mediation itself (e.g. from "EndGetWorkers" to "Splitter"), use write_integration_file for a full rewrite.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "project_name": "<project_name>",
      "sub_flow_id": "<sub_flow_id>",
      "steps_xml": "<steps_xml>"
    },
    "name": "update_sub_flow"
  }
}

Input Schema

NameRequiredDescriptionDefault
steps_xmlYesNew step elements for inside <cc:steps>. Omit the <cc:steps> wrapper. Use \t for tabs at 4-tab depth.
sub_flow_idYesBase id used in plan_integration, e.g. "GetWorkers" (NOT "DoGetWorkers"). The tool looks for id="Do{sub_flow_id}" in the assembly.
project_nameYesProject name, e.g. "INT145_My_Integration"

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.8.0

TDQS

A4.8/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden and does so: it discloses what is preserved (routes-to, handle-downstream-errors, trailing <cc:send-error>), that a .bak backup is written before every change, and that well-formedness is validated before the write commits. It also surfaces a non-obvious schema constraint about elements that cannot live inside <cc:steps>.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with the purpose and target before the format rules and warning block, and organized with headers and an example. It is longer than most definitions, but nearly every line prevents a concrete failure mode; the top-level element list is the one section that could be compressed.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a mutation tool with three required params and no output schema, the description covers the target, the exact replacement semantics, what survives the write, backup and validation guarantees, and the escape hatch to a sibling. Nothing an agent needs in order to call it correctly is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3, but the description adds real meaning: it specifies that steps_xml must omit the <cc:steps> wrapper, use \t tabs at 4-tab depth, and includes a worked example. It also clarifies that sub_flow_id is the base id without the 'Do' prefix.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource: replaces the <cc:steps> body of a named sub-flow in assembly.xml, and specifies the exact target element (<cc:async-mediation id="Do{sub_flow_id}">). It also distinguishes itself from write_integration_file, which is needed for a full rewrite.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives an explicit trigger ('Use this to fill in a TODO stub generated by plan_integration') and an explicit alternative for the adjacent case (changing routes-to requires write_integration_file). It also points at validate_assembly as the safety net for the top-level-element rule.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.