Skip to main content
Glama

replace_journey

DestructiveIdempotent

Replace (update) a journey draft. Full document replacement — include all nodes and properties in the body, the trigger included; anything omitted is deleted. The journey stays a draft; making the change live is a separate step this tool cannot perform. This is where send, delay, branch and exit nodes are added, and send node template IDs must already be scoped to this journey. The result carries a "verification" object read back from the server after the write — check it every time. verified:true means what you asked for is what saved. verified:false names what did not: "fieldMismatches" for node fields that failed to land, "nodeCountMismatch" for a node dropped or added, and "unknownTemplateReferences" for a send node pointing at a template id this journey does not have — almost always a mistyped id, so re-copy it from the create_journey_template or get_journey response it came from. Fix the specific thing named and send the corrected document. Re-sending an identical call changes nothing, and every replace_journey overwrites the whole draft again. An "errorKind" of "unauthorized" means the write itself succeeded and only the read-back was refused: report that as unconfirmed, never as a failed write.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesJourney display name
nodesYesComplete array of journey nodes: the trigger first, a terminal exit last, and everything else between them. Use server-assigned node ids from get_journey — do NOT invent new ids. Send node example: { type: "send", channel: "email", message: { template: "nt_journey_1" } } — the template goes inside message, never at node level, and the id is a journey-scoped one returned by create_journey_template rather than a workspace template id. Copy that id character-for-character from the create_journey_template or get_journey response you got it from — never retype or reconstruct it from memory, since a single dropped or altered character produces a different, non-existent id and the reference silently fails to resolve. channel must always be set to one of "email", "sms", "push", "inbox", "slack", or "msteams" on every send node — do not omit it even though the field is optional. An unset channel makes Studio silently render the node as email: for sms, push, and inbox sends this means the wrong title, an Email Address field shown instead of the real recipient field, no provider picker, and a hard-blocked "+Create message" button, with nothing shown to warn the user. The stored recipient data is not lost and delivery is not affected — this only breaks how the journey looks and works for a human editing it in Studio. Delay node example: { type: "delay", mode: "duration", duration: "PT1H" }. Branch node example: { type: "branch", paths: [{ conditions: ["data.plan", "is equal", "pro"], nodes: [] }], default: { nodes: [] } } — paths and default are both required, and the key inside a path is "conditions", not "condition".
stateNoMust be "DRAFT". These tools cannot publish.
enabledNoWhether the journey is active.
journey_idYesThe journey template ID to update. Copy it exactly, character for character, from the response that returned it — never retype it from memory or reconstruct it.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / journey_id / description
      Previous value: -"The journey template ID to update"New value: +"The journey template ID to update. Copy it exactly, character for character, from the response that returned it — never retype it from memory or reconstruct it."
  2. Changed1 schema field changed
    • changedInput schema / properties / nodes / description
      Previous value: -"Complete array of journey nodes: the trigger first, a terminal exit last, and everything else between them. Use server-assigned node ids from get_journey — do NOT invent new ids. Send node example: { type: \"send\", message: { template: \"nt_journey_1\" } } — the template goes inside message, never at node level, and the id is a journey-scoped one returned by create_journey_template rather than a workspace template id. Delay node example: { type: \"delay\", mode: \"duration\", duration: \"PT1H\" }. Branch node example: { type: \"branch\", paths: [{ conditions: [\"data.plan\", \"is equal\", \"pro\"], nodes: [] }], default: { nodes: [] } } — paths and default are both required, and the key inside a path is \"conditions\", not \"condition\"."New value: +"Complete array of journey nodes: the trigger first, a terminal exit last, and everything else between them. Use server-assigned node ids from get_journey — do NOT invent new ids. Send node example: { type: \"send\", channel: \"email\", message: { template: \"nt_journey_1\" } } — the template goes inside message, never at node level, and the id is a journey-scoped one returned by create_journey_template rather than a workspace template id. Copy that id character-for-character from the create_journey_template or get_journey response you got it from — never retype or reconstruct it from memory, since a single dropped or altered character produces a different, non-existent id and the reference silently fails to resolve. channel must always be set to one of \"email\", \"sms\", \"push\", \"inbox\", \"slack\", or \"msteams\" on every send node — do not omit it even though the field is optional. An unset channel makes Studio silently render the node as email: for sms, push, and inbox sends this means the wrong title, an Email Address field shown instead of the real recipient field, no provider picker, and a hard-blocked \"+Create message\" button, with nothing shown to warn the user. The stored recipient data is not lost and delivery is not affected — this only breaks how the journey looks and works for a human editing it in Studio. Delay node example: { type: \"delay\", mode: \"duration\", duration: \"PT1H\" }. Branch node example: { type: \"branch\", paths: [{ conditions: [\"data.plan\", \"is equal\", \"pro\"], nodes: [] }], default: { nodes: [] } } — paths and default are both required, and the key inside a path is \"conditions\", not \"condition\"."
  3. Changed1 schema field changed
    • changedInput schema / properties / nodes / description
      Previous value: -"Complete array of journey nodes. Use server-assigned node ids from get_journey — do NOT invent new ids. Each node requires type plus type-specific fields."New value: +"Complete array of journey nodes: the trigger first, a terminal exit last, and everything else between them. Use server-assigned node ids from get_journey — do NOT invent new ids. Send node example: { type: \"send\", message: { template: \"nt_journey_1\" } } — the template goes inside message, never at node level, and the id is a journey-scoped one returned by create_journey_template rather than a workspace template id. Delay node example: { type: \"delay\", mode: \"duration\", duration: \"PT1H\" }. Branch node example: { type: \"branch\", paths: [{ conditions: [\"data.plan\", \"is equal\", \"pro\"], nodes: [] }], default: { nodes: [] } } — paths and default are both required, and the key inside a path is \"conditions\", not \"condition\"."
  4. Changed2 schema fields changed
    • changedInput schema / properties / state / description
      Previous value: -"Set to PUBLISHED to publish immediately after replace."New value: +"Must be \"DRAFT\". These tools cannot publish."
    • changedInput schema / properties / state / enum
      Previous value: -[
      -  "DRAFT",
      -  "PUBLISHED"
      -]New value: +[
      +  "DRAFT"
      +]
  5. Added

TDQS

A4.7/5.0
Behavior5/5

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

Annotations declare readOnlyHint=false, idempotentHint=true, destructiveHint=true, and the description richly extends all three: full-replacement delete semantics ('anything omitted is deleted,' 'overwrites the whole draft again'), idempotency confirmation ('Re-sending an identical call changes nothing'), and the verification-object read-back behavior with specific mismatch kinds. The 'errorKind: unauthorized' nuance — write succeeded but read-back refused, report as unconfirmed — is high-value context well beyond what annotations provide. No contradiction with annotations found.

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?

The description is dense and every sentence carries operational value — no filler. Core purpose is front-loaded, and critical verification semantics come before secondary node details. It loses a point for being a single wall-of-text paragraph that partially repeats the schema's own nodes-parameter examples, making it harder to scan despite the high information density.

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?

For a complex, destructive tool with no output schema, the description is remarkably complete: it explains the verification object (the primary return signal), destructive and idempotent behavior, prerequisites (journey-scoped template IDs), error classification for unauthorized read-back, and remediation steps ('Fix the specific thing named and send the corrected document'). Nothing an agent needs to call it correctly or interpret its result is missing.

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

Parameters5/5

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

Even with 100% schema coverage, the description adds substantial meaning: exact node ordering (trigger first, terminal exit last), instruction to use server-assigned IDs and never invent new ones, the send-node template placement ('inside message, never at node level'), the channel-field gotcha with its silent email-render consequences, and the branch-node 'conditions' vs 'condition' key warning. It also reinforces character-for-character ID copying for journey_id. This far exceeds the baseline for fully covered schemas.

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?

The description opens with a specific verb+resource pairing, 'Replace (update) a journey draft,' and immediately clarifies scope: full document replacement with the trigger included. It distinguishes itself from siblings by stating the journey remains a draft (versus publish_journey) and by framing itself around journey drafts (versus replace_journey_template).

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?

The description gives explicit when-to-use context: 'This is where send, delay, branch and exit nodes are added.' It states a key exclusion — 'making the change live is a separate step this tool cannot perform' — and names source tools (create_journey_template, get_journey) for obtaining IDs. It does not explicitly name the publish tool as the alternative or contrast itself with replace_journey_template, so the exclusions are clear but the alternative names are partially implied.

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