Skip to main content
Glama
cappyeo

discord-mcp

messages_search_recent

Read-onlyIdempotent

Search recent messages in a Discord channel for a substring keyword to locate specific messages without manual scrolling, returning matches plus scan metadata.

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, oldest_scanned_id?, newest_scanned_id?, channel_id, query}. Structured matches remain raw Discord data; the human-readable MCP content response fences matched message text. Resume older history with before: oldest_scanned_id.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
afterNoScan window: messages after this ID (newer); mutually exclusive with before
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); mutually exclusive with after
channel_idYesChannel to scan

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Install Server

TDQS

A4.9/5.0
Behavior5/5

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

Annotations already mark the tool as read-only and idempotent, and the description adds meaningful limitations: client-side substring filtering over the most recent N messages of a single channel, not a server-wide search. It also discloses the continuation pattern via before: oldest_scanned_id and the raw vs human-readable response behavior.

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 organized into clear labeled sections and every part earns its place: purpose, usage boundaries, example, and return shape. There is no redundant filler; the length is justified by the useful detail.

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 output schema and annotations, this description is fully sufficient: it covers scope, limitations, example call, return fields, and pagination continuation. An agent can select and invoke this tool correctly without needing further inference.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema already covers all 5 parameters with clear descriptions, so the baseline is 3. The description adds a concrete example and explains how to use the before parameter to resume older history, which is extra semantic value beyond the schema.

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?

States a specific action: substring-search recent messages in a channel. It explicitly scopes the operation to a single channel and rejects server-wide search, making its purpose and boundaries clear.

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?

Provides an explicit 'When to use' section and a 'When NOT to use' section, including the unsupported server-wide search case and the alternative of external indexing. This gives an agent direct routing guidance and clear boundary conditions.

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

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