Skip to main content
Glama
dh-repo

Apple Messages MCP

by dh-repo

Search messages

messages_search

Search local iMessage and SMS history by text query, with optional chat or date filters, to find matching messages.

Instructions

Search message text: SQL LIKE on the plain text column, then a bounded decode-scan of empty-text / Tahoe rows. No MESSAGES_SCOPE and MESSAGES_ALLOW_UNSCOPED is unset; list/search/thread/send/watch return SCOPE. Returns truncated:true and scanned when the Tahoe window is exhausted. With no chat_id, searches across all readable chats (or the allowlist). Case-insensitive. Does not search attachment binaries. Does not write FTS into chat.db.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoDefault 25.
queryYesSubstring to find.
chat_idNoRestrict to this chat.ROWID.
to_dateNoISO-8601 inclusive upper bound.
from_dateNoISO-8601 inclusive lower bound.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.8/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does substantial work: it discloses scope/permission failure behavior ("No MESSAGES_SCOPE... list/search/thread/send/watch return SCOPE"), truncation semantics ("Returns truncated:true and scanned when the Tahoe window is exhausted"), coverage limits (no attachment binaries), and a no-write guarantee ("Does not write FTS into chat.db"). It stops short of stating auth requirements or result ordering, so it is strong but not exhaustive.

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?

It is front-loaded with the search semantics and each sentence carries behavioral information rather than repeating the schema. A few internals ("Tahoe rows", "chat.db", "FTS") are implementation jargon that does not help an agent select the tool, which is the main source of bloat.

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 no annotations and no output schema, the description must supply the full picture, and it covers permission errors, truncation return fields (truncated, scanned), and search coverage. What remains thin is result ordering/pagination shape across large result sets, but for a 5-param search tool this is close to complete.

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

Parameters4/5

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

Schema coverage is 100%, so the baseline is 3; the description adds genuine meaning on top of the schema by clarifying that matching is case-insensitive (query) and that omitting chat_id widens the search to all readable chats or the allowlist. It does not elaborate on date-bound inclusivity beyond what the schema already says.

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?

"Search message text" states a specific verb and resource, and the mechanics (LIKE on plain-text column plus decode-scan) make the operation concrete. It never names the sibling tools (messages_get_thread, messages_list_chats), so the agent must infer the boundary between searching messages and fetching a thread, which keeps it out of 5 territory.

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?

The description gives one clear conditional: "With no chat_id, searches across all readable chats (or the allowlist)", which tells the agent how to broaden scope. However, there is no explicit when-to-use-this-vs-messages_get_thread or messages_list_chats guidance, so routing between siblings is only implied.

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