Skip to main content
Glama
carterlasalle

mac-messages-mcp

tool_get_attachment

Retrieve a specific attachment by its database ROWID. Returns image inline when possible, otherwise provides a local file path.

Instructions

Fetch a specific attachment by its database ROWID.

This is read-only: it resolves a local Messages attachment file and does not
modify or delete it. Requires Full Disk Access for the host app or terminal.
For image MIME types under max_bytes, returns the image inline so you can see
it directly; accompanying filename, MIME, and path text is structurally
neutralized and wrapped in <untrusted-mcp-output>. For PDFs, video, audio,
missing files, or oversize images, returns a filesystem path or error in that
same untrusted block. Use tool_search_attachments first unless you already
have an attachment ID.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
max_bytesNoMaximum inline image payload size in bytes. Larger files return a local filesystem path instead.
attachment_idYesMessages attachment ROWID from tool_search_attachments or an attachment marker in message search results.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.1.0

TDQS

A4.9/5.0
Behavior5/5

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

With no annotations provided, the description carries the full transparency burden. It discloses no modification/deletion, permission requirements, inline image behavior, untrusted output wrapping, and fallback to filesystem paths for non-image or oversized cases.

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?

The description is thorough and well-structured, but slightly verbose in the middle with repeated references to untrusted wrapping. Still, every sentence contributes useful operational or security context.

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?

Even without an output schema, the description fully explains expected return types and conditions: inline images under max_bytes, filesystem paths otherwise, and error cases. An agent has enough context to call the tool correctly.

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

Parameters5/5

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

Schema coverage is 100% and the description adds behavioral context: attachment_id provenance from search results and max_bytes controlling inline versus path return. This meaningfully enriches the schema definitions.

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 clearly states the tool fetches a specific attachment by database ROWID, is read-only, and distinguishes itself from sibling tools by telling the agent to search for attachments first. The purpose is specific and unambiguous.

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

Usage Guidelines5/5

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

Explicitly notes read-only behavior, requires Full Disk Access, instructs to use tool_search_attachments first unless an ID is already known, and describes both inline and fallback output paths. This gives clear when-to-use guidance.

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