Skip to main content
Glama

Add a journey step

add_journey_step
Destructive

Insert a step into a journey using an existing anchor from get_journey. position defaults to after; before inserts before it, and path_start inserts at a named split path. After a split, insert into its shared continuation below the paths. Supports email/SMS messages, waits, condition splits, A/B splits, contact updates, webhooks, goals and stops. Sending SMS requires a connected verified sender, billing and consent when sending. Removing A/B variants or adding a terminal step can discard or stop downstream paths, so review the confirmation carefully.

Input Schema

NameRequiredDescriptionDefault
bodyNoPlain message body. Required for SMS; use body_html for email HTML.
tagsNoContact update: full replacement tag list
labelNoOptional step label
stageNoContact update: pipeline stage
channelNoMessage step: email or SMS. Sending SMS requires a connected, verified sender, billing, and consent when sending.
site_idYesThe site, from list_sites
subjectNoEmail step: subject line
path_keyNo
positionNo
templateNoMessage step: optional template name
body_htmlNoEmail step: body HTML; one unsubscribe link is added at send time
conditionNoAdvanced JSONLogic condition, exclusive with condition_field/operator/value; primitive booleans are valid
goal_nameNoGoal step: goal name
step_typeYes
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.
ab_weightsNoA/B step: complete replacement variant map. Removed keys discard their path steps; new keys add empty paths. Weights may be relative.
journey_idYesThe journey, by id from list_journeys
lead_scoreNoContact update: score; null clears it
contact_setNoContact update: complete advanced attribute map, exclusive with tags/stage/lead_score
exit_reasonNoExit step: reason
webhook_urlNoWebhook step: destination URL
wait_minutesNoWait step: minutes (1440 = a day); new waits default to one minute
after_step_idYesA step id exactly as get_journey shows it, e.g. n_email_1
webhook_methodNoWebhook step: HTTP method
condition_fieldNoSimple condition split: field; use condition for advanced JSONLogic instead
condition_valueNoSimple condition split: comparison value
webhook_payloadNoWebhook step: JSON payload; null clears it
condition_operatorNoSimple condition split: operator
webhook_fail_on_errorNoWebhook step: stop the journey if the request fails
translate_to_contact_languageNoEmail step: send each contact the email translated into their language; contacts without one get the original

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / user_goal
      Added value: +{
      +  "description": "Optional: 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.",
      +  "type": "string"
      +}
  2. Changed3 schema fields changed
    • addedInput schema / properties / body
      Added value: +{
      +  "description": "Plain message body. Required for SMS; use body_html for email HTML.",
      +  "maxLength": 200000,
      +  "type": "string"
      +}
    • changedInput schema / properties / channel / description
      Previous value: -"Message step: email is currently available"New value: +"Message step: email or SMS. Sending SMS requires a connected, verified sender, billing, and consent when sending."
    • changedInput schema / properties / channel / enum
      Previous value: -[
      -  "email"
      -]New value: +[
      +  "email",
      +  "sms"
      +]
  3. First observed

TDQS

A4.5/5.0
Behavior5/5

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

Goes well beyond the destructiveHint=true and idempotentHint=false annotations: it warns that removing A/B variants discards their path steps and that adding a terminal step can stop downstream paths, and that a confirmation must be reviewed. It also discloses channel prerequisites for SMS, which the annotations cannot express.

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 core action and anchor requirement, then positioning rules, then step types, then warnings. Dense but every sentence carries information; the step-type enumeration partially duplicates the enum and is the only marginally wasteful piece.

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 30-parameter destructive mutation with no output schema, it covers the workflow dependency (get_journey anchor), positioning modes, channel prerequisites and path-loss risk. It does not hint at which parameters are required per step_type, which is the main remaining gap for such a wide conditional schema.

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 90%, so the baseline is 3, but the description adds real meaning the schema lacks — the semantics of the position enum values and the shared-continuation rule after a split. It also enumerates the step types supported, though that largely restates the step_type enum.

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 ("Insert a step into a journey") and scopes the anchor requirement to ids from get_journey. The list of supported step types makes it immediately distinguishable from update_journey_step, move_journey_step and remove_journey_step.

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?

Gives concrete insertion semantics (position defaults to after; before inserts before the anchor; path_start targets a named split path) and the post-split rule about inserting into the shared continuation. It also lists preconditions for SMS (verified sender, billing, consent). It never explicitly contrasts with update_journey_step or move_journey_step, so no explicit exclusion 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