Surgically edit text inside a flow
workbench_flows_edit_textApplies 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
| Name | Required | Description | Default |
|---|---|---|---|
| find | Yes | EXACT current text (≥3 chars), copied verbatim — never reconstructed from memory. | |
| note | Yes | Why 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. | |
| flowId | Yes | Flow to edit. | |
| replace | Yes | Replacement text. | |
| workspace | No | Workspace slug. Personal tokens with no default workspace MUST pass this. | |
| approvalId | No | Approval id from a prior needs_confirmation envelope. |