Skip to main content
Glama

Get detached command status and logs

get_command_status
Read-onlyIdempotent

Retrieve detached command status and logs for a sandbox process, with byte offsets that return only new stdout/stderr since the last poll.

Instructions

Get detached command status and logs. Without offsets, the answer holds the end of each log. With stdoutOffset or stderrOffset, it holds only the output written since those byte offsets, so each poll returns only new output. A sandbox agent too old for offsets answers 409 agent_outdated.

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>",
      "processId": "<processId>"
    },
    "name": "get_command_status"
  }
}

Input Schema

NameRequiredDescriptionDefault
processIdYesProcess id returned by a detached command start.
sandboxIdYesPublic Sandbox id returned by create/list/get sandbox calls.
tailBytesNoCap each returned log to its last N bytes. Defaults to 8388608 (8 MiB). Ignored with offsets.
stderrOffsetNoReturn only stderr written from this byte offset. Use `stderrNextOffset` of the previous answer.
stdoutOffsetNoReturn only stdout written from this byte offset. Use `stdoutNextOffset` of the previous answer.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.0.0

TDQS

A3.7/5.0
Behavior3/5

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

Annotations already declare readOnly, idempotent, openWorld, and non-destructive behavior, so the safety profile is covered. The description does add real context: offset-based incremental reads and the concrete failure mode (409 agent_outdated on old agents), which is valuable and not derivable from annotations. It does not describe what status information is returned, but with annotations carrying the safety burden a 3 is fair.

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?

Four short sentences, front-loaded with the purpose, then the two operating modes, then the error edge case. Every sentence carries information; density is high but nothing is wasted.

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

Completeness5/5

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

For a read-only status/log tool with a fully described 5-param schema and no output schema, the description covers both modes, the polling contract, and the one notable error response. An agent can call it and interpret the result correctly without further documentation.

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 baseline is 3, and the description earns above that by explaining the offset semantics semantically: without offsets you get the end of each log, with offsets you get only new bytes since the last poll. That makes stdoutOffset/stderrOffset meaningfully clearer than the schema's terse per-field text.

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?

Specific verb+resource: 'Get detached command status and logs' tells the agent exactly what is retrieved and scopes it to detached commands, distinguishing it in spirit from get_command_logs/get_command. It stops short of naming those siblings, so the differentiation is implied rather than explicit.

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

Usage Guidelines3/5

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

The description implies the polling use case ('each poll returns only new output') and explains the offset-driven mode, which is genuine usage guidance. However, it never states when to pick this over get_command_logs or get_command, nor any when-not conditions.

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