Skip to main content
Glama

run_command

Destructive

Run non-interactive shell commands on the Amadeus login node for light tasks like checks and module setup, while enforcing approvals and routing compute work to job tools.

Instructions

Run a shell command on the login node (bash, non-interactive). $DATA, $SCRATCH, $USER expand there. Light work only: no compute, builds or big downloads (use a job). lmod=True initialises Lmod first (for module). Refused: Slurm-changing commands (use submit_job, cancel_job, update_job; sacctmgr only in its read-only show/list forms, e.g. sacctmgr -nP show qos format=Name,MaxWall), ssh to compute nodes and srun (use node_exec) and changes to SSH/shell/VPN config. Deleting or moving files (rm, mv, rsync --delete, ...) needs the human's approval in approval, in their words. The command is not repeated after an SSH failure; when recovery says the tunnel was restarted after a stall (nothing ran remotely), run it again.

Input Schema

NameRequiredDescriptionDefault
lmodNo
commandYes
approvalNo
timeout_sNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.7/5.0
Behavior5/5

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

Annotations already declare destructiveHint and openWorldHint, but the description adds substantial context beyond them: the explicit refusal list, the human-approval gate for rm/mv/rsync --delete, the fact that a command is not re-run after SSH failure, and the recovery case where re-running is safe. These are operational behaviours the annotations cannot express.

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 purpose, then layered constraints, all in imperative sentences with no filler. The parenthetical sacctmgr example and the recovery note add length but are each actionable, so density is justified rather than padded.

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 destructive, open-world execution tool with no output schema, the description covers safety, refusal policy, approval flow and failure semantics extremely well. What it omits is the return shape (stdout/exit code handling) and the meaning of timeout_s, which an agent managing long commands would want.

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 description coverage is 0%, so the description must carry the load; it explains lmod=True (initialises Lmod for `module`) and approval (the human's own words), covering two of the non-obvious parameters. timeout_s is never mentioned and command's semantics are only implied through the env-expansion note, so a small gap remains.

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 plus execution context ('Run a shell command on the login node (bash, non-interactive)'), which immediately separates it from node_exec (compute nodes) and submit_job. The env-var expansion note ($DATA, $SCRATCH, $USER) further pins down what kind of shell it is.

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

Usage Guidelines5/5

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

Explicit when-to-use ('light work only: no compute, builds or big downloads') and names the correct alternative for each excluded case: submit_job, cancel_job, update_job, node_exec. It also flags the approval precondition for destructive file operations and the sacctmgr read-only exception, leaving nothing to inference.

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