Skip to main content
Glama

Search Messages

messages_search
Read-onlyIdempotent

Search text messages by keyword, newest first, to find what someone texted. Narrow results to one person by handle or contact name and filter by date.

Instructions

Search text messages by content, newest first. Optionally limit to one person by handle or contact name. Use when: finding what someone texted

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": "messages_search"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNoMax results to return
queryYesText to find (case-insensitive for plain letters)
sinceNoOnly messages since this ISO 8601 date
handleNoOnly messages with this phone number or email
offsetNoNumber of results to skip for pagination
contactNoOnly messages with contacts whose name contains this
response_formatNoOutput format: 'json' for structured data, 'markdown' for human-readable textjson

Output Schema

NameRequiredDescriptionDefault
countYes
itemsYes
totalYes
offsetYes
has_moreYes
next_offsetNo
truncation_messageNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

A3.6/5.0
Behavior3/5

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

Annotations already declare this a read-only, idempotent, non-destructive, closed-world operation, so the safety profile needs no restating. The description adds only the ordering trait ('newest first') and says nothing about pagination behavior, result caps, or date scoping, which are the remaining behaviors an agent would want to know.

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?

Three short sentences, front-loaded with what the tool does, then filtering, then the use case. Nothing is redundant, though the 'Use when:' fragment reads as an incomplete clause rather than polished prose.

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 an output schema present and rich annotations, the description needn't explain return values or safety, and it covers the core search and person-scoping semantics. It leaves pagination and date filtering entirely to the schema, which is acceptable given 100% parameter coverage.

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 every parameter is already documented in structured form, and the description only echoes the handle/contact filter that the schema explains in more detail. The one genuine addition beyond the schema is the 'newest first' ordering, which is not encoded anywhere in the parameters.

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?

The description gives a specific verb and resource ('Search text messages by content') plus a result ordering ('newest first'), so the agent knows exactly what the tool returns. It does not name a sibling such as whatsapp_search or mail_search to draw a boundary, which keeps it short of a 5.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

'Use when: finding what someone texted' states a clear triggering context, which is enough for an agent to select this tool over the chat-listing tools. There are no explicit exclusions or pointers to alternative search tools for other channels, so the guidance stops short of full routing.

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