Skip to main content
Glama

Patch WhatsApp flow text

patch_whatsapp_flow_text
Destructive

Rewrite wording inside a WhatsApp Flow draft, and nothing else. Each patch is a JSON pointer (from get_whatsapp_flow: the component's path plus "/" plus the property, e.g. /screens/0/layout/children/1/label) and the replacement string; at most 20 per call, applied all or nothing. Refused outright, with the path named: a pointer that does not land on a text property (a screen id, an action name, a component type, a payload key). A flow that is not a draft cannot be patched at all; a published flow is superseded by a new draft. A value that holds a ${...} reference is a binding, not wording, and is left alone. lock_version is required and must be the one get_whatsapp_flow returned for this flow: it proves the patch was written against the document as it stands.

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": {
      "flow_id": "<flow_id>",
      "patches": "<patches>",
      "lock_version": "<lock_version>"
    },
    "name": "patch_whatsapp_flow_text"
  }
}

Input Schema

NameRequiredDescriptionDefault
flow_idYes
patchesYes
lock_versionYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Annotations only declare destructiveHint=true, idempotentHint=false, and readOnlyHint=false. The description adds substantive behavior beyond that: batch cap of 20, all-or-nothing application, refusal behavior that names the offending path, special handling of ${...} bindings, and the role of lock_version as proof the patch was written against the current document.

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?

Four sentences, each doing distinct work: scope, patch format, refusal/binding rules, concurrency token. The scope statement is front-loaded and there is no filler or repetition of the tool name.

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 three-parameter mutation tool with no output schema and no annotation detail, the description covers preconditions, limits, failure modes, and concurrency requirements. The only gap is what a successful call returns or how the patched draft is verified afterward, though get_whatsapp_flow is implied as the follow-up read.

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 description coverage is 0% and the schema only says patches is an array of path/text objects with length limits, so the description carries the load: it explains that each patch is a JSON pointer plus a replacement string, shows a concrete pointer example, and explains that lock_version must be the value get_whatsapp_flow returned. Only flow_id is left to inference.

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 precise verb and resource plus an explicit scope bound: 'Rewrite wording inside a WhatsApp Flow draft, and nothing else.' It names what may be edited (text properties) versus what may not (screen id, action name, component type, payload key), so an agent can distinguish this from delete/publish/update siblings without opening the schema.

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

Usage Guidelines5/5

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

It states concrete when-not-to-use conditions: only drafts can be patched, published flows are superseded by a new draft, pointers that do not land on a text property are refused, and ${...} bindings are skipped. It also points to get_whatsapp_flow as the source of pointer paths and lock_version, giving the agent the prerequisite tool explicitly.

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