Skip to main content
Glama

Run Command

tm_inventory_run_command

Run shell commands across YAML host groups or target a single host, with preview, parallel execution, and timeout controls for bulk inventory management.

Instructions

Run command (tm_inventory). Bulk inventory operations against YAML host groups.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "tm_inventory_run_command"
  }
}

Input Schema

NameRequiredDescriptionDefault
cfgNoLocal SSH config path (copy_ssh_config).
cmdNoShell command (run_command).
keyNoShared key path (configure_key_auth)./app/.ssh/id_ed25519
hostNorun_command only. Optional single-host alias to target instead of the whole 'group' fan-out — the safe way to reach ONE inventory host (e.g. 'gb10') without running against 'homelab'. Resolved and authorized through the same alias store tm_remote/tm_hosts use, so the two are one source of truth: an unknown or unauthorized alias is rejected outright, never silently skipped. Takes precedence over 'group' when set.
groupNoTarget group.all
lpathNoLocal file path (send_file).
rpathNoRemote file path (send_file/receive_file).
key_pfxNoPrefix for new keys (rotate_key)./root/.ssh/id_
previewNorun_command only. If true, resolve the exact target host(s) for 'host'/'group' and return them in 'resolved_hosts' WITHOUT running 'cmd' — lets a caller verify scope before executing for real (no surprise fan-out). The real (non-preview) response also always includes 'resolved_hosts' for the same reason.
rmt_cfgNoRemote config path (copy_ssh_config)./root/.ssh/config
timeoutNoCommand timeout in seconds.
key_typeNoKey type: rsa or ed25519.ed25519
parallelNoRun parallel.
inventoryNoYAML inventory path (default: $XDG_CONFIG_HOME/scion-sdk/inventory.yml)./root/.config/scion-sdk/inventory.yml
max_threadsNoMax threads.
lpath_prefixNoLocal dir prefix (receive_file).

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv3.4.7
    • changedInput schema / properties / inventory / default
      Previous value: -"/root/.config/agent-connectors/inventory.yml"New value: +"/root/.config/scion-sdk/inventory.yml"
    • changedInput schema / properties / inventory / description
      Previous value: -"YAML inventory path (default: $XDG_CONFIG_HOME/agent-connectors/inventory.yaml)."New value: +"YAML inventory path (default: $XDG_CONFIG_HOME/scion-sdk/inventory.yml)."
  2. Addedv3.3.1

TDQS

C2.5/5.0
Behavior2/5

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

Annotations already declare readOnlyHint=false, destructiveHint=false, idempotentHint=false and openWorldHint=true, so the description should add what actually happens: that arbitrary shell commands execute on remote hosts, failure/timeout semantics, or partial-failure behavior across a group. It adds none of that, and the claim of being non-destructive is in mild tension with executing arbitrary remote shell commands.

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

Conciseness3/5

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

Two short sentences with the identifier front-loaded, so nothing is wasteful. However, brevity here reads as under-specification rather than disciplined concision, leaving the second sentence doing almost no work.

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

Completeness2/5

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

For a 16-parameter remote-execution tool with open-world network access and a destructive potential, the description is far too thin; it omits execution semantics, scope resolution, and any warning about fan-out. The existence of an output schema excuses it from explaining return values, but not from explaining what running a command actually entails.

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

Parameters3/5

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

Schema description coverage is 100% and the parameter descriptions are unusually rich (host precedence, preview behavior, resolved_hosts), so the schema carries the semantics. The tool description adds no meaning beyond it, making the baseline 3 appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

"Run command (tm_inventory)" names a verb and ties it to the inventory family, and "Bulk inventory operations against YAML host groups" hints at fan-out scope. But it never distinguishes this from the sibling tm_remote_run_command, nor reconciles "bulk" with the single-host `host` parameter. The purpose is guessable rather than stated.

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

Usage Guidelines2/5

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

There is no guidance on when to use this tool versus tm_remote_run_command or the tm_operation_* tools, and no stated preconditions for the inventory file or host aliases. The only routing hints live inside individual schema parameter descriptions, not the tool description.

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