Skip to main content
Glama
lburnscissp

discord-mcp

by lburnscissp

discord_search_messages

Read-onlyIdempotent

Find Discord messages containing a phrase, optionally by a specific author. Scans recent channel history locally since bot search API is unavailable.

Instructions

Find messages in a channel containing a phrase, optionally by one author.

Discord's search API is not available to bots, so this scans the most recent
`max_scan` messages page by page (100 per API call) and filters locally. For "what
did X say about Y last week" this is the tool; for older history raise max_scan.

Returns: Matching messages (Markdown or JSON, same shape as discord_read_messages) plus
how many messages were scanned and the oldest one reached.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoMax matches to return.
queryYesCase-insensitive substring to look for in message text.
max_scanNoHow many recent messages to scan, newest first. Larger = slower.
author_idNoOnly messages by this user.
channel_idYesChannel, thread, or DM channel ID.
response_formatNo'markdown' for reading, 'json' for full structured data.markdown

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.7/5.0
Behavior5/5

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

Annotations cover the safety profile (readOnly, idempotent, openWorld), and the description adds crucial behavior the annotations cannot convey: Discord's search API is unavailable to bots, so it pages through 100 messages per call and filters locally. It also discloses the cost/latency tradeoff of increasing max_scan and summarizes the return payload.

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?

Front-loads the purpose, then the implementation constraint, then the when-to-use heuristic, then the return shape. Three tight sentences with no filler or repetition.

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 an output schema exists, the description need only set expectations and it does: filtering semantics, scan limits, and a brief return summary. Nothing required to call this tool correctly is missing for a 6-param read tool.

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?

Schema coverage is 100%, so the baseline is 3; the description still adds meaning by explaining the max_scan/recency relationship ('raise max_scan' for older history) and by tying the result format to discord_read_messages' shape. It does not add syntax detail beyond the schema, but it enriches the two parameters that drive scan behavior.

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 verb and resource ('Find messages in a channel containing a phrase') plus an optional scope qualifier ('optionally by one author'). It clearly distinguishes itself from discord_read_messages and discord_get_message by describing local substring filtering rather than retrieval by ID.

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

Usage Guidelines4/5

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

Gives a concrete use-case ('what did X say about Y last week') and a tuning instruction ('for older history raise max_scan'). It stops short of explicitly naming sibling alternatives like discord_read_messages or stating when not to use this scan-based approach.

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