Skip to main content
Tool: save_workflow. Requires Editor, Admin, or Owner in the applicable workspace and a connected OAuth session. Read get_workflow first and edit its returned code. Submit the complete updated source with the same numeric workflow_id; patches are not accepted. Success has saved: true and version status draft. The agent lifecycle is separate and may stay active while a draft is edited. Inspect structured failure fields including error_code, error, and optional validation details. Parser errors can identify a source location. Preserve fields you did not intend to change. Saving does not publish or execute a call; URL checks can resolve hostnames.

Example: update one prompt

  1. Call get_workflow with { "workflow_id": 42 }, using an agent ID from your workspace.
  2. Read the returned code string. For an agent whose prompt is Be helpful and concise., change only that prompt to Ask one question.. Keep every node, edge, identifier, and other setting.
  3. Call save_workflow with workflow_id: 42 and code set to the entire edited string, not just the new prompt.
  4. Confirm saved: true and version_status: "draft" before continuing. Run Validate an agent to inspect the saved definition.

Arguments

Result and errors

The schema below describes MCP structuredContent, including the result wrapper where present. Your client may also display a text representation. Read success flags and structured errors before continuing; transport success alone does not prove the operation succeeded. Authentication, missing membership, and insufficient role can fail before a tool result is produced. See troubleshooting. Effect: Changes state. Retry: Do not blindly repeat successful calls. Discovery annotations describe behavior; they do not grant permission or replace confirmation for consequential actions.