Skip to main content
Glama

Search messages

search_messages
Read-onlyIdempotent

Search the text of every message across every thread. Each hit carries who it was with and a short excerpt around the match, so you can answer "when did they first mention the boiler?" without reading whole conversations into context.

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 rows to return (1-200, default 50).
queryYesWhat to look for.
sinceNoOnly messages after this ISO timestamp.
offsetNoRows to skip, for paging.
chat_typeNoNarrow to one kind of thread.

Output Schema

NameRequiredDescriptionDefault
noteNoWhy the result was truncated, when it was.
countYesHow many rows are in `results`.
resultsYesThe rows.
truncatedNoPresent and true when the result was too large to return in full. Treat it as a partial answer.
total_availableNoHow many rows existed before truncation.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4/5.0
Behavior4/5

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

Annotations already establish safety, read-only behavior, idempotency, and a closed-world scope. Beyond that, the description adds useful behavioral detail: hits include the associated person and a short excerpt around the match, and the search spans every message in every thread. It does not describe rate limits or pagination behavior, but the schema covers limit and offset.

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?

The description is two sentences with the core scope front-loaded and the example placed after the core behavior. Every sentence adds value, and there is no repetitive or wasted wording.

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?

Given the rich schema, output schema, and annotations, the description is nearly complete: it explains the search scope and what a hit contains. It could be stronger with explicit sibling routing, but the essential information needed to invoke the tool correctly is present.

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 schema already explains query, limit, since, offset, and chat_type. The description reinforces that the search is text-based and thread-wide but does not add parameter-specific meaning such as query syntax, timestamp interpretation, or chat_type values beyond what the schema provides.

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 states a specific verb and resource: "Search the text of every message across every thread." It clearly distinguishes a full-text message search from listing messages, though it does not explicitly name or compare against siblings such as list_messages or search_knowledge_base.

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?

It provides a clear use case in the boiler example: find when someone first mentioned something without loading whole conversations into context. This gives strong contextual guidance, but it does not state exclusions or explicitly route the agent to alternative tools when full-thread reading or other search scopes are needed.

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