Skip to main content
Glama

Slack Search Messages

slack_search_messages
Read-only

Searches Slack messages. Optionally restrict to a specific channel_id. A hit whose text is the marker "[body not included in this search result]" (with body_missing: true) DID match — its body was lost by the reader, not empty. Read it with slack_read_channel_messages on its channel_id; never report it to the user as an empty message. Direct messages come back as an unresolved id rather than a name; slack_list_channels maps ids to names.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoMax results to return (default 50)
queryYesSearch text (case-insensitive substring match)
channel_idNoOptional channel ID to restrict search

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
noteNoPresent when something about the answer needs stating: bodies that did not survive the reader, unresolved channel names, or a genuine zero
countYesNumber of results returned
resultsYesMatching messages, most recent first

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changed
    • addedOutput schema / properties / note
      Added value: +{
      +  "description": "Present when something about the answer needs stating: bodies that did not survive the reader, unresolved channel names, or a genuine zero",
      +  "type": "string"
      +}
    • addedOutput schema / properties / results / items / properties / body_missing
      Added value: +{
      +  "description": "True when the match's text did not survive the reader — the message exists and matched; see `note`",
      +  "type": "boolean"
      +}
    • addedOutput schema / properties / results / items / properties / channel_name_unresolved
      Added value: +{
      +  "description": "True when the channel could not be resolved to a readable name",
      +  "type": "boolean"
      +}
    • changedOutput schema / properties / results / items / properties / text / description
      Previous value: -"Message text (truncated to 500 chars)"New value: +"Message text (truncated to 500 chars), or an explicit marker when the body is missing — never a silent empty string"
    • addedOutput schema / properties / results / items / properties / user_unresolved
      Added value: +{
      +  "description": "True when `user` is a raw Slack id, not a name",
      +  "type": "boolean"
      +}
  2. First observed

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already mark this as read-only and non-destructive. The description adds valuable behavioral detail beyond that: body_missing hits are true matches whose body was lost, and DM identifiers may be unresolved ids. This helps the agent avoid misinterpretation without contradicting annotations.

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 compact and front-loaded with the primary purpose, followed by high-value edge-case guidance. Every sentence earns its place: search scope, body_missing interpretation, remediation path, and DM id handling. No redundant or filler content.

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 read-only annotations, an output schema, and full parameter coverage, the description covers the important non-obvious behaviors an agent must know. It explains how to interpret ambiguous results and which sibling tools to use for resolution. The tool is a search operation, and the description adequately completes the contextual picture.

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%, with query, limit, and channel_id each already documented in the schema. The description only restates that channel_id is optional, adding little meaning beyond the structured definitions. Baseline of 3 is appropriate because schema carries the parameter documentation burden.

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 clearly identifies the tool as searching Slack messages, with an optional channel restriction. It is specific enough to distinguish from reading channel messages, though it doesn't explicitly differentiate itself from the generic search_messages sibling tool. The resource and action are unambiguous.

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?

The description provides clear usage context, including how to handle body_missing results by reading the full message with slack_read_channel_messages. It also instructs agents not to report marker-only hits as empty messages and points to slack_list_channels for resolving DM ids. It lacks explicit when-not-to-use guidance relative to other search tools but gives actionable workflow direction.

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