Skip to main content
Glama

Save a workflow from the Workflow Agent

save_workflow_from_agent
Destructive

Saves a Workflow Agent proposal as a new private workflow or, after confirmation, applies it to an existing workflow while keeping saved inputs and secrets.

Instructions

Save the workflow the Workflow Agent proposed in one of its replies. Without workflow it is saved as a new private workflow. With workflow (the workflow that was attached when the agent was asked to edit it) the proposal replaces that workflow's steps, title and description; its saved input values and hidden secret inputs are kept. Applying needs the attached workflow's loaded_updatetime, and without confirm: true it only returns what would change: show that to the user and repeat the call with confirm: true after they agree. The reply is read again from Wiro, so pass its ids, not the JSON. Wiro checks and prepares the graph against the live model catalog first; if it finds problems, send them back to the Workflow Agent in the same session. Save each proposal once; saving it again can create another copy. Saving is free; running the workflow is charged.

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": {
      "message_id": "<message_id>",
      "session": "<session>"
    },
    "name": "save_workflow_from_agent"
  }
}

Input Schema

NameRequiredDescriptionDefault
tagsNoTags for the workflow.
forceNoWhen applying: overwrite a newer version. Only when the user explicitly wants that.
confirmNoRequired to apply a proposal to an existing workflow, after the user approved the change summary.
sessionYesThe session that reply belongs to.
workflowNoFull slug or URL of the workflow to apply the proposal to. Leave it out to save a new workflow.
message_idYesThe message id from send_agent_message or get_agent_message. One id covers the message and its reply.
artifact_hashNoWhich proposal to save when the reply has more than one (from send_agent_message or get_agent_message).
loaded_updatetimeNoRequired with `workflow`: the attached workflow's `updatetime` from send_agent_message or get_agent_message. Stops the save if someone changed the workflow since.
acknowledge_review_resetNoRequired to change a published workflow, after the user agreed it leaves the gallery until reviewed.

Output Schema

NameRequiredDescriptionDefault
urlYes
modeYes
stateNo
titleYes
inputsYes
changesNo
outputsYes
previewNo
renamedYes
fullSlugYes
warningsYes
discardedNoWith unchanged: Start field changes Wiro does not keep, because it saves Start fields the way the wiro.ai editor writes them.
unchangedNo
nextActionNo
updatetimeNo
reviewResetNo
alreadySavedYes
contentsChangedNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv1.5.3
    • addedOutput schema / properties / nextAction / properties / arguments / propertyNames
      Added value: +{
      +  "type": "string"
      +}
    • addedOutput schema / properties / outputs / propertyNames
      Added value: +{
      +  "type": "string"
      +}
  2. Changed2 schema fields changedv1.5.1
    • addedOutput schema / properties / changes / properties / stepChanges
      Added value: +{
      +  "description": "What changed inside each step of stepsChanged. Input values are JSON text with object keys sorted and secrets hidden; null means not set. A long value is cut around the first place where the old and new value differ, with ... where text is left out.",
      +  "items": {
      +    "additionalProperties": false,
      +    "properties": {
      +      "dependsChange": {
      +        "additionalProperties": false,
      +        "properties": {
      +          "from": {
      +            "items": {
      +              "type": "string"
      +            },
      +            "type": "array"
      +          },
      +          "to": {
      +            "items": {
      +              "type": "string"
      +            },
      +            "type": "array"
      +          }
      +        },
      +        "required": [
      +          "from",
      +          "to"
      +        ],
      +        "type": "object"
      +      },
      +      "inputs": {
      +        "items": {
      +          "additionalProperties": false,
      +          "properties": {
      +            "from": {
      +              "type": [
      +                "string",
      +                "null"
      +              ]
      +            },
      +            "input": {
      +              "type": "string"
      +            },
      +            "to": {
      +              "type": [
      +                "string",
      +                "null"
      +              ]
      +            }
      +          },
      +          "required": [
      +            "input",
      +            "from",
      +            "to"
      +          ],
      +          "type": "object"
      +        },
      +        "type": "array"
      +      },
      +      "modelChange": {
      +        "additionalProperties": false,
      +        "properties": {
      +          "from": {
      +            "type": "string"
      +          },
      +          "to": {
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "from",
      +          "to"
      +        ],
      +        "type": "object"
      +      },
      +      "step": {
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "step",
      +      "inputs"
      +    ],
      +    "type": "object"
      +  },
      +  "type": "array"
      +}
    • addedOutput schema / properties / inputs / items / properties / required
      Added value: +{
      +  "description": "Whether a run must be given this input, as far as Wiro says. Left out when that is not known.",
      +  "type": "boolean"
      +}
  3. Addedv1.4.1

TDQS

A4.6/5.0
Behavior4/5

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

Adds substantial context beyond the destructive/openWorld/non-idempotent annotations: which fields the proposal replaces, which values are preserved (saved inputs, hidden secret inputs), optimistic locking via `loaded_updatetime`, the save-once warning about duplicate copies, and the cost model ('saving is free; running is charged'). It never contradicts the annotations, though it does not cover auth or rate limits.

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-loads the core behavior and every clause carries information, but it is a dense multi-clause paragraph joined by semicolons; splitting the dry-run/confirm protocol and the error-handling loop into separate sentences would scan faster.

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?

For a 9-parameter mutating tool with an output schema and full annotation coverage, the description supplies the full operational loop (propose, dry-run, confirm, handle validation errors, avoid duplicates). Nothing an agent needs to call it safely and correctly is missing.

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 baseline is 3; the description goes further by explaining the cross-parameter dependency (`loaded_updatetime` required with `workflow`), the meaning of the confirm gate, and the instruction to pass ids rather than embedded JSON. `artifact_hash`, `tags`, `force` and `acknowledge_review_reset` are left mostly to their already-detailed schema entries.

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 (save a workflow proposal produced by the Workflow Agent) and scopes it by source (a reply read from Wiro, referenced by ids). This distinguishes it from create_workflow, update_workflow and clone_workflow, which operate on workflows directly rather than on agent proposals.

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?

Explicitly covers the two modes (no `workflow` = new private workflow; with `workflow` = apply proposal to existing), the dry-run-first protocol with `confirm: true`, when `force` applies ('only when the user explicitly wants that'), when `acknowledge_review_reset` is needed, and what to do on validation failure (send problems back to the agent in the same session).

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.