Skip to main content
Glama

Surgically edit text inside a flow

workbench_flows_edit_text
Destructive

Applies ONE precise text replacement to a flow's DRAFT orchestration — Edit-tool semantics: find must be the EXACT current text, copied character-for-character from workbench_flows_get, and must occur exactly once anywhere in the flow (system prompts, node settings, metadata, a node's type). find is text inside ONE value, not JSON: to change a model, find the model slug alone (anthropic-claude-haiku-4-5) and replace it with another llm slug from workbench_node_catalog_get. It can't add or remove nodes or links. Zero or multiple matches return an error instead of guessing. This is the improvement primitive: check receipts first with caliper_flow_performance, cite the run id in note, apply the edit after approval, then re-run the eval with caliper_evals_run and report the score delta — never claim improvement without the before/after. Edits land on the draft only; the published version changes when someone publishes (workbench_flows_publish, after the user has seen the result). May return needs_confirmation — show the user the exact find/replace diff and wait.

Input Schema

NameRequiredDescriptionDefault
findYesEXACT current text (≥3 chars), copied verbatim — never reconstructed from memory.
noteYesWhy this edit. Cite eval run ids when it follows a measurement (e.g. 'refund answers scored 1/5 on accuracy in run cer_abc — adds the manager-approval rule'). Lands in the audit log.
flowIdYesFlow to edit.
replaceYesReplacement text.
workspaceNoWorkspace slug. Personal tokens with no default workspace MUST pass this.
approvalIdNoApproval id from a prior needs_confirmation envelope.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior3/5

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

Annotations already declare destructiveHint=true and readOnlyHint=false, so the mutation/safety profile is known. The description nonetheless adds real context beyond them: edits land on the draft only and publishing is a separate step, zero/multiple matches error rather than guess, and a `needs_confirmation` envelope may require showing a diff and waiting. That is useful behavioral detail layered on top of the annotations.

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 edit-tool semantics. The sentence count is high, but nearly every sentence carries constraint or workflow info that isn't repeated elsewhere; the density is slightly sprawling but not wasteful.

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?

With no output schema and a mutation tool that can return a confirmation envelope, the description is complete enough for an agent to call it correctly: sourcing the find text, uniqueness constraints, draft-vs-published effects, and the approval/re-run loop are all covered.

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 100%, so the baseline is 3, but the description adds genuine semantics: `find` must be exact text copied character-for-character from workbench_flows_get, must occur exactly once, is text inside a single value rather than JSON, with a concrete model-slug example. This goes beyond the schema's own parameter text and compensates for any inference an agent might otherwise make.

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: applies ONE precise text replacement to a flow's DRAFT orchestration. It is clearly distinguished from structural siblings like workbench_flows_update by explicitly saying it can't add or remove nodes or links.

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?

Gives explicit when-to-use context (the improvement primitive), the ordering of steps (check caliper_flow_performance, cite run id, apply after approval, re-run caliper_evals_run), and points to workbench_flows_get for sourcing the exact text. Alternatives and exclusions are both named.

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