Skip to main content
Glama

Search messages

search_messages
Read-onlyIdempotent

Search the text of messages across your accounts (or one account or channel), newest first, with a snippet around the match. It searches Spaces' own copy: everything held since the account was connected, with older history filling in gradually in the background. It never asks the platform. from is me or them; since limits by time. Read-only. Pass view: 'summary' or fields for a shorter answer.

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": {
      "q": "<q>"
    },
    "name": "search_messages"
  }
}

Input Schema

NameRequiredDescriptionDefault
qYes
fromNo
viewNosummary: a compact item shape (ids, names, times, short text) to save tokens. full (default): everything.
limitNo
sinceNo
fieldsNoComma-separated item fields to keep, such as id,name,last_message. id is always kept.
channelNo
account_idNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedInput schema / properties / fields
      Added value: +{
      +  "description": "Comma-separated item fields to keep, such as id,name,last_message. id is always kept.",
      +  "maxLength": 600,
      +  "type": "string"
      +}
    • addedInput schema / properties / view
      Added value: +{
      +  "description": "summary: a compact item shape (ids, names, times, short text) to save tokens. full (default): everything.",
      +  "enum": [
      +    "summary",
      +    "full"
      +  ],
      +  "type": "string"
      +}
  2. Added

TDQS

A3.8/5.0
Behavior4/5

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

Beyond the readOnly/idempotent annotations, it discloses genuinely useful behavior: it searches Spaces' own indexed copy rather than querying the platform, coverage is everything since connection with older history backfilling gradually, and results are ordered newest first with a match snippet. It omits result-cap/pagination behavior for the 100-item limit, which keeps it from a 5.

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?

Five short sentences, front-loaded with what is searched, where, in what order, and with what output. Each sentence carries distinct information (scope, index caveat, index staleness, from/since, read-only, view/fields) with no filler.

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?

For an 8-parameter tool with no output schema, the description covers the essentials an agent needs: search semantics, ordering, snippet, index-coverage caveat, and a token-reduction option. Gaps remain on limit/truncation behavior and on channel/account_id scoping, which are non-trivial for a search tool.

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 only 25% across 8 parameters, but the description compensates partially by explaining 'from' (me/them), 'since' (limits by time), and reinforcing 'view'/'fields' as token-saving options. It says nothing about q matching semantics, limit, channel, or account_id, leaving several parameters undocumented in both places.

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 the text of messages'), plus scope ('across your accounts (or one account or channel)') and result shape ('newest first, with a snippet around the match'). It does not name or distinguish itself from siblings such as list_messages or list_messaging_messages, so it stops 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 Guidelines3/5

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

It offers some in-call guidance ('from is me or them; since limits by time', 'Pass view: summary or fields for a shorter answer'), which implies when the compact path is worth using. But there is no explicit statement of when to pick this over list_messages or the other list/search siblings, so usage is only implied.

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