Skip to main content
Glama

Read a file on a Mac

read_mac_file
Read-onlyIdempotent

Reads a file on the Mac, up to max_bytes (default 1 MiB, max 3 MiB): text as text, PNG, JPEG, GIF and WebP whole as an image, other files as base64; a larger binary file comes back as its size and details only. Relative paths are in the workspace. Read-only.

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": {
      "path": "<path>"
    },
    "name": "read_mac_file"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYesFile to read. Relative paths are in the session workspace; ~ is the home folder.
max_bytesNoRead at most this many bytes (default 1 MiB, max 3 MiB).
session_idNoMac session ID (ses_…). Optional: without it, the account's running Mac.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedInput schema / properties / session_id / description
      Previous value: -"Mac session ID (ses_…) returned by start_mac or list_mac_sessions."New value: +"Mac session ID (ses_…). Optional: without it, the account's running Mac."
    • changedInput schema / required
      Previous value: -[
      -  "session_id",
      -  "path"
      -]New value: +[
      +  "path"
      +]
  2. Changed2 schema fields changed
    • removedInput schema / $schema
      Removed value: -"http://json-schema.org/draft-07/schema#"
    • changedOutput schema / (root)
      Previous value: -{
      -  "$schema": "http://json-schema.org/draft-07/schema#",
      -  "additionalProperties": {},
      -  "description": "The JSON response of the NoMac API for this operation",
      -  "properties": {
      -    "error": {
      -      "additionalProperties": {},
      -      "description": "Present only when the call failed",
      -      "properties": {
      -        "code": {
      -          "description": "Stable machine-readable error code, for example insufficient_credit",
      -          "type": "string"
      -        },
      -        "message": {
      -          "description": "What went wrong and what to do next",
      -          "type": "string"
      -        }
      -      },
      -      "required": [
      -        "code",
      -        "message"
      -      ],
      -      "type": "object"
      -    }
      -  },
      -  "type": "object"
      -}New value: +null
  3. Changed2 schema fields changed
    • changedInput schema / properties / max_bytes / description
      Previous value: -"Read at most this many bytes (default 1 MiB, max 4 MiB)."New value: +"Read at most this many bytes (default 1 MiB, max 3 MiB)."
    • changedInput schema / properties / max_bytes / maximum
      Previous value: -4194304New value: +3145728
  4. Added

TDQS

A4.2/5.0
Behavior5/5

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

Annotations already declare readOnly, idempotent, non-destructive, so the safety profile is covered; the description then adds genuinely new behavior: text returned as text, PNG/JPEG/GIF/WebP returned whole as an image, everything else base64, and an oversized binary degrading to size-and-details only. That truncation/encoding contract is exactly the kind of thing an agent cannot infer from annotations.

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?

A single dense sentence with the core purpose front-loaded and no filler. The semicolon chain is slightly heavy but each clause carries real information (size cap, format handling, path resolution, read-only).

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?

With no output schema, the description carries the return-value burden and does so thoroughly: it explains exactly what comes back for text, images, other binaries, and oversized files. For a simple read tool with fully described parameters, nothing essential is missing.

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 path, max_bytes, and session_id are already documented in structured data. The description restates the default and max byte values and the workspace-relative path rule rather than adding new meaning, and it never mentions session_id or the fallback to the account's running Mac.

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?

The description opens with a specific verb and resource ("Reads a file on the Mac") and immediately scopes it with size limits and content-type handling. It is trivially distinguishable from write_mac_file, get_mac_file_link, and screenshot_mac 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 Guidelines3/5

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

Usage is implied by the verb: use this to fetch file contents. It gives no explicit when-to-use or when-not guidance against alternatives such as exec_mac (cat) or get_mac_file_link, and says nothing about prerequisites like a running session.

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