Skip to main content
Glama
cappyeo

discord-mcp

messages_search_recent

Read-onlyIdempotent

Search recent messages in a Discord channel by keyword to quickly find a message without manual scrolling.

Instructions

Purpose: Substring-search recent messages in a channel.

When to use:

  • Locate a recently sent message by keyword without iterating manually.

When NOT to use:

  • Server-wide search → not supported by Discord REST. This tool only fans out the most recent N messages of ONE channel and filters client-side. For deep history, use external indexing.

Example: {channel_id:"111122223333444401", query:"deploy", limit:100}

Returns: {matches:[…], scanned_count, channel_id, query}. Structured matches remain raw Discord data; the human-readable MCP content response fences matched message text.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
afterNoScan window: messages after this ID (newer)
limitNoMax recent messages to scan (1-100, default 100). NOT a result cap.
queryYesSubstring to match (case-insensitive)
beforeNoScan window: messages before this ID (older)
channel_idYesChannel to scan

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior4/5

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

Annotations already declare readOnlyHint, openWorldHint, idempotentHint, and destructiveHint false. The description adds meaningful context by disclosing that the tool 'only fans out the most recent N messages of ONE channel and filters client-side,' which clarifies its scope and implementation. It also explains the return format behavior (raw Discord data vs. human-readable fenced content). This goes beyond the annotations but does not cover auth/rate-limit details, so not a 5.

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 well-structured with clear sections (Purpose, When to use, When NOT to use, Example, Returns) and no redundant prose. Every section earns its place, and the entire text is compact and scannable.

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?

The tool has a nuanced behavior (client-side filtering, single-channel scope, no server-wide search). The description covers purpose, usage windows, limitations, a concrete example, and the return shape. Given the existing annotations and output schema, this fully equips an agent to decide when and how to invoke the tool correctly.

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% and each parameter has a descriptive comment covering meaning, defaults, and constraints (e.g., limit is 'Max recent messages to scan (1-100, default 100). NOT a result cap.'). The description adds an example mapping channel_id, query, and limit, but this does not fundamentally enrich the schema-provided semantics. Baseline 3 is appropriate.

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 opens with a specific verb and resource: 'Substring-search recent messages in a channel.' This clearly distinguishes it from sibling tools like messages_get (retrieve by ID) and messages_read (read a specific message), and further narrows scope with 'recent messages' and '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 Guidelines5/5

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

The 'When to use' section explicitly states the intended scenario (locate a recent message by keyword without manual iteration), and 'When NOT to use' explicitly excludes server-wide search and directs users to external indexing for deep history. This provides clear both positive and negative guidance with an alternative.

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/cappyeo/discord-mcp'

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