Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault

No arguments

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

This server publishes no instructions, or was last inspected before Glama recorded them.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{
  "listChanged": false
}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}

Tools

Functions exposed to the LLM to take actions

NameDescription
execA

在远程连接上执行单条 shell 命令。危险命令与集群登录节点重操作会被服务端拒绝。

Args: connection: 连接 label(见 connection_list) command: 要执行的 shell 命令 timeout: 超时秒数(默认 60)

jobsB

列出 Slurm 集群上当前用户的作业(job_id/状态/分区/耗时/资源,结构化)。

statusB

Slurm 集群概览:分区(节点/CPU/内存/GPU)与队列状态计数。

resourcesA

查询集群资源余量:每分区 CPU/GPU 的总量/已占/空闲与节点数。

一开始就限定查看范围(agent 与人类同款口径): flt=cpu_free(有空闲 CPU 的节点)、flt=cpu_gpu_free(CPU 和 GPU 都有空闲)、 flt=fully_idle(CPU 与 GPU 全空闲);gpu_only=true 只看有 GPU 的节点(可叠加)。 partition 限定分区。默认紧凑(分区聚合);带任一过滤或 include_nodes 才返回节点明细。不要自己拼 sinfo/scontrol。

Args: connection: cluster 连接 label partition: 只看该分区 flt: cpu_free | cpu_gpu_free | fully_idle gpu_only: 只看有 GPU 的节点(与其他条件叠加) include_nodes: 返回全部节点明细(大集群建议配合过滤)

submitA

提交 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)

job_listC

查询本地作业台账:脚本路径与内容、申请资源、节点、stdout/stderr 路径、 最近一次核对的状态(daemon 定期刷新)。

logB

读取作业 stdout(自动定位 StdOut 路径并 tail)。

cancelA

取消指定作业(scancel 单个作业)。scancel --all 被安全门禁止。

ledger_queryB

检索执行留痕(跨会话记忆):按连接/类型/关键词/作业号过滤,时间倒序。

allocA

抢占资源并直接执行(绝不只返回命令):tmux 内 salloc + srun bash, 分配后 attach 即入计算节点 shell,断线不丢资源。同名 purpose 已有活会话时返回 state="exists"(附 job 与接入/释放指引)——不会静默复用旧会话。

抢占选择自动完成(无需先查询):resource 缺省 = GPU 优先、无空闲 GPU 回退 CPU; resource=gpu / cpu 只抢该类(无则失败并附当前余量摘要); partition 显式指定则直接使用。返回 granted/pending/failed 与 job_id/node。

Args: connection: cluster 连接 label purpose: 会话用途名(如 train-a100),用于 tmux 命名与检索 resource: gpu | cpu;缺省为自动(GPU 优先回退 CPU) gpus: GPU 卡数(默认 1;resource 含 gpu 时生效) cpus: CPU 核数(cpu 资源必给则默认 4;也可与 GPU 同时指定) partition: 显式分区(跳过自动选择) wait: 等待授予秒数(超时会话保留,session_info 随时查)

session_startA

在任意连接(集群/服务器)上开一个保活托管会话。

后端自动选择:远端有 tmux → 交互会话(attach 可回);无 tmux → 部署 pty-daemon 静态守护(可 attach,远端零依赖);部署不可行且给了 command → setsid 后台保活(不可 attach,仅日志)。普通查询任务不要用 本工具,直接用 exec。

Args: connection: 连接 label purpose: 会话用途名(唯一标识,重复会报 exists 或复用) backend: 显式指定 tmux | pty-daemon | setsid(缺省自动) command: setsid 后端必填的后台命令

session_listA

列出 tmux 托管会话(仅 alloc 抢占产生的资源会话;普通查询任务请用 exec)。

要求远端装有 tmux;机器上没有 tmux 时列表为空或 alloc 会明确报错。

session_infoB

查看某个托管会话详情:分配状态、job_id、节点、日志尾部。

session_releaseB

释放托管会话:杀 tmux → salloc 退出 → 资源归还集群。

uploadB

上传本地文件到远端(SFTP,远端父目录自动创建)。

downloadC

下载远端文件到本地(SFTP,本地父目录自动创建)。

connection_listA

列出全部受管连接及连接池健康状态(label/kind/host/state)。

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

TDQS

B3.3/5.0

Scored across 17 tools

Disambiguation3/5

Several query-oriented tools overlap conceptually: status/resources both describe cluster capacity, while jobs/job_list/ledger_query all surface job-related records at different layers. Descriptions clarify the distinctions, but names like status, jobs, and job_list are not self-evidently distinct without reading.

Naming Consistency3/5

The set mixes bare verbs (submit, alloc, exec, cancel, upload), noun-like tools (status, log, jobs, resources), and noun_verb compounds (job_list, session_start, ledger_query). The conventions are readable but not predictable as a single pattern.

Tool Count4/5

17 tools is slightly above the ideal compact range but still reasonable for a Slurm cluster/session/file-transfer management surface. The tools group into coherent areas: job lifecycle, resource inspection, sessions, files, and connections.

Completeness4/5

The surface covers core job submission, listing, logging, cancellation, resource inspection, session management, file transfer, and connection listing. Minor gaps include connection lifecycle management and richer Slurm accounting/history, but core workflows are well supported.

Maintenance

ActivityNo data
ResponsivenessOutdated data