Skip to main content
Glama

read-command

Read-only

Run read-only shell commands like ls, cat, grep, or df over SSH from an allowlist. Use it for safe inspection of remote systems without modifying anything.

Instructions

Execute a READ-ONLY command from an allowlist (ls, cat, grep, find, stat, df, etc.). This tool does NOT modify the system. Prefer this tool for all read operations. Single-line only: a command containing a line break is refused, so upload a multi-line script with sftp-upload and run it by path.

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": {
      "command": "<command>"
    },
    "name": "read-command"
  }
}

Input Schema

NameRequiredDescriptionDefault
commandYesRead-only shell command (must be in the allowlist)
profileNoProfile name

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv2.31.0
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
  2. First observedv2.5.0

TDQS

A4.4/5.0
Behavior4/5

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

With readOnlyHint already declared, the description still adds real behavior: an allowlist gates the command, line breaks cause refusal, and non-listed binaries (signalled by 'etc.') are implicitly out. It stops short of saying what happens on a rejected or non-allowlisted command, and the 'profile' parameter's effect is never explained.

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

Conciseness5/5

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

Three tight sentences: what it is, what it guarantees, then the routing preference, then the single-line constraint with its workaround. No redundancy and the most important constraint is front-loaded.

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 an execution tool with no output schema, the description covers safety, gating, and the one hard formatting constraint. It leaves the return payload (stdout/stderr handling, exit code surfacing) and the 'profile' parameter unaddressed, which an agent would want before invoking.

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 coverage is 100%, so the 3 baseline applies, but the description adds meaning the schema lacks: the command must come from a fixed allowlist and must be single-line. The 'profile' parameter gets no explanation anywhere, which keeps this from a 5.

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 (execute) and resource (read-only command from an allowlist), illustrates the allowlist with concrete examples (ls, cat, grep, find, stat, df), and contrasts itself with the write path by saying it does NOT modify the system. An agent can distinguish it from destructive-command/run-command without opening any schema.

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

Usage Guidelines4/5

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

'Prefer this tool for all read operations' gives an explicit positive selection rule, and the multi-line case names a concrete alternative (upload with sftp-upload and run by path). It doesn't spell out when-not conditions for the sibling execution tools beyond that, so it falls short of a full routing matrix.

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