Skip to main content
Glama

run-cmd

Destructive

Runs a single shell command on a specified host using stored credentials, so no password is sent, and requires confirmation plus a reason for disruptive or removal operations.

Instructions

dbabrain common.cli run-cmd: One shell command on a host. server_id (or target) names the server; its connection or host login is completed from this node's inventory and encrypted secret store, so a request carries no password. Changes or removes something. A command on the emergency-operations list takes confirm: "yes" and a reason in its request, as on the command line. Request fields (pass them as request):

  • target: A label for the answer - the server_id. Nothing is looked up by it: common.cli reads no configuration (rules R09).

  • access: The host login, complete: an inline cmd_access - method (ssh|winrm), host, port, username, auth_type, key_file or password - with the machine's platform and runtime facts. The app that calls fills it from its own data...

  • platform: windows | linux, when access does not say.

  • profile: What the target is: os, os_major, runtime.

  • command: The command.

  • script: Or a script.

  • sudo: Through sudo.

  • timeout_seconds: How long to wait.

  • format: json | txt | raw.

  • confirm: The payload declares the operator agreed.

  • assume_yes: Unattended: take the typed yes as given.

  • authorized_by: Who approved it, for example {"channel": "telegram"}.

  • reason: Why, for the evidence.

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": "run-cmd"
  }
}

Input Schema

NameRequiredDescriptionDefault
requestNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.5/5.0
Behavior4/5

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

Beyond the annotations, the description adds important context: connection details come from inventory and the secret store, no password is carried in the request, and emergency commands require confirm:"yes" plus a reason. It also states that the command changes or removes things, matching the destructive annotation, though the target-lookup wording is internally inconsistent.

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?

The description is front-loaded with purpose and safety behavior, and the field list is useful, but it includes awkward internal phrasing such as the target-lookup contradiction and abbreviated access details. Most content is relevant, but the structure and clarity are uneven.

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 remote command runner, the definition covers authentication, confirmation, timeout, output format, and many request fields, while the output schema can handle return values. The unresolved target semantics and incomplete access-object description keep it from being fully complete.

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?

The input schema only exposes a free-form request object with 0% description coverage, so the description must carry parameter meaning. It documents many request fields including target, access, platform, command, script, sudo, timeout_seconds, format, confirm, and reason, though access remains only partially specified and target is ambiguous.

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 opening sentence states a specific action and resource: "One shell command on a host." That clearly distinguishes it from SQL-oriented siblings such as run-sql or run-sqlcmd, though it does not explicitly name alternatives.

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?

The description explains safety mechanics like emergency-operations confirmation, but it does not say when to choose run-cmd over alternatives such as run-sqlcmd or run-sql. It also gives no explicit exclusions or prerequisites for use.

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

Deploy Server

Other Tools