Skip to main content
Glama
WapiSender MCP

WapiSender MCP

Official
by Wapi-Sender

update_flow_definition

Replace an existing flow's complete node-and-edge graph to update automation logic, routing, and message handling in one call.

Instructions

Replace the full node+edge graph of an existing flow.

Node schema reference:

WapiSender Flow Node Types:

  • trigger: { type: "trigger", data: { match: "any"|"contains"|"exact"|"regex", keywords: string[] } }

  • send_message: { type: "send_message", data: { messageType: "text"|"image"|"video"|"document"|"audio"|"voice"|"buttons"|"list"|"location"|"poll"|"sticker", text?: string, mediaUrl?: string, audioUrl?: string, stickerUrl?: string } }

  • condition: { type: "condition", data: { source: "last_message"|"custom", variableName?: string, operator: "equals"|"contains"|"starts_with"|"ends_with"|"regex", value: string } } condition has two output handles: "true" and "false"

  • delay: { type: "delay", data: { amount: number, unit: "seconds"|"minutes"|"hours"|"days" } }

  • webhook: { type: "webhook", data: { method: "GET"|"POST"|"PUT"|"PATCH"|"DELETE", url: string, headers?: object, body?: string, responseVariable?: string } }

  • wait_for_reply: { type: "wait_for_reply", data: {} }

  • human_handoff: { type: "human_handoff", data: { message?: string, resumeAfterMinutes: number } }

  • ai_agent: { type: "ai_agent", data: { mode: "reply"|"router"|"extract", credentialId: string, provider: string, model: string, systemPrompt: string, promptTemplate: string, outputVariable: string } }

  • end: { type: "end", data: {} }

Edge format: { id: "e1", source: "nodeId", target: "nodeId", sourceHandle?: "true"|"false" } Positions: spread nodes with ~250px vertical spacing starting at { x: 250, y: 100 }

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": {
      "flowId": "<flowId>",
      "nodes": "<nodes>",
      "edges": "<edges>"
    },
    "name": "update_flow_definition"
  }
}

Input Schema

NameRequiredDescriptionDefault
edgesYesArray of flow edges
nodesYesArray of flow nodes
flowIdYesFlow UUID

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.1

TDQS

A3.5/5.0
Behavior3/5

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

With no annotations at all, the description carries the full burden. It does disclose that the operation replaces the entire graph (an important destructive semantic) and gives practical layout guidance (~250px spacing) to keep the rendered graph usable, but says nothing about permissions, whether the flow must be inactive, validation/rejection behavior, or reversibility.

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?

Purpose is front-loaded in a single sentence, followed by a reference block that earns its length because the schema does not constrain node shapes. The node-type catalog is dense but mostly necessary; minor waste in stylistic layout advice.

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

Completeness3/5

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

For a destructive full-graph replacement with no annotations and no output schema, the description covers the payload shape well but leaves out the node `id` requirement and the operational context (preconditions, failure behavior). An agent could build a syntactically plausible but unlinkable graph from this description alone.

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?

The input schema is generic ('Array of flow nodes' / 'Array of flow edges' with unconstrained objects), so the extensive node-type and edge-format reference adds substantial meaning beyond the schema. However, the node reference omits the node `id` field even though edges reference `source`/`target` as node IDs, leaving a real ambiguity about how nodes are identified.

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?

The first sentence gives a specific verb and resource: 'Replace the full node+edge graph of an existing flow.' The word 'full' implicitly distinguishes it from node-level editing siblings such as update_flow_node, though no sibling is named explicitly.

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

Usage Guidelines3/5

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

Usage is only implied by the word 'Replace' and 'full node+edge graph' – an agent can infer this is for wholesale graph rewrites rather than single-node edits. There is no explicit when-to-use, when-not-to-use, or prerequisite guidance (e.g. whether the flow must be deactivated first).

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.