Skip to main content
Glama

create_workflow_from_template

Create and save a pending workflow from a built-in or custom YAML template using its parameters, so run_workflow can execute it later.

Instructions

[WRITE] Create and save a workflow from a template, ready for run_workflow.

Takes a template name (workflow_type) plus its params, builds the steps the template defines, and persists the workflow in state "pending" — it is not a dry run. Templates are the built-in types below plus custom YAML templates (list_workflows shows both). Use this when the goal matches a template; use create_workflow instead to save your own step list when none of them fit. A custom YAML template whose destructive or unclassifiable step (or step passing confirm=True) has no require_approval gate before it is refused, naming the step and the file to fix.

Available workflow types:

  • clone_and_test: Clone VM → apply changes → monitor → approve → commit

  • incident_response: Diagnose alert → collect info → approve → remediate

  • plan_and_approve: Wrap aiops batch operations with approval gate

  • compliance_scan: Read-only health/capacity/anomaly check (no approval)

Returns: dict with workflow_id, steps summary, and plan details.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
paramsYesWorkflow-specific parameters.
workflow_typeYesOne of the available workflow types.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv2.3.0

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already cover the safety posture (write, non-idempotent, non-destructive), yet the description adds substantial context beyond them: the workflow persists in 'pending', it is explicitly not a dry run, and custom YAML templates with an unguarded destructive/unclassifiable/confirm=True step are refused with the step and file named. That refusal semantics and persistence detail go well past what the annotations convey.

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-loaded with a [WRITE] marker and a one-sentence purpose, followed by usage, refusal conditions, type list, and returns in a logical order. The four-entry template list is the longest block but each entry carries distinct routing value, so little is wasted.

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?

There is no output schema, and the description compensates by describing the return (workflow_id, steps summary, plan details). With persistence state, refusal behavior, alternative routing, and template enumeration all covered, an agent has everything needed to call it correctly.

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 would be 3, but the description adds genuine meaning: it explains that workflow_type is a template name and enumerates the four available built-in types with their step shapes, plus notes params are workflow-specific. That fills the gap left by the schema's vague 'One of the available workflow types.'

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 and save a workflow from a template') and immediately clarifies the output state ('pending', 'not a dry run'). It explicitly distinguishes itself from the sibling create_workflow, which saves a custom step list instead.

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?

Gives an explicit selection rule: 'Use this when the goal matches a template; use create_workflow instead to save your own step list when none of them fit.' It also names list_workflows as the discovery path for both built-in and custom templates, covering when-to-use, when-not, and alternatives.

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