Skip to main content
Glama

hpc_generate_sbatch

Read-only

Generate a validated sbatch script for SLURM cluster jobs, checked against partition and QoS limits. Returns text only; save it with hpc_write_file.

Instructions

Generate an sbatch script, validated against the cluster's partition/QoS limits. Returns text only — save with hpc_write_file.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
gpuNoGPU count '1' or type:count 'a100:1'
qosNoQoS (optional)
cpusYes
arrayNoArray spec, e.g. '1-10%4'
emailNo
accountNo
commandsYes
job_nameYes
nodelistNoSpecific node(s), e.g. 'node01'
walltimeYesHH:MM:SS or D-HH:MM:SS
mail_typeNoEND,FAIL
memory_gbYes
partitionNoPartition (default: cluster default)
output_dirYesWritable dir for .out/.err logs
extra_directivesNoAdditional sbatch options, e.g. ['--constraint=avx2']

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, destructiveHint=false and openWorldHint=false, so safety is covered. The description usefully adds that no file is written (returns text only) and that the script is validated against cluster limits, which is real behavioral context beyond the annotations; it omits what happens on validation failure.

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

Conciseness5/5

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

Two short sentences, front-loaded with the core action and immediately followed by the critical output-handling instruction. No filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With no output schema, the description correctly explains that the return value is script text and must be saved, which is the single most important missing structured field. However, for a 15-parameter, 6-required tool, it gives no guidance on validation errors or parameter usage, leaving meaningful gaps.

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

Parameters2/5

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

Schema description coverage is only 53% across 15 parameters, and the description provides no parameter-level guidance at all — nothing about which directives are required, valid QoS names, or how the partition/QoS validation consumes these inputs. The half of parameters lacking schema descriptions get no compensation from the text.

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 (generate an sbatch script) plus the distinguishing trait that it is validated against cluster partition/QoS limits. It also separates itself from siblings by noting the output is text only and must be saved via hpc_write_file, so it is clearly not hpc_submit_job or hpc_write_file.

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 makes the usage context clear: generate first, then persist with hpc_write_file. It does not state when NOT to use it (e.g., vs. hpc_submit_job directly) or note prerequisites like hpc_resolve_project, but the workflow routing is explicit enough.

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