Skip to main content
Glama

ap_add_branch

ap_add_branch

Add a conditional branch to a router step. Inserted before the fallback branch.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
flowIdYesThe id of the flow
branchNameYesDisplay name for the new branch (e.g. "Branch 1")
conditionsNoConditions array (outer array = OR groups, inner array = AND conditions). Required for condition-type branches; omit to use an empty condition group.
routerStepNameYesThe name of the ROUTER step to add a branch to. Use ap_flow_structure to get valid values.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

B3.3/5.0
Behavior3/5

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

Annotations already disclose the operation is a mutation (readOnlyHint=false) that is non-idempotent and non-destructive, so the safety profile is covered. The description adds one genuinely useful behavioral fact beyond that: the new branch is inserted before the fallback branch, establishing ordering semantics. It does not disclose what happens on repeated calls or whether the flow must be in a draft state.

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

Conciseness5/5

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

Two short sentences, the core action front-loaded and the ordering constraint immediately after. Every sentence carries information and there is no filler.

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

Completeness3/5

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

For a mutation tool with no output schema and full parameter coverage, the schema carries most of the burden, and the ordering note is a genuinely useful addition. However, the description omits likely-relevant context such as the effect of non-idempotent repeated calls (duplicate branches) and prerequisites on router step state.

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

Parameters3/5

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

Schema description coverage is 100% and all four parameters (flowId, routerStepName, branchName, conditions) are well documented in the schema, including the nested condition structure and operator semantics. The description adds no parameter syntax or format detail, so the baseline of 3 applies.

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

Purpose4/5

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

The description gives a specific verb and resource ('Add a conditional branch to a router step'), which clearly separates it from ap_update_branch and ap_delete_branch. It does not, however, name those siblings or otherwise distinguish itself explicitly; sibling differentiation is left to inference from the verb.

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

Usage Guidelines2/5

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

There is no statement of when to use this tool versus ap_update_branch, ap_delete_branch, or ap_add_step. The only hint ('Use ap_flow_structure to get valid values') lives in the schema's routerStepName field, not the description, so the description itself offers no routing guidance.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources