Skip to main content
Glama

Get one command from the history

get_command
Read-onlyIdempotent

Retrieves a single command from a sandbox's command history using the sandbox ID and command ID, so you can inspect prior execution details.

Instructions

Get one command from the history

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": {
      "sandboxId": "<sandboxId>",
      "commandId": "<commandId>"
    },
    "name": "get_command"
  }
}

Input Schema

NameRequiredDescriptionDefault
commandIdYes
sandboxIdYesPublic Sandbox id returned by create/list/get sandbox calls.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.0.0

TDQS

C2/5.0
Behavior2/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, destructiveHint=false, and openWorldHint=true, so the safety profile is covered. The description adds nothing on top — no note about what a command record contains, whether history is retained indefinitely, or what happens for an unknown commandId.

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

Conciseness2/5

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

It is short, but brevity here is under-specification rather than conciseness — the single sentence is a copy of the title and contributes no information an agent doesn't already have from the name.

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 simple read tool with full annotation coverage this could be light, but there is no output schema and the description never says what 'a command' returns (command text, exit code, timestamps, logs). Combined with the undocumented commandId, an agent cannot confidently call it or interpret the result.

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

Parameters2/5

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

With 2 parameters and 50% schema coverage, sandboxId is documented in the schema but commandId is not. The description does not explain what commandId refers to (a command record id vs. a shell process id) nor how the sandboxId scopes the lookup, so it fails to compensate for the coverage gap.

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

Purpose2/5

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

Tautological: description restates name/title.

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 when-to-use guidance, no mention of when to prefer list_command_history or get_command_status, and no stated prerequisites. The only implied usage is 'fetch by id,' which the agent must infer from the name and required parameters.

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