Skip to main content
Glama

search_messages

Find past messages and decisions by ranked full-text query across channel history, with boolean and phrase syntax plus role/kind/status filters.

Instructions

Full-text search across the whole channel history (topic + body), best match first with a highlighted snippet. This is the tool for 'what did we decide about X' / 'where did merchant_id come up' — list_messages(text=...) is an unranked substring filter, this one ranks and understands query syntax: bare words are AND-ed, "quoted phrases" match literally, OR / NOT combine terms. Matching is SUBSTRING-based (trigram index), so no word-boundary or morphology traps: on Russian text 'ротаци' finds 'ротация', 'ротаций' and 'ротациями' alike, and exact markers ('merchant_id', '=== НАЧАЛО ТЕЛА ===') are matched literally rather than split into 'similar' words. Terms shorter than 3 characters cannot use the index and are answered by a plain scan instead — each hit says which path found it in 'match' (fts | substring). Optional from_role/to_role/kind/status narrow the result set. Soft-deleted messages are excluded. Optional 'fields' projects the response: a list of field names, or the single value 'headers' for the usual listing set (everything except the bodies). Omit it and the full record comes back exactly as before. Use it when a listing over a long history would otherwise be too large to return — bodies dominate the size, and a 'which messages' question rarely needs them; fetch the ones you want individually afterwards.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
kindNo
limitNo
queryYes
fieldsNo
statusNo
to_roleNo
from_roleNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.8/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and delivers: ranking behavior, snippet highlighting, soft-deleted exclusion, substring/trigram matching with concrete morphology examples ('ротаци' matches 'ротация'), the short-term plain-scan fallback, and the 'match' field reporting which path (fts | substring) found each hit. This is unusually rich behavioral disclosure for a search tool.

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?

Front-loads purpose, then sibling differentiation, then query semantics, then params, then the use-case rationale – a sound ordering with no filler sentences. It is dense and long, but each sentence adds distinct information rather than restating the schema.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 7-param search tool with an output schema, the description covers matching semantics, filtering, projection, soft-delete behavior, and even the response 'match' field, so an agent has everything needed to call and interpret it correctly. Output schema need not be restated.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate, and it does for the two most ambiguous params: query syntax (bare-word AND, quoted literal phrases, OR/NOT, substring semantics) and 'fields' (a list of names, or the single value 'headers' for everything except bodies, with default behavior when omitted). It is lighter on from_role/to_role/kind/status (only 'narrow the result set') and never mentions limit, leaving some parameters under-specified.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb+resource+scope ('full-text search across the whole channel history (topic + body), best match first with a highlighted snippet') and explicitly distinguishes itself from the sibling list_messages(text=...), which it names as the unranked substring alternative. An agent can pick between them without opening either schema.

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

Usage Guidelines5/5

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

Names the alternative (list_messages) and the exact condition that selects this one over it ('what did we decide about X'), plus a second when-to-use condition (listing over a long history would be too large to return). Both 'when to use' and 'when to use the other tool' are present.

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