Skip to main content
Glama
imessage-mcp

imessage-mcp

by kashyapmanu

Search iMessage text

search_messages
Read-only

Search iMessage history by text, contact, or date range to find past conversations. Returns newest matches first and flags when results are capped.

Instructions

Case-insensitive substring search over message text, newest first. Also decodes attributedBody for messages whose plain text is empty. Optional contact (name, phone or email) and date filters are applied in SQL. Incoming messages include sender_name from Contacts. The scan is capped; the result says if the cap was hit, meaning the search was not exhaustive.

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": {
      "query": "<query>"
    },
    "name": "search_messages"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNoMaximum number of items to return (1-500, default 50).
queryYesText to look for (case-insensitive substring).
sinceNoISO 8601 date or datetime, e.g. 2025-01-31 or 2025-01-31T09:00:00Z.
untilNoISO 8601 date or datetime, e.g. 2025-01-31 or 2025-01-31T09:00:00Z.
contactNoContact name, phone number, email or handle id substring (e.g. 'Alice', '(415) 555-1234', 'alice@', '+1555'). Names are resolved from macOS Contacts. Matches messages from matching handles, and your replies in chats that include them.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.7/5.0
Behavior4/5

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

Annotations already cover safety (readOnly, non-destructive, closed-world), and the description still adds real behavioral detail: results ordered newest first, decode fallback for attributedBody when plain text is empty, filters executed in SQL, sender_name resolved from Contacts, and a scan cap whose hit is reported back. The one gap is that pagination/offset behavior is not mentioned beyond the limit parameter.

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?

Four tight sentences with the core search semantics front-loaded, followed by decoding behavior, filter handling, and the cap caveat. Every clause carries information, though the last two sentences could be merged without loss.

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 five-parameter search tool with no output schema, the description covers ordering, sender attribution, and the non-exhaustive-result warning, which is what an agent needs to interpret results. It stops short of describing the result record shape, but no output schema exists to lean on.

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 each of the five parameters is already documented, including contact resolution from macOS Contacts. The description only reaffirms that contact and date filters are applied in SQL, adding minor operational meaning rather than new parameter semantics, so the baseline 3 is appropriate.

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 and resource plus key semantics: case-insensitive substring search over message text, newest first. This distinguishes it reasonably from read_messages/get_conversation by implying a keyword scan rather than a chat-by-chat or list read, though it never names the sibling it contrasts with.

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?

Explains what filters exist and warns that the capped scan may make results non-exhaustive, which implicitly tells the agent when the answer is untrustworthy. However, there is no explicit routing guidance such as when to prefer get_conversation or read_messages over a keyword search, leaving alternative selection to inference.

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