Skip to main content
Glama

ZeroWidth Workbench

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

TableJSON 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.8/5.0
Behavior5/5

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

Annotations flag it as a destructive, non-read-only mutation, and the description goes well beyond that: edits land on the draft only, zero or multiple matches error rather than guess, it may return a `needs_confirmation` envelope requiring a diff to be shown, and it cannot add/remove nodes or links.

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 find/replace constraint before the workflow narrative, and nearly every sentence carries operational weight. It is dense and long, but the length is justified by the number of constraints it must convey.

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?

Given a 6-param mutation with no output schema, the description covers the failure modes (zero/multiple matches, needs_confirmation), the scoping (draft vs published), and the surrounding measurement workflow. An agent has everything needed to call it correctly.

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 real semantic value not in the schema: `find` is text inside ONE value (not JSON), must be copied character-for-character, must occur exactly once, with a concrete model-slug example for the replace flow.

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+resource ('Applies ONE precise text replacement to a flow's DRAFT orchestration') and immediately scopes it with Edit-tool semantics. It distinguishes itself from structural siblings by explicitly stating 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?

Prescribes the full workflow: measure with caliper_flow_performance first, cite the run id in `note`, apply after approval, then re-run caliper_evals_run and report the delta. Also states the draft/publish boundary and names workbench_flows_get and workbench_flows_publish as the surrounding tools.

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