Skip to main content
Glama

Search messages

stream_search_messages
Read-only

Search messages across channels. Scope with a channel filter (filter, e.g. {"type":"messaging"}) plus EITHER a full-text query OR a message_filter object (e.g. {"text":{"$q":"refund"}}). GET /api/v2/chat/search.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nextNoPagination cursor returned by a previous search.
sortNoSort spec for results.
limitNoMax results (<=100). Default 20.
queryNoFull-text search string. Provide this OR message_filter.
filterYesChannel filter_conditions, e.g. {"type":"messaging"} or {"members":{"$in":["u1"]}}.
message_filterNoMessage filter object, e.g. {"text":{"$q":"refund"}} or {"attachments":{"$exists":true}}.

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observed

TDQS

A4/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, and the description adds the GET method and cross-channel search scope. This adds some behavioral context without contradicting the annotations, but it does not disclose pagination behavior, rate limits, or what happens with malformed filter combinations.

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 no filler. The action and scope are front-loaded, and the parameter-combination guidance and endpoint are packed efficiently into the second sentence.

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 a search tool with six parameters, nested objects, and no output schema, the description covers the essential invocation rules and provides examples. It does not describe the result shape or pagination cursor flow, but the input schema already documents limit, sort, and next, so the remaining gap is minor.

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?

The schema already documents all six parameters with 100% coverage, but the description adds value by explaining the OR-exclusivity between query and message_filter and by giving concrete JSON examples for both filter and message_filter. This helps an agent select the correct parameter combination beyond what the schema alone offers.

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 states a specific verb and resource: 'Search messages across channels.' It also names the endpoint, making clear this is a message-search operation and distinguishing it from siblings like stream_get_message, stream_query_channels, and stream_send_message.

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?

The description gives concrete guidance on how to combine arguments, explicitly stating that the caller must provide a channel filter plus either query or message_filter. However, it does not contrast this tool with alternatives such as stream_get_message for retrieving a single message, so when-to-use-versus-sibling guidance 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.

TDQS

A4/5.0
Disambiguation5/5

Each tool targets a distinct resource and action: app info, channel state, messages, reactions, replies, unread counts, and various query types. Even similar tools like get_channel vs query_channels are clearly separated by single-item vs list operations.

Naming Consistency5/5

All tools follow the consistent pattern stream_<verb>_<resource> (e.g., stream_get_message, stream_query_channels, stream_send_message). Verb usage is coherent across the set.

Tool Count5/5

With 13 tools, the set is well-scoped for a chat API server, covering core read, query, search, and write operations without excessive fragmentation.

Completeness4/5

Core chat workflows are covered: app info, channel access, messaging, reactions, threads, unread counts, and user/channel queries. Missing mutations like channel/message update or delete are notable but not severe, as the get-or-create channel behavior and send actions cover primary use cases.