Skip to main content
Glama

run_workflow

Execute a SLURM workflow from a YAML file, running jobs in dependency order with independent jobs in parallel. Supports dry runs, job ranges, single-job execution, sweeps, and cluster defaults.

Instructions

Execute a SLURM workflow from a YAML file.

Jobs are executed in dependency order - independent jobs run in parallel,
dependent jobs wait for their prerequisites to complete.

Args:
    yaml_path: Path to the YAML workflow file
    from_job: Start execution from this job (skip earlier jobs)
    to_job: Stop execution at this job (skip later jobs)
    single_job: Execute only this specific job, ignoring dependencies
    dry_run: If true, show what would be executed without actually running
    args: Optional mapping merged over the YAML ``args`` section before
        Jinja rendering. ``python:`` prefix values are rejected.
    sweep: Optional sweep spec: ``{"matrix": {...}, "fail_fast": bool,
        "max_parallel": int}``. When present, the request goes through
        :class:`SweepOrchestrator` and the response contains
        ``sweep_run_id``.
    cluster: Cluster name (required; see ``list_clusters``). Its
        configured defaults fill job fields the YAML leaves unset.
    project: Project root (directory holding ``.srunx/config.toml``);
        supplies project defaults and the mounts ``mount`` refers to.
    mount: Optional project mount name, enabling mount-aware path
        translation for ``work_dir`` / ``log_dir``. Requires an SSH
        cluster and ``project``.

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": {
      "yaml_path": "<yaml_path>"
    },
    "name": "run_workflow"
  }
}

Input Schema

NameRequiredDescriptionDefault
argsNo
mountNo
sweepNo
to_jobNo
clusterNo
dry_runNo
projectNo
from_jobNo
yaml_pathYes
single_jobNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv6.0.0
    • addedInput schema / properties / cluster
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Cluster"
      +}
    • addedInput schema / properties / project
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Project"
      +}
    • removedInput schema / properties / transport
      Removed value: -{
      -  "anyOf": [
      -    {
      -      "type": "string"
      -    },
      -    {
      -      "type": "null"
      -    }
      -  ],
      -  "default": null,
      -  "title": "Transport"
      -}
  2. Addedv3.0.3
  3. Removedv3.0.2
  4. Changed1 schema field changedv0.1.1
    • addedInput schema / properties / transport
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Transport"
      +}
  5. First observedv0.1.0

TDQS

A3.8/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does substantial work: it discloses dependency-ordered execution with parallel independent jobs, that dry_run previews instead of executing, that sweep requests are routed through SweepOrchestrator and return a sweep_run_id, and that 'python:' prefixed args are rejected. It still does not say whether the call blocks until jobs finish, what happens on partial failure, or any permission/auth requirement.

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?

The structure is strong and front-loaded: a one-line purpose, then a short paragraph on execution semantics, then per-parameter notes. The Args block is long but each entry earns its place; a few clauses, such as the cluster-defaults sentence, could be tightened.

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 ten-parameter execution tool with no annotations, this is close to complete: output shape is covered by the existing output schema, and the description adds the sweep_run_id detail plus the cluster/project/mount dependency chain. The remaining gap is failure and blocking behavior for a long-running execution, which an agent would want to know before calling.

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 0%, so the description must compensate, and it documents all ten parameters meaningfully (job-range scoping, args merge-over-YAML with Jinja rendering, the sweep spec's matrix/fail_fast/max_parallel shape, mount-aware path translation requiring an SSH cluster and project). One flaw: it calls 'cluster' required while the schema lists only yaml_path as required and types cluster as nullable.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The first line gives a specific verb and resource ('Execute a SLURM workflow from a YAML file'), which clearly separates it from create_workflow, validate_workflow, and get_workflow. It does not explicitly name those siblings, so the differentiation comes from the verb alone rather than from an explicit contrast.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage context is implied through parameter semantics: use from_job/to_job/single_job to scope execution, dry_run to preview, and list_clusters to find a cluster. However, it never says when to run this versus validate_workflow first, versus submit_job for a single job, or what prerequisites (valid YAML, reachable cluster) must hold.

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