Skip to main content
Glama
jar285

MCP-Discord

by jar285

discord_get_forum_post

Retrieve forum post details and messages from Discord to access and analyze discussion content in threads.

Instructions

Retrieves details about a forum post including its messages

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
threadIdYes

Implementation Reference

  • The main execution logic for the discord_get_forum_post tool. Fetches the Discord thread by threadId, retrieves up to 10 recent messages, formats details including messages, and returns as JSON.
    case "discord_get_forum_post": {
      const { threadId } = GetForumPostSchema.parse(args);
      try {
        if (!client.isReady()) {
          return {
            content: [{ type: "text", text: "Discord client not logged in. Please use discord_login tool first." }],
            isError: true
          };
        }
    
        const thread = await client.channels.fetch(threadId);
        if (!thread || !(thread.isThread())) {
          return {
            content: [{ type: "text", text: `Cannot find thread with ID: ${threadId}` }],
            isError: true
          };
        }
    
        // Get messages from the thread
        const messages = await thread.messages.fetch({ limit: 10 });
        
        const threadDetails = {
          id: thread.id,
          name: thread.name,
          parentId: thread.parentId,
          messageCount: messages.size,
          createdAt: thread.createdAt,
          messages: messages.map(msg => ({
            id: msg.id,
            content: msg.content,
            author: msg.author.tag,
            createdAt: msg.createdAt
          }))
        };
    
        return {
          content: [{ type: "text", text: JSON.stringify(threadDetails, null, 2) }]
        };
      } catch (error) {
        return {
          content: [{ type: "text", text: `Failed to fetch forum post: ${error}` }],
          isError: true
        };
      }
    }
  • Zod input validation schema for the tool, defining the required 'threadId' parameter.
    const GetForumPostSchema = z.object({
        threadId: z.string()
    });
  • src/index.ts:255-265 (registration)
    MCP tool registration entry listing the tool's name, description, and input schema in the server's tool list.
    {
      name: "discord_get_forum_post",
      description: "Retrieves details about a forum post including its messages",
      inputSchema: {
        type: "object",
        properties: {
          threadId: { type: "string" }
        },
        required: ["threadId"]
      }
    },
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool retrieves details, implying a read-only operation, but doesn't cover critical aspects like authentication needs, rate limits, error handling, or the format of returned details (e.g., JSON structure). For a tool with no annotation coverage, this is a significant gap in transparency.

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, efficient sentence: 'Retrieves details about a forum post including its messages.' It's front-loaded with the core purpose and avoids unnecessary words, making it easy to parse quickly. Every part of the sentence contributes to understanding the tool's function.

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 complexity (a retrieval tool with no annotations, no output schema, and low schema coverage), the description is incomplete. It doesn't explain what 'details' include beyond messages, how results are structured, or any behavioral constraints. For a tool that likely returns structured data, more context is needed to ensure proper usage by an AI agent.

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?

The input schema has 1 parameter with 0% description coverage, meaning the schema provides no details about 'threadId.' The description doesn't add any parameter-specific information—it doesn't explain what a thread ID is, where to find it, or its expected format. However, with only one parameter, the baseline is higher, but the description fails to compensate for the lack of schema documentation.

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 tool's purpose: 'Retrieves details about a forum post including its messages.' It specifies the verb ('retrieves') and resource ('forum post'), making it easy to understand what the tool does. However, it doesn't explicitly differentiate from sibling tools like 'discord_read_messages' or 'discord_get_forum_channels,' which could cause confusion about scope.

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 prerequisites (e.g., needing a thread ID), exclusions, or comparisons to siblings like 'discord_read_messages' (which might handle general messages) or 'discord_get_forum_channels' (which might list channels). This lack of context could lead to misuse.

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

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