Skip to main content
Glama
larrygmaguire-hash

Slack Note Capture MCP Server

slack_search_messages

Find Slack messages by searching for specific text or hashtags across channels to locate relevant conversations and information.

Instructions

Search for messages containing specific text or hashtags.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesSearch query (e.g., '#GenAI' or 'workshop idea').
channel_idNoLimit search to specific channel.

Implementation Reference

  • The handler implementation for slack_search_messages which filters messages from a channel's history based on a search query.
    case "slack_search_messages": {
      const query = args.query;
      const channelId = args.channel_id;
    
      // Note: search.messages requires a user token, not a bot token
      // For bot tokens, we'll filter messages from history instead
      if (channelId || DEFAULT_CHANNEL) {
        const channel = channelId || DEFAULT_CHANNEL;
    
        // Get recent history and filter
        const result = await slack.conversations.history({
          channel: channel,
          limit: 200,
        });
    
        const messages = (result.messages || []).filter((msg) =>
          msg.text?.toLowerCase().includes(query.toLowerCase())
        );
    
        return {
          content: [
            {
              type: "text",
              text: JSON.stringify(
                {
                  query: query,
                  channel: channel,
                  match_count: messages.length,
                  matches: messages.map((msg) => ({
                    ts: msg.ts,
                    text: msg.text,
                    date: new Date(parseFloat(msg.ts) * 1000).toISOString(),
                  })),
                },
                null,
  • src/index.js:243-257 (registration)
    Registration of the slack_search_messages tool, defining its name, description, and input schema.
    {
      name: "slack_search_messages",
      description:
        "Search for messages containing specific text or hashtags.",
      inputSchema: {
        type: "object",
        properties: {
          query: {
            type: "string",
            description: "Search query (e.g., '#GenAI' or 'workshop idea').",
          },
          channel_id: {
            type: "string",
            description: "Limit search to specific channel.",
          },
Behavior2/5

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

No annotations provided, so description carries full burden. It mentions hashtag support but fails to disclose result limits, pagination behavior, search scope (public channels vs DMs), or return format. Missing safety/authorization context.

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?

Single sentence, front-loaded, no wasted words. However, extreme brevity leaves critical behavioral gaps, preventing a perfect score.

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

Completeness2/5

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

No output schema exists, yet description omits what the tool returns (message metadata? content? timestamps?). No annotations cover read-only status or rate limits. For a search tool with undocumented returns, this is inadequate.

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 coverage is 100% with clear examples in the schema itself (e.g., '#GenAI'). Description mentions 'hashtags' which aligns with the query parameter but adds minimal semantic value beyond what the schema already provides. Baseline 3 appropriate for high-coverage schemas.

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?

Clear verb ('Search') + resource ('messages') with scope ('containing specific text or hashtags'). However, it does not explicitly distinguish from sibling 'slack_read_messages' or clarify that this searches across channels vs. reading recent messages from one channel.

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

Usage Guidelines2/5

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

No explicit guidance on when to use this versus 'slack_read_messages' or 'slack_read_thread'. No mention of prerequisites (e.g., necessary scopes) or when search is preferable to direct reads.

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/larrygmaguire-hash/slack-note-capture'

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