Skip to main content
Glama

Create workflow

create_workflow

Workflow authoring — create a BRAND-NEW workflow (mints the workflow + its version 1). A workflow composes blocks (api_call, sub_workflow, data) over $input and returns {content_type, output}. Fetch the definition's JSON Schema with get_workflow_definition_schema and author against it. The definition is statically validated BEFORE it is written: on error-severity findings nothing is minted (valid=false, created=false, findings returned) — so you never need a separate validate_workflow pass. On success the result also carries any advisory (warning/info) findings, e.g. a bare identifier that should be $-prefixed, or literal text better authored with language "literal". Pass publish=true to create and publish in one step. (To add a version to a workflow that already exists, use create_workflow_version.)

Input Schema

NameRequiredDescriptionDefault
slugYesURL-safe slug, optionally hierarchical (e.g. reports/daily).
publishNoIf true, immediately publish the version this call creates (the common create-then-publish in one step). Defaults to false; omit to leave the version as an unpublished draft.
definitionYesThe workflow definition, as a JSON object. Fetch the exact JSON Schema it must satisfy with get_workflow_definition_schema and author against it (or copy an existing one with the get_*_version tool). The owning service validates it on submit.
descriptionNoWhat this workflow does.
display_nameNoHuman-readable name.

Output Schema

NameRequiredDescriptionDefault
slugNo
validYes
createdYes
versionNo
findingsNo
publishedYes
workflow_idNo

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?

Goes well beyond the annotations: it discloses that the definition is statically validated before write, that error-severity findings abort creation with valid=false, created=false and returned findings, and that advisory findings are surfaced on success. Annotations only cover the safety profile (non-readonly, non-destructive, non-idempotent), so this adds real behavioral value an agent could not infer.

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 identity and the new-vs-version distinction, then layers validation semantics and the publish shortcut. Dense but every sentence carries operational meaning; the parenthetical advisory examples add minor bulk but aid authoring.

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 nested-object mutation tool with an output schema, it covers what an agent needs: schema-fetch workflow (get_workflow_definition_schema), validation timing, failure result fields, and return shape {content_type, output}. Little is left to guess.

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; the description earns above baseline by explaining the consequence of the definition parameter (pre-write validation, failure semantics) and reinforcing the publish=true one-step behavior. It doesn't add much on slug/display_name/description beyond the schema, but the definition semantics are genuinely informative.

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 and resource ('create a BRAND-NEW workflow'), clarifies that it mints the workflow plus version 1, and describes what a workflow composes. It explicitly distinguishes itself from create_workflow_version in the closing sentence, so an agent can route without opening either schema.

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 names the alternative for the adjacent case ('To add a version to a workflow that already exists, use create_workflow_version') and tells the agent a separate validate_workflow pass is unnecessary because validation runs inline. It also documents the publish=true shortcut for create-then-publish.

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