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
| Name | Required | Description | Default |
|---|---|---|---|
| file_path | No | 来自 list_attachments 的 resolved_path 附件本机路径。 | |
| max_bytes | No | 最多返回多少字节的附件提取文本。 | |
| use_cache | No | 是否优先读取本地附件文字缓存。命中缓存时不会重复 OCR。 | |
| attachment_id | No | 来自 list_attachments 的附件 row ID。 |