Skip to main content
Glama

Search Messages

search_messages
Read-only

Searches iMessage conversations by content, sender name, or date range.

Input Schema

NameRequiredDescriptionDefault
limitNoMax results (default 30)
queryNoText to search for in message content (optional if from_sender is set)
sinceNoISO8601 date — only return messages on or after this date (optional, e.g. '2026-04-10' or '2026-04-10T00:00:00Z')
untilNoISO8601 date or datetime — only return messages on or before it (optional). Inclusive when only a date is given: 2026-10-02 returns the messages of October 2 too (the day is counted in UTC, like the dates returned). With a time, the range ends at that instant. Combine with 'since' to search a date range with no text query.
from_senderNoSubstring of sender name/handle to filter by — only messages THEY sent; 'me' for your own (optional)

Output Schema

NameRequiredDescriptionDefault
countNo
queryNo
sinceNo
untilNo
resultsNo
from_senderNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / until / description
      Previous value: -"ISO8601 date — only return messages on or before this date (optional). Combine with 'since' to search a date range with no text query."New value: +"ISO8601 date or datetime — only return messages on or before it (optional). Inclusive when only a date is given: 2026-10-02 returns the messages of October 2 too (the day is counted in UTC, like the dates returned). With a time, the range ends at that instant. Combine with 'since' to search a date range with no text query."
  2. Changed2 schema fields changed
    • changedInput schema / properties / from_sender / description
      Previous value: -"Substring of sender name/handle to filter by (optional)"New value: +"Substring of sender name/handle to filter by — only messages THEY sent; 'me' for your own (optional)"
    • addedOutput schema / properties / results / items / properties / from_me
      Added value: +{
      +  "type": "boolean"
      +}
  3. Changed2 schema fields changed
    • addedInput schema / properties / until
      Added value: +{
      +  "description": "ISO8601 date — only return messages on or before this date (optional). Combine with 'since' to search a date range with no text query.",
      +  "type": "string"
      +}
    • addedOutput schema / properties / until
      Added value: +{
      +  "type": "string"
      +}
  4. First observed

TDQS

B3.2/5.0
Behavior2/5

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

Annotations already declare readOnlyHint=true, destructiveHint=false, and openWorldHint=false, so the safety profile is fully conveyed structurally. The description adds nothing beyond that — no result ordering, no pagination/limit behavior, no indication of which account or local message store is searched, so beyond the annotations it is essentially a restatement of the schema fields.

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 zero filler, correctly sized. It is efficient but arguably too terse given the many sibling search tools, leaving no room for disambiguation.

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?

An output schema exists and annotations carry the safety semantics, so the return values need not be explained. However, for a search tool with five optional parameters and six sibling search_messages variants, the definition omits any routing guidance or note on behavior when no filter is supplied (all messages up to limit?).

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% and the schema already explains limit defaults, optionality conditions ('optional if from_sender is set'), ISO8601 formats, inclusive date semantics, and 'me' as a sender handle. The description contributes no parameter-level meaning, so baseline 3 applies.

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 specific verb (searches) and resource (iMessage conversations) with the three search dimensions (content, sender name, date range). The 'iMessage' qualifier is what separates it from the many sibling search_messages tools (slack_search_messages, telegram_search_messages, whatsapp_search_messages), though it is only implicit rather than contrasted explicitly, and it doesn't distinguish from read_messages or list_message_chats.

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?

Use is implied by 'by content, sender name, or date range' — the agent can infer this is the lookup tool when a query/sender/date filter is available. But no when-to-use vs alternatives (read_messages, list_message_chats, or the other platform search tools) is stated, and no exclusions or prerequisites are given.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources