Skip to main content
Glama

submit

Launch Slurm batch jobs by writing scripts to a local jobs directory and running sbatch, with automatic stdout/stderr redirection and job ledger tracking.

Instructions

提交 Slurm 批处理作业:脚本写入 ~/.clu/jobs/<连接>/ 后 sbatch。

stdout/stderr 默认重定向到同目录 -<时间>-%j.out/.err(脚本自带 #SBATCH -o/-e 时尊重脚本);脚本内容、路径、资源与状态记入本地 jobs 台账。

Args: connection: cluster 连接 label script: sbatch 脚本内容(含 shebang) name: 作业名(默认 job) partition: 分区(脚本未声明时注入) nodes: 节点数(脚本未声明时注入) cpus: 每任务 CPU 核数 gpus: GPU 卡数(注入 --gres=gpu:N) time_limit: 时限(如 4:00:00)

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": {
      "connection": "<connection>",
      "script": "<script>"
    },
    "name": "submit"
  }
}

Input Schema

NameRequiredDescriptionDefault
cpusNo
gpusNo
nameNo
nodesNo
scriptYes
partitionNo
connectionYes
time_limitNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed6 schema fields changedv0.1.7
    • addedInput schema / properties / cpus
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "integer"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Cpus"
      +}
    • addedInput schema / properties / gpus
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "integer"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Gpus"
      +}
    • addedInput schema / properties / name
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Name"
      +}
    • addedInput schema / properties / nodes
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "integer"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Nodes"
      +}
    • addedInput schema / properties / partition
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Partition"
      +}
    • addedInput schema / properties / time_limit
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Time Limit"
      +}
  2. First observedv0.1.0

TDQS

A4/5.0
Behavior4/5

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

Annotations only flag readOnly=false and destructive=false; the description adds real value by disclosing side effects: script files persisted under ~/.clu/jobs/<connection>/, stdout/stderr redirected to <name>-<time>-%j.out/.err, script-provided #SBATCH -o/-e honored, and a local jobs ledger entry. It does not say what happens on sbatch failure or whether submission is synchronous, which keeps it from a 5.

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 the core action and file/stream behavior before the Args block; every line is informative. The mixed-language prose and inline line wrapping make it slightly harder to scan than it needs to be, but there is no redundant filler.

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?

An output schema exists, so return values need not be explained, and the write locations, redirection rules, and resource-injection precedence are all covered. The remaining gap is error/failure behavior and whether an existing connection label is required, which matters for an 8-parameter mutation tool.

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?

With 0% schema description coverage, the description carries the full burden and does: every one of the 8 parameters is defined, including injection semantics ('partition/nodes/gpus injected only if the script does not declare them'), the name default of 'job', the --gres=gpu:N mapping for gpus, and the time format for time_limit.

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 description names a specific verb and resource — submit a Slurm batch job via sbatch — and describes the mechanics (script written to ~/.clu/jobs/<connection>/, then sbatch). It does not explicitly contrast with siblings like alloc, exec, or session_start, so the agent must infer that this is the batch path versus interactive ones.

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 is implied: this is the tool that creates a queued batch job. There is no explicit 'use this instead of X' guidance naming cancel, job_list, or the interactive session/alloc siblings, and no prerequisites stated (e.g. whether the connection must already exist).

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