Skip to main content
Glama

search_messages

Search Discord channel messages by keyword and optional author, case-sensitivity, or result limit to locate specific conversations.

Instructions

Search messages in a Discord channel with keywords and filters

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "channelId": "<channelId>",
      "query": "<query>"
    },
    "name": "search_messages"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNoNumber of messages to search through (max 100)
queryYesSearch query/keyword to look for
authorIdNoOptional: Filter by specific author ID
channelIdYesDiscord channel ID
caseSensitiveNoWhether search should be case sensitive
discordBotTokenNoDiscord bot token for authentication (optional if DISCORD_BOT_TOKEN env var is set)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

C2.9/5.0
Behavior2/5

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

No annotations are provided, so the description carries full behavioral burden, yet it says nothing about search scope (the limit parameter implies scanning recent messages rather than full history), result ordering, pagination, or required bot permissions. For a read tool on a Discord channel, the scope of what gets searched is the single most important behavioral fact and it is absent.

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?

A single front-loaded sentence with no filler or repetition. It is efficient, though its brevity is close to under-specification rather than tightness.

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

Completeness3/5

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

With six parameters (two required) and no output schema or annotations, the description is minimally viable but leaves the agent guessing about result shape and search scope. A brief note on what is returned and whether the limit bounds the scanned window would close the gap.

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%, so every parameter including authorId, caseSensitive, and discordBotToken is already documented in the schema. The description adds only the vague phrase 'keywords and filters' and no syntax or semantics beyond what the schema states, which is the baseline case for full coverage.

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 states a specific verb and resource ('Search messages in a Discord channel') plus the mechanism ('keywords and filters'), which is clearer than a bare restatement of the name. It does not, however, distinguish this from the sibling get_messages, so the agent must infer that one retrieves and the other queries.

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?

There is no explicit when-to-use, when-not-to-use, or alternative-tool guidance. An agent facing both search_messages and get_messages for 'find a message about X' has no stated rule from this definition to choose between them.

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