Skip to main content
Glama

discord_get_forum_post

Retrieve detailed information about a specific forum post, including its messages, by providing the thread ID. Ideal for managing and analyzing Discord forum content efficiently.

Instructions

Retrieves details about a forum post including its messages

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
threadIdYes

Implementation Reference

  • The core handler function that fetches a Discord forum post (thread) by ID, retrieves its recent messages (limit 10), formats the details, and returns them as JSON. Includes error handling and client readiness check.
    export const getForumPostHandler: ToolHandler = async (args, { client }) => {
      const { threadId } = GetForumPostSchema.parse(args);
      
      try {
        if (!client.isReady()) {
          return {
            content: [{ type: "text", text: "Discord client not logged in." }],
            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 handleDiscordError(error);
      }
    };
  • MCP tool schema definition: specifies name, description, and input schema requiring 'threadId' string.
    {
      name: "discord_get_forum_post",
      description: "Retrieves details about a forum post including its messages",
      inputSchema: {
        type: "object",
        properties: {
          threadId: { type: "string" }
        },
        required: ["threadId"]
      }
    },
  • src/server.ts:108-111 (registration)
    Tool dispatch/registration in the MCP server request handler switch statement: calls getForumPostHandler for tool name 'discord_get_forum_post'.
    case "discord_get_forum_post":
      this.logClientState("before discord_get_forum_post handler");
      toolResponse = await getForumPostHandler(args, this.toolContext);
      return toolResponse;
  • Zod input validation schema used in the handler to parse arguments, matching the MCP inputSchema.
    export const GetForumPostSchema = z.object({
        threadId: z.string()
    });
  • Re-export of the getForumPostHandler from forum.ts, making it available for import in server.ts.
    export {
      loginHandler,
      sendMessageHandler,
      getForumChannelsHandler,
      createForumPostHandler,
      getForumPostHandler,
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 and messages, implying a read-only operation, but doesn't disclose critical traits such as authentication requirements, rate limits, error conditions (e.g., invalid threadId), or what 'details' include beyond messages. For a tool with zero 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 that front-loads the core purpose ('Retrieves details about a forum post') and adds essential context ('including its messages'). There is zero waste—every word contributes to understanding the tool's function without redundancy or unnecessary elaboration.

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 tool's complexity (retrieving post details and messages), no annotations, no output schema, and low schema coverage, the description is incomplete. It doesn't explain what 'details' entail, the structure of returned messages, potential errors, or authentication needs. For a read operation with undocumented parameters and outputs, more context is needed to be fully helpful.

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

Parameters2/5

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

The input schema has 1 parameter (threadId) with 0% description coverage, meaning the schema provides no semantic information. The description adds no parameter details beyond what's implied by the tool name—it doesn't explain what threadId is, its format, or how to obtain it. This fails to compensate for the low schema coverage, leaving the parameter meaning unclear.

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 with a specific verb ('Retrieves') and resource ('forum post'), including what information is returned ('details... including its messages'). It distinguishes from siblings like discord_read_messages (which reads messages generally) and discord_get_forum_channels (which gets channels, not posts). However, it doesn't explicitly differentiate from all siblings, such as discord_get_server_info, which is less related.

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 valid threadId), when-not scenarios (e.g., if you only need basic post info without messages), or direct alternatives among siblings like discord_read_messages for general message reading. Usage is implied by the purpose but lacks explicit context.

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

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

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