Skip to main content
Glama
iMessage MCP

iMessage MCP

by 4ndylg

read_attachment

Extract text from iMessage attachments such as documents, images via OCR, and PDFs, returning attachment paths and metadata when text cannot be extracted. Read-only.

Instructions

读取附件内容:文本/文档会直接返回文字,图片会尝试 OCR,PDF 会尝试抽取或 OCR 文字;无法提取时返回附件路径和元数据。只读。

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "read_attachment"
  }
}

Input Schema

NameRequiredDescriptionDefault
file_pathNo来自 list_attachments 的 resolved_path 附件本机路径。
max_bytesNo最多返回多少字节的附件提取文本。
use_cacheNo是否优先读取本地附件文字缓存。命中缓存时不会重复 OCR。
attachment_idNo来自 list_attachments 的附件 row ID。

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.5/5.0
Behavior4/5

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

With no annotations present, the description carries the full burden and does well: it discloses the OCR/extraction attempt per file type, the failure fallback (returns path and metadata instead of text), and explicitly declares read-only semantics. It omits any hint about cost or latency of OCR attempts and says nothing about caching behavior, which is only covered by the schema.

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 front-loaded sentence with the main verb and resource first, then semicolon-separated branches for each file type and the failure fallback. Zero filler, though the dense semicolon chain is slightly harder to scan than separate sentences would be.

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?

For a four-parameter read tool with no output schema, the description covers the important unknowns: what each file type yields and what happens when extraction fails. The remaining gaps (which identifier to pass, size limits, cache semantics) are adequately covered by the schema's own parameter descriptions.

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 parameters are already documented, and the description adds nothing beyond them. It does not resolve the real ambiguity of two optional identifiers (file_path vs attachment_id) with zero required parameters, nor explain what max_bytes or use_cache do.

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?

States a concrete verb plus resource ("读取附件内容") and enumerates per-file-type behavior: plain text returned directly, images via OCR, PDFs via extraction or OCR. This is far more specific than a tautology, but it never names list_attachments as the sibling that supplies the identifiers, so the caller must rely on the schema to see the routing.

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?

No when-to-use or when-not-to-use guidance is given, and no alternative is named. The only routing hint (file_path/attachment_id come from list_attachments) lives in the schema, not the description, so the agent gets no explicit instruction on ordering the two calls or on which case to skip this tool.

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