Skip to main content
Glama

Save a workflow

save_workflow
Idempotent

Create a workflow, or replace the one with this name (saving the same definition again changes nothing more). A workflow is a reusable run definition: start it with create_run and its name, or on a timetable with create_schedule. Connections must already be saved in the organization; reference them by name, never with a URL or a credential. Read the current definition with get_workflow first when you change part of it, because saving replaces the whole definition. Give it a description, and an input_schema and output_schema (JSON Schemas) so that agents can discover and call it: a run's input is checked against input_schema before it starts, and its output must be JSON matching output_schema or the run fails.

Input Schema

NameRequiredDescriptionDefault
webNoWeb access: true, false, or an object limiting it.
nameYesThe workflow's name: letters, digits, dots, dashes and underscores.
filesNoFiles placed in the sandbox (at most 32): inline content, or a file saved in the organization.
modelNoA model id from list_models. Omit for the default.
shellNoWhether the agent may run shell commands in its sandbox.
promptYesWhat the agent should do (maximum 128 KiB).
connectionsNoSaved connections the agent may use (at most 16), keyed by the name the agent sees. Each refers to a connection saved in the organization and can only narrow it.
descriptionNoWhat the workflow does and what input it expects, in a sentence or two, for people and agents. At most 500 characters.
input_schemaNoA JSON Schema (draft 2020-12 or 7, at most 32 KiB, no references to other documents) that each run of this workflow's input must match. A run whose input does not match is refused with the path and the reason, such as "input.city: required".
output_schemaNoA JSON Schema (draft 2020-12 or 7, at most 32 KiB, no references to other documents) that each run of this workflow's output must match. The agent is told the schema and asked to reply with JSON only; the output is then checked, and a run whose output does not match fails with the reason.
timeout_secondsNoWall-clock limit for each run.
zero_data_retentionNoRecord nothing of the runs' content; the output is kept only briefly and released on first retrieval.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.7/5.0
Behavior5/5

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

Beyond what the annotations declare (idempotent, non-destructive), it explains the replace semantics and confirms idempotency ("saving the same definition again changes nothing more"), that connections must pre-exist in the organization and be referenced by name not URL or credential, and how input_schema/output_schema are enforced at run time including failure modes. This is exactly the kind of context the annotations cannot carry.

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?

Roughly four sentences, all of which earn their place, and the create-or-replace behavior is stated first. Some sentences are long and pack multiple rules (validation behavior, connection referencing), which costs a bit of scanability but no content is filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 12-parameter, nested, non-read-only tool with no output schema, the description covers the risky and non-obvious behaviors: wholesale replacement, prerequisite connections, schema contracts and run-failure semantics. It leaves the remaining settings (web, files, shell, model, timeout, retention) entirely to the schema, which is acceptable given 100% coverage but leaves a small gap.

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 parameter baseline is 3; the description adds real meaning on top by explaining the purpose of input_schema (checked before a run starts, refusal reports path and reason) and output_schema (agent replies JSON only, mismatch fails the run), plus the agent-discoverability rationale for name/description. The remaining 10 parameters are not discussed, so it stops short of full compensation.

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?

"Create a workflow, or replace the one with this name" gives a specific verb (create/replace), resource (workflow) and an explicit upsert-by-name scope. It also distinguishes the tool from its siblings by naming get_workflow as the read path and create_run/create_schedule as the consumers of the saved definition.

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?

It states the key sequencing rule outright: "Read the current definition with get_workflow first when you change part of it, because saving replaces the whole definition." That is a concrete when-to-use/when-to-call-something-else instruction, and it further routes prerequisites to list_connections and list_files via the schema-backed field descriptions.

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