Skip to main content
Glama

Read Mac command output

read_mac_output
Read-only

Read stdout/stderr as base64 chunks; resume from next_cursor. If truncated, the final response includes tail_base64 and its absolute tail_offset. Retrieve promptly: only recent completed jobs retain output. output_expired preserves the job receipt and never means rerun. Retrieve before stopping the VM.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cursorNoByte offset to read from. Start at 0, then pass next_cursor from the previous response.
job_idYesCommand job ID (job_…) returned by exec_mac.
streamNostdout (default) or stderr.
session_idYesMac session ID (ses_…) returned by start_mac or list_mac_sessions.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
errorNoPresent only when the call failed

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior5/5

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

Beyond the readOnly/destructive annotations, it discloses chunking with cursor-based resumption, the truncation contract (tail_base64 plus absolute tail_offset), a retention window, and the crucial non-error semantics of output_expired. This is exactly the kind of context annotations cannot convey and it prevents a needless re-execution.

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?

Four tight sentences ordered from core mechanic to truncation handling to retention risk to the VM-stopping warning. No filler and the most actionable warning (retrieve before stopping) is saved for emphasis at the end.

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?

With an output schema present, return fields need not be explained, and the description still covers truncation, retries, and expiry semantics thoroughly. The only shortfall is that it never positions this tool against the sibling that returns job metadata, so an agent has no explicit cue for choosing between them.

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%, so the schema already documents cursor, stream, job_id, and session_id, including the next_cursor resumption pattern and the stdout default. The description restates cursor resumption but adds no format or boundary details beyond the schema, so the baseline of 3 applies.

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+resource (read stdout/stderr output as base64 chunks) with the resumption mechanism, and is clearly distinct from siblings like get_mac_job or exec_mac. An agent knows immediately this is the raw output reader rather than the job status tool.

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?

Gives real timing guidance: retrieve promptly because only recent completed jobs retain output, and retrieve before stopping the VM. It also tells the agent how to interpret output_expired (do not rerun). However, it never names an alternative tool or a when-not condition, so the routing to siblings is implied rather than explicit.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources