Skip to main content
Glama
macos-mcp
by jbkjr

search_messages

Search iMessage and SMS messages by text content and filter by contact name or specific chat to locate conversations.

Instructions

Search iMessage/SMS messages by text content. Use "contact" to filter by name (automatically resolves to chat IDs). Note: Only searches locally-cached messages.

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 results (default: 50)
queryYesSearch term to find in message text
chatIdNoFilter search to a specific chat
contactNoFilter by contact name, phone, or email (resolves to chat IDs automatically)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

B3.4/5.0
Behavior3/5

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

With no annotations, the description carries the full burden, and it does disclose one real behavioral limit: only locally-cached messages are searched. That is valuable. However, it says nothing about permissions (e.g., full disk access), result ordering, or whether matches return whole messages versus chat context, which matters for a search tool with no output 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?

Two short sentences, front-loaded with the primary verb and resource, with the caveat placed last where it belongs. The middle sentence largely duplicates the schema's description of the contact parameter, costing a small amount of redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/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 full schema coverage and no output schema, the essentials are present, but the local-cache caveat raises an unanswered question: what an agent should do when a search returns nothing because messages are not cached. No guidance on that, on result ordering, or on relationship to list_messages.

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 baseline is 3 and the schema already documents all four parameters. The description's note that "contact" resolves to chat IDs restates the schema's own wording ("resolves to chat IDs automatically") rather than adding new meaning, and it does not explain how contact and chatId interact when both are supplied.

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 iMessage/SMS messages by text content" gives a specific verb and resource, and the platform qualifier (iMessage/SMS) scopes it. It does not explicitly contrast with siblings such as list_messages or get_message, so an agent must infer that this is the keyword-search path rather than a browse or single-fetch path.

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 implies usage (keyword search, optional contact filter) but gives no explicit when-to-use versus list_messages, and no when-not guidance. The "contact" hint is the only actionable routing advice, and it is framed as a parameter tip rather than a selection rule.

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