Skip to main content
Glama

create_workflow

Creates a new workflow template (a saved, repeatable multi-step agent task) for the user's current team. New workflows are saved Inactive; set one Active with update_workflow only once the user confirms. Before creating, check list_workflows with a search filter for a duplicate name, and confirm the name with the user.

Required: name, steps (ordered; each specific enough for a fresh agent to do without follow-up questions) and allowed_tools (non-empty: the tools the runner agent is told it may use; prefer tight allowlists). Include schedule_config ONLY if the user explicitly wants it to run on a schedule.

Two switches, two vocabularies, never mixed. The workflow's status is Active or Inactive. Its schedule, if any, is On or Paused. Never call a schedule "active"/"inactive" or a workflow "paused"/"on". Active does not mean running; it means the workflow is allowed to run. It runs on its own only when it is Active AND its schedule is On.

Schedules are always saved Paused. No MCP tool can turn a schedule On: the user does it in the Marcora app with Resume schedule. update_workflow silently ignores schedule changes and still returns success.

What to tell the user: the response carries a next_step stating what will and won't run, computed from what was saved. Lead your reply with it. When a schedule was saved it also carries schedule (is_enabled: false = Paused, plus a plain-language summary) and link_url for the user to review it and click Resume schedule. Never say or imply the workflow will run on its own unless it is Active and its schedule is On.

Schedule shapes: daily at a set time, or weekly on one or more days at a set time (days_of_week, e.g. [1,3,5], with one hour). There is no second time of day and no every-N-hours interval.

Present link_url exactly as returned.

Input roles:

  • name: human-readable name. Confirm with the user before creating.

  • description: one or two sentences. Becomes part of the runner's system prompt.

  • steps: ordered list. Each step should be specific enough that a fresh agent can do it without follow-up questions.

  • inputs: declare what the workflow needs (e.g. topic, date_range).

  • allowed_tools: REQUIRED, non-empty. The tools the runner agent is told it may use when the workflow runs (an instruction in the runner's prompt, not a separate permission check). A workflow cannot be created without an explicit allowlist. Prefer tight allowlists, especially for scheduled runs.

  • tags: optional.

  • schedule_config: include ONLY if the user explicitly wants a schedule. See the schedule_config input for its two modes; prefer the calendar mode (hour, plus days_of_week for weekly).

What actually runs needs BOTH switches; describe the pair that exists when you finish:

  • Inactive → nothing runs, by any route (manual runs are refused too).

  • Active, no schedule → runs only when started manually; never starts by itself.

  • Active, schedule Paused → manual runs work; it won't run on its schedule until the user turns the schedule on with Resume schedule in the app.

  • Active, schedule On → runs on its schedule.

  • Inactive, schedule On → nothing runs until the workflow is set Active.

After a follow-up call: if you then call update_workflow (for example to set the workflow Active), describe the state after THAT call (its next_step), not this one. Activating a workflow whose schedule is Paused still leaves it not running on its schedule; saying "it's inactive, go activate it" after you activated it is just as false. "Created and active" misled a real customer into thinking their workflow was running.

Cadences: "3 times a week", "every weekday" and "Mondays and Thursdays" are expressible exactly: use weekly with days_of_week and one hour, pick the days with the user's intent in mind and say which you chose; do not fall back to an interval. If the user asks for something the two shapes can't express (e.g. "twice a day", "every 36 hours"), save the closest schedule you can, tell the user exactly what you saved (quote schedule.summary) and that it approximates what they asked for. Never present an approximation as the schedule they requested.

Usage patterns:

  • The returned id is a UUID string. Use it as workflow_id in get_workflow / update_workflow / run_workflow / get_workflow_runs.

  • Links: copy link_url character for character. Never retype, shorten, or rebuild a link or the IDs inside it.

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": {
      "name": "<name>",
      "steps": "<steps>",
      "allowed_tools": "<allowed_tools>"
    },
    "name": "create_workflow"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameYesDisplay name for the workflow, shown in the workflow list and passed to the agent that runs it. Required and must be non-empty — a missing or blank value is rejected. `list_workflows` searches on this name, so make it distinctive and confirm the wording with the user first.
tagsNoFree-form labels for organizing workflows. Must be an array of strings; any other value is ignored and a single blank tag is stored instead. Purely descriptive — listing and search do not filter on tags.
stepsYesOrdered list of the actions the workflow should perform, handed to the agent as JSON at run time. Required. Write each step so a fresh agent with no conversation history can carry it out without asking follow-up questions.
inputsNoObject declaring the values this workflow expects at run time (for example a topic or a date range). It is stored and returned as documentation for callers and for the app UI; the agent itself receives the actual per-run values via `input_values`, not this declaration. Optional — defaults to an empty object.
descriptionNoOne or two sentences on what the workflow accomplishes. It is inserted verbatim into the prompt given to the agent that runs the workflow, so write it as orienting context, not marketing copy. Optional — stored as an empty string when omitted.
allowed_toolsYesREQUIRED, non-empty. Tools the workflow runner may use; an empty list is rejected.
schedule_configNoInclude only when the user explicitly asks for the workflow to run on a schedule. A non-empty object creates the schedule, which is always saved Paused — the user turns it on in the app with "Resume schedule", and it fires only while the workflow is Active. Two modes: - **Calendar mode (preferred — it is what the app's editor shows and edits):** set `hour` (integer 0–23, in **UTC**). With `frequency: "weekly"`, set `days_of_week` — an array of 1–7 distinct integers, 0=Sunday … 6=Saturday, in **UTC** — so "3 times a week" is one schedule, e.g. `[1,3,5]`. (The older single `day_of_week` is still read when `days_of_week` is absent; prefer the array.) Any frequency other than weekly runs daily at `hour`. Convert the user's local time (and weekday) to UTC yourself, and set `timezone` to the user's IANA timezone (e.g. "America/Sao_Paulo") for display. - **Interval mode (when `hour` is absent):** runs every `interval_hours` hours, or every 1 / 24 / 168 hours for hourly / daily / weekly if `interval_hours` is omitted. There is no fixed time of day, and the first run is one full interval after the user switches the schedule on. The app's editor cannot show or edit an interval schedule, so use it only when calendar mode can't express what the user needs, and say what you saved. `timezone` is display-only; the scheduler always uses UTC.

Output Schema

NameRequiredDescriptionDefault
idYesWorkflow UUID. Use as workflow_id in other workflow tools.
nameYes
tagsNo
stepsNo
inputsNo
statusYes
team_idYes
link_urlYesDirect URL to view this workflow in Marcora.
scheduleNoPresent only when schedule_config created a schedule. Read back from the saved schedule.
next_stepNoAlways present. What will and won't run, across both switches — the workflow's status (Active / Inactive) and its schedule (On / Paused / none) — computed from what was saved, with the words to use. Follow it and lead your reply with it.
created_atYes
updated_atNo
descriptionNo
allowed_toolsNo
created_by_user_idNo

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?

Annotations only declare the generic write profile (readOnlyHint=false, destructiveHint=false, idempotentHint=false); the description adds non-obvious behavior an agent could not infer: new workflows are saved Inactive, schedules are always saved Paused and no MCP tool can enable them, and update_workflow silently ignores schedule changes while still returning success. It also explains the response contract (next_step, schedule.is_enabled, link_url) and the Active/schedule-On interaction matrix.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Well organized with bold headers and front-loaded purpose, but far longer than needed for a create tool: the 'Input roles' section duplicates the 100%-covered schema, and the 'two switches' explanation is delivered three times (vocabulary rule, the five-bullet state matrix, and the follow-up-call paragraph). The customer-anecdote framing is persuasive but consumes space that could be one line.

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 7-parameter create tool with a nested schedule object and a real output schema, nothing an agent needs is missing: required vs. optional fields, schedule mode selection, UTC-vs-local conversion responsibility, the always-Paused constraint, and how to report results are all covered.

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 description coverage is 100%, so the baseline is 3, and the description does add meaning beyond it — notably that allowed_tools is an instruction in the runner's prompt rather than a separate permission check, that inputs is documentation only (per-run values arrive via input_values), and that timezone is display-only. The long 'Input roles' list, however, largely restates what the schema already says for name, steps, description, and schedule_config.

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?

Opens with a specific verb+resource plus a parenthetical definition of the artifact: "Creates a new workflow template (a saved, repeatable multi-step agent task) for the user's current team." It explicitly distinguishes itself from siblings by naming list_workflows (duplicate check) and update_workflow (activation), so an agent can pick correctly without opening other schemas.

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 explicit preconditions (search list_workflows for a duplicate name, confirm the name with the user) and an explicit exclusion: include schedule_config ONLY when the user explicitly wants a schedule. It also states when to hand off to update_workflow and how to describe state after that follow-up call, covering the 'use this vs. that' question directly.

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