Skip to main content
Glama

Set when a journey ends early

set_journey_stop_rules
Idempotent

Choose when a journey ends early for a person, checked before every step (so nothing more is sent): replied = they send a message after their run started; stop_events = your system sends one of these events (journeys started by your own system only); lead_stages = Mondovo's own site only; unanswered_followup = false lets its WhatsApp steps send even though an earlier automatic follow-up went unanswered (Mondovo's own site only; a pause request still holds). STOP / unsubscribe always end it. get_journey shows the current rules as ends_early_when. Saves a new version: runs already in progress keep the rules they started with.

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": {
      "site_id": "<site_id>",
      "journey_id": "<journey_id>"
    },
    "name": "set_journey_stop_rules"
  }
}

Input Schema

NameRequiredDescriptionDefault
repliedNotrue = end it when they write to you after it starts (the usual choice for follow-ups)
site_idYesThe site, from list_sites
user_goalNoOptional: the user's goal behind this call, in one short sentence of plain words (e.g. "add a page so customers can book tables"). No names, emails or other personal details.
journey_idYesThe journey, by id from list_journeys
lead_stagesNoMondovo's own site only: end it when the ad lead reaches any of these stages. Replaces the list.
stop_eventsNoEvents from your own system that end it, e.g. ["order.cancelled"]. Replaces the list.
unanswered_followupNoMondovo's own site only. true (default) = wait while an earlier automatic follow-up is unanswered; false = send anyway (a deliberate second try). Applies to messages already waiting too.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / unanswered_followup
      Added value: +{
      +  "description": "Mondovo's own site only. true (default) = wait while an earlier automatic follow-up is unanswered; false = send anyway (a deliberate second try). Applies to messages already waiting too.",
      +  "type": "boolean"
      +}
  2. Added

TDQS

A4.3/5.0
Behavior5/5

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

Adds substantial behavior beyond the annotations: rules are evaluated before every step, saves create a new version so in-flight runs keep their original rules, STOP/unsubscribe always terminates regardless of settings, and a pause request still holds even with unanswered_followup=false. This versioning and hard-stop context is exactly what an agent needs before mutating live automation.

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-loads the core purpose and constraint, and every clause carries real information. It is a single dense paragraph with multiple parentheticals, which makes scanning harder than a short bulleted list of the four rule options would be.

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?

For a 7-parameter mutation tool with no output schema, the description covers the decision logic, versioning side effects, and the cross-reference needed to inspect existing rules. It says nothing about failure modes or permission requirements, which is a minor gap given how thoroughly the semantics are covered.

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 every parameter, and the description largely restates those descriptions. It does add some interpretation — that false for unanswered_followup lets WhatsApp steps send as a deliberate second try, and that stop_events only apply to journeys started by the caller's own system — so it goes slightly beyond the schema but does not carry the burden.

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 — choosing the conditions under which a journey ends early — and adds the scope detail that the rules are checked before every step so nothing more is sent. It is clearly distinguished from the read-side sibling get_journey, which it names as the way to view current rules.

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?

Explains what each option means and when it is the right choice (e.g. replied as 'the usual choice for follow-ups'), and implies the read/write split by pointing to get_journey for viewing rules. It stops short of stating explicit preconditions or when not to call it, so it falls short of a full when/when-not/alternatives treatment.

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