Skip to main content
Glama

search_messages

Read-only

Search full channel history to find past decisions and messages, with ranked results and highlighted snippets.

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' — 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: in an inflected language a stem finds every case of the word alike, and identifiers containing punctuation 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. 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.7/5.0
Behavior4/5

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

Annotations declare readOnlyHint=true, and the description adds substantial behavioral context: it explains substring matching via trigram index, handling of short terms with plain scan, exclusion of soft-deleted messages, and the 'match' field indicating which method found a hit. It does not mention rate limits or error handling, but given the read-only nature and the existing annotation, the added detail is significant. No contradiction with annotations.

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?

The description is dense but well-structured: it opens with the core purpose, then contrasts with a sibling, explains matching semantics, describes parameters, and closes with usage guidance. Every sentence contributes unique information, though the length is above average; it could be slightly tightened without losing value.

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?

Given the tool's complexity (7 parameters, output schema present), the description covers all essential aspects: query syntax, filtering options, field projection, performance characteristics, and exclusions. It does not need to explain return values since an output schema exists, and it addresses the likely pitfalls (e.g., substring matching, short terms). This is complete for an agent to call it correctly.

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

Parameters5/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 thoroughly. It explains the query syntax (AND, quoted phrases, OR/NOT), the optional filters (from_role/to_role/kind/status), and the 'fields' parameter in detail, including the special value 'headers' and default behavior. This far exceeds what the bare schema provides.

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?

The description clearly states it performs full-text search across channel history with ranking and snippets, and explicitly contrasts it with list_messages which is a substring filter. It identifies the exact use case ('what did we decide about X') and names the sibling it differs from, making its purpose unmistakable.

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?

The description provides explicit guidance on when to use this tool: when a listing over long history would be too large, and when ranked results are needed. It directly contrasts with list_messages, noting the substring filter is unranked, and advises fetching specific messages individually afterward. This leaves no ambiguity about tool selection.

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