Skip to main content
Glama

discord_reply_to_forum

Enables posting replies to Discord forum threads by specifying the thread ID and message content for effective communication and engagement.

Instructions

Adds a reply to an existing forum post or thread

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
messageYes
threadIdYes

Implementation Reference

  • The core handler function that validates input with ReplyToForumSchema, fetches the forum thread, checks permissions, sends the reply message, and returns success or error response.
    export const replyToForumHandler: ToolHandler = async (args, { client }) => {
      const { threadId, message } = ReplyToForumSchema.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
          };
        }
    
        if (!('send' in thread)) {
          return {
            content: [{ type: "text", text: `This thread does not support sending messages` }],
            isError: true
          };
        }
    
        // Send the reply
        const sentMessage = await thread.send(message);
    
        return {
          content: [{ 
            type: "text", 
            text: `Successfully replied to forum post. Message ID: ${sentMessage.id}` 
          }]
        };
      } catch (error) {
        return handleDiscordError(error);
      }
    };
  • Zod schema used for input validation in the handler (threadId and message are required strings).
    export const ReplyToForumSchema = z.object({
        threadId: z.string(),
        message: z.string()
    });
  • src/server.ts:113-116 (registration)
    Switch case registration in the MCP server that dispatches tool calls to the replyToForumHandler.
    case "discord_reply_to_forum":
      this.logClientState("before discord_reply_to_forum handler");
      toolResponse = await replyToForumHandler(args, this.toolContext);
      return toolResponse;
  • Tool definition in the exported toolList array, including name, description, and input schema advertised to MCP clients via listTools.
    {
      name: "discord_reply_to_forum",
      description: "Adds a reply to an existing forum post or thread",
      inputSchema: {
        type: "object",
        properties: {
          threadId: { type: "string" },
          message: { type: "string" }
        },
        required: ["threadId", "message"]
      }
    },
  • Re-export of the replyToForumHandler from forum.ts to make it available for import in server.ts.
    replyToForumHandler,
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 action ('Adds a reply') but doesn't cover critical aspects like required permissions, rate limits, whether the reply is editable/deletable, or what happens on success/failure. For a mutation tool with zero annotation coverage, this leaves significant gaps.

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 directly states the tool's purpose without unnecessary words. It's appropriately sized and front-loaded, with every word earning its place.

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 (a mutation operation with 2 parameters), lack of annotations, and no output schema, the description is incomplete. It doesn't address behavioral traits, parameter details, or expected outcomes, making it inadequate for safe and effective use by an AI agent.

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?

Schema description coverage is 0%, so the description must compensate for undocumented parameters. It mentions 'reply to an existing forum post or thread' which implies 'threadId' and 'message', but doesn't explain parameter meanings, formats (e.g., thread ID structure, message length limits), or constraints beyond what's obvious from the schema.

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 ('Adds a reply') and target resource ('to an existing forum post or thread'), providing a specific verb+resource combination. However, it doesn't distinguish this tool from potential alternatives like 'discord_send' or 'discord_create_forum_post' in the sibling list, which might handle similar messaging functions.

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 an existing thread), exclusions, or compare it to sibling tools like 'discord_send' or 'discord_create_forum_post', leaving the agent to infer usage 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