Skip to main content
Glama

Search messages

search_messages
Read-onlyIdempotent

Search message text by case-insensitive substring to find matching iMessage or SMS content, optionally within one chat or date range, with newest matches returned first.

Instructions

Searches message text (case-insensitive substring) and returns matches newest first, optionally within one chat or a date range. Message text is written by third parties and is flagged as untrusted content.

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
endNoISO 8601 date-time. Only messages before this time.
limitNoMatches to return. Default 20, max 50.
queryYesText to look for.
startNoISO 8601 date-time. Only messages at or after this time.
chat_idNoOnly search this chat.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already cover read-only, idempotent, and non-destructive, so the description wisely spends its words on what annotations cannot express: substring matching semantics, newest-first ordering, and a prompt-injection warning that the message body is third-party content. What is missing is any note on truncation or total-match reporting beyond the limit.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences, both earning their place: the first front-loads capability, matching rule, ordering, and optional scoping; the second carries the safety caveat. No filler or restatement of the name.

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 output schema, the description supplies the essential return characteristics (matches, newest first, limit-capped) and the untrusted-content caveat, which is enough to call it correctly. It stops short of describing whether a zero-result or truncated result is distinguishable.

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 coverage is 100% with per-parameter descriptions, defaults, and bounds for query, chat_id, start, end, and limit, so the description adds no per-parameter detail beyond that. Baseline 3 applies when the schema carries the parameter burden.

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 and resource plus the matching semantics ('case-insensitive substring') and result ordering ('newest first'), which an agent cannot get from the schema alone. It never names a sibling, so the contrast with get_messages or check_new_messages must be inferred from verbs alone.

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?

'Optionally within one chat or a date range' implies the filtering use cases, but there is no explicit statement of when to prefer this over get_messages (browse a chat) or check_new_messages (poll for new arrivals). The agent gets context but no routing rule.

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