Skip to main content
Glama

create_workflow

Define a SLURM workflow YAML with job DAG, dependencies, resources, and templating. Execute via run_workflow.

Instructions

Create a SLURM workflow YAML file.

Generates a YAML workflow definition that can be executed with run_workflow.
Each job in the workflow can depend on other jobs, forming a DAG.

Args:
    name: Workflow name for identification
    jobs: List of job definitions. Each job dict should contain:
        - name (required): Job identifier
        - command (required for regular jobs): Command as string or list of strings
        - script_path (required for shell jobs): Path to shell script
        - depends_on: List of job names this job depends on (e.g. ["preprocess"])
          Supports dependency types: "afterok:job_a", "after:job_a", "afterany:job_a"
        - retry: Number of retry attempts on failure (default 0)
        - retry_delay: Seconds between retries (default 60)
        - resources: Dict with nodes, gpus_per_node, ntasks_per_node,
          cpus_per_task, memory_per_node, time_limit, partition, nodelist
        - environment: Dict with conda, venv, env_vars, container
        - log_dir: Log directory path
        - work_dir: Working directory path
    output_path: File path to write the YAML workflow (e.g. "workflow.yaml")
    args: Optional template variables for Jinja2 templating in job definitions
    default_project: Default SSH project/mount name for file syncing

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYes
jobsYes
output_pathYes
argsNo
default_projectNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

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 discloses key behaviors: creates a YAML file, supports DAG dependencies, retry settings, resource specs, and environment configuration. It doesn't explicitly state file overwriting behavior or required permissions, but covers many aspects.

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 description is well-structured with a summary line and detailed Args section. It front-loads the purpose and each sentence adds value. However, it could be slightly more concise by grouping related details (e.g., dependency types) without losing clarity.

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?

Given the complexity of the tool (5 parameters including a nested jobs array) and the presence of an output schema, the description covers inputs comprehensively but omits some behavioral details like error handling or file overwrite policy. It is largely sufficient for correct agent usage.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Since schema description coverage is 0%, the description compensates thoroughly: it explains the structure of the 'jobs' array, required and optional fields, example syntax for dependencies, and other parameters like 'args' and 'default_project'. This adds substantial meaning beyond the bare schema.

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?

The description clearly states the tool creates a SLURM workflow YAML file, specifies it generates a DAG workflow definition for use with run_workflow, and distinguishes from sibling tools like run_workflow or validate_workflow by its creation role.

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

Usage Guidelines4/5

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

The description explains that the output is executable with run_workflow, implying when to use this tool (before running). However, it lacks explicit guidance on when not to use it or comparisons with alternatives like validate_workflow or direct submission.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/ksterx/srunx'

If you have feedback or need assistance with the MCP directory API, please join our Discord server