Skip to main content
Glama

ap_update_branch

ap_update_branch
DestructiveIdempotent

Update the conditions and/or name of an existing router branch. Does not affect the steps inside the branch.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
flowIdYesThe id of the flow
branchNameNoNew display name for the branch
conditionsNoNew conditions array (outer array = OR groups, inner array = AND conditions). Replaces the existing conditions entirely.
branchIndexYesThe index of the branch to update (0-based). Cannot update the fallback branch conditions.
routerStepNameYesThe name of the ROUTER step. Use ap_flow_structure to get valid values.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

B3.4/5.0
Behavior3/5

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

Annotations declare destructiveHint=true and idempotentHint=true, so the agent knows this replaces conditions and is idempotent. The description adds that steps inside the branch are unaffected, which is useful context beyond annotations. However, it doesn't mention permission requirements or that conditions are fully replaced (that detail is only in the schema).

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 sentences, both earning their place: the first states the action, the second clarifies non-impact. Front-loaded with the primary purpose, no waste.

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

Completeness4/5

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

Annotations cover safety flags, schema covers parameters thoroughly, and no output schema means return values needn't be described. The description is complete enough for an agent to understand the tool's scope and side effects, though it could mention prerequisites like fetching the flow structure first.

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 coverage is 100%, so the schema already documents all parameters in detail, including the exact replacement semantics for conditions and the 0-based branchIndex with fallback restriction. The description adds no parameter-level meaning beyond what the schema provides. Baseline 3 is appropriate.

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?

States a clear verb+resource: update conditions and/or name of an existing router branch. The added clause 'Does not affect the steps inside the branch' clarifies scope. It does not differentiate from siblings like ap_update_step or ap_add_branch explicitly, but the verb/resource is specific enough.

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?

No indication of when to use this versus ap_add_branch, ap_delete_branch, or ap_update_step. Only the schema description for routerStepName hints at consulting ap_flow_structure, which is a prerequisite rather than usage guidance. Minimal context provided.

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