Skip to main content
Glama
bcharleson

Slack MCP Server

search_messages

Search messages across Slack workspaces using query strings with modifiers like in:#channel, from:@user, and date filters to find specific conversations.

Instructions

    Search messages across the Slack workspace.

    Note: Requires a User Token (SLACK_USER_TOKEN) as search is not
    available with bot tokens.

    Args:
        query: Search query string. Supports Slack search modifiers:
               - "in:#channel" to search in specific channel
               - "from:@user" to search messages from a user
               - "has:reaction" to find messages with reactions
               - "before:YYYY-MM-DD" or "after:YYYY-MM-DD" for date filters
               Example: "project update in:#general from:@john"
        sort: Sort order - "timestamp" or "score". Default: "timestamp"
        sort_dir: Sort direction - "asc" or "desc". Default: "desc"
        count: Number of results to return (1-100). Default: 20

    Returns:
        Dictionary containing search results with messages and metadata
    

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYes
sortNotimestamp
sort_dirNodesc
countNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior4/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It successfully describes authentication requirements (User Token needed), search scope (workspace-wide), and return format (dictionary with messages and metadata). However, it doesn't mention rate limits, pagination behavior, or error conditions that would be helpful for complete transparency.

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 efficiently structured with clear sections: purpose statement, authentication requirement, parameter documentation, and return value. Every sentence adds value with no wasted words, and the information is front-loaded with the most critical details (what it does and token requirement) first.

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 (search with multiple parameters) and the presence of an output schema (which handles return values), the description provides complete context. It covers purpose, authentication, detailed parameter semantics, and mentions the return structure, leaving no significant gaps for agent understanding.

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?

With 0% schema description coverage, the description fully compensates by providing detailed semantic information for all 4 parameters. It explains the query syntax with examples and modifiers, documents default values for sort, sort_dir, and count, and clarifies valid values and ranges (e.g., '1-100' for count, 'asc/desc' for sort_dir).

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 the specific action ('Search messages') and resource ('across the Slack workspace'), distinguishing it from sibling tools like search_files or search_all. It provides a complete verb+resource+scope combination that leaves no ambiguity about what the tool does.

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 explicitly states when to use this tool ('Search messages across the Slack workspace') and includes a critical prerequisite ('Requires a User Token (SLACK_USER_TOKEN) as search is not available with bot tokens'). This provides clear context for when this tool is appropriate versus alternatives that might use bot tokens.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/bcharleson/slack-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server