Skip to main content
Glama

Set a condition before a step

set_sequence_condition
Idempotent

Use when the user wants a follow-up sent only to people who did not reply (or only when a custom field is filled in). Puts a condition between step after_step and step after_step+1; it gates that next step. The usual cold-email rule "stop if they replied" is predicate=replied, negated=true, on_no=stop. on_no=skip jumps over the gated step instead of ending the sequence. One condition per gap: a new one replaces the old. Draft or paused campaigns only. Returns steps and nodes, as list_steps.

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": {
      "id": "<id>",
      "after_step": "<after_step>",
      "predicate": "<predicate>"
    },
    "name": "set_sequence_condition"
  }
}

Input Schema

NameRequiredDescriptionDefault
idYesCampaign id (uuid).
on_noNoWhen the condition is false: stop (default) ends the sequence, skip jumps over the gated step.
negatedNotrue (default) = "if NOT ...".
predicateYesreplied = the prospect replied; has_snippet = the custom field in snippet_field is filled in.
after_stepYesThe condition sits after this step and gates the next one (0 = before step 1). Must be lower than the number of steps.
snippet_fieldNoCustom field name, required for has_snippet.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already flag a non-read-only, idempotent, non-destructive mutation, and the description meaningfully adds to that: it discloses the replacement side effect ('a new one replaces the old'), the draft/paused eligibility restriction, and the behavioral difference between on_no=stop and on_no=skip. It stops short of describing error behavior or what happens to existing nodes when a condition is swapped, which keeps it at a 4.

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?

Five dense sentences ordered as trigger, mechanism, worked example, constraint, return shape — no filler. The 'One condition per gap: a new one replaces the old' line is a compact and important caveat.

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?

With 6 parameters, 3 required, no output schema, the description covers the trigger, the mutation semantics, the eligibility constraint, and even the return shape ('Returns steps and nodes, as list_steps'), leaving nothing material an agent needs before calling.

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 baseline is 3, but the description earns a bump by explaining the interaction of predicate, negated, and on_no concretely (predicate=replied, negated=true, on_no=stop) and by clarifying that skip jumps the gated step rather than ending the sequence. That is meaning beyond the per-field schema text.

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 ('Puts a condition between step after_step and step after_step+1; it gates that next step') and ties it to the exact gap it occupies, which is enough for an agent to distinguish it from add_step/update_step without opening a schema.

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

Usage Guidelines4/5

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

Opens with an explicit trigger ('Use when the user wants a follow-up sent only to people who did not reply...') and gives a canonical configuration for the common 'stop if they replied' rule. It also states hard preconditions (draft or paused campaigns only) and the one-condition-per-gap rule, but never names what to call to remove or change a condition, so alternatives are implied rather than spelled out.

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.