Skip to main content
Glama

discord_read_messages

Retrieve recent messages from a Discord text channel to monitor conversations or extract information.

Instructions

Read the last N messages from a text channel.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
channel_idYes
limitNo1–100, default 20.

Implementation Reference

  • The handler logic for 'discord_read_messages' which fetches the last N messages from a discord channel.
    case "discord_read_messages": {
      const channel = await getTextChannel(args.channel_id as string);
      const limit = Math.min(Number(args.limit ?? 20), 100);
      const messages = await channel.messages.fetch({ limit });
      const result = [...messages.values()]
        .sort((a, b) => a.createdTimestamp - b.createdTimestamp)
        .map((m) => ({
          id: m.id, author: m.author.tag, content: m.content,
          timestamp: m.createdAt.toISOString(), attachments: m.attachments.size, pinned: m.pinned,
        }));
      return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] };
    }
  • The schema registration for 'discord_read_messages' defining input parameters.
    {
      name: "discord_read_messages",
      description: "Read the last N messages from a text channel.",
      inputSchema: {
        type: "object",
        properties: {
          channel_id: { type: "string" },
          limit: { type: "number", description: "1–100, default 20." },
        },
        required: ["channel_id"],
      },
    },
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the basic action but lacks critical details: it doesn't specify if this requires read permissions, mention rate limits, describe the return format (e.g., JSON array of messages), or note pagination behavior. This leaves significant gaps for a read operation.

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 a single, direct sentence with zero wasted words. It front-loads the core action and resource efficiently, making it easy to parse quickly.

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?

Given the lack of annotations and output schema, the description is incomplete. It doesn't explain what the tool returns (e.g., message objects with content, timestamps, authors), potential errors (e.g., invalid channel ID), or constraints like permissions needed. For a read tool with two parameters, this leaves too much unspecified.

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 50% (only 'limit' has a description). The description adds minimal value beyond the schema: it implies 'N' corresponds to 'limit' and 'text channel' to 'channel_id', but doesn't clarify parameter interactions or provide examples. This meets the baseline for partial schema coverage but doesn't compensate fully.

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 clearly states the action ('Read') and resource ('last N messages from a text channel'), making the purpose immediately understandable. However, it doesn't explicitly differentiate from sibling tools like 'discord_search_messages' or 'discord_get_forum_post', which might also retrieve messages in different contexts.

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?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention sibling tools like 'discord_search_messages' for filtered searches or 'discord_get_forum_post' for forum-specific content, leaving the agent to infer usage from context alone.

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

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