Skip to main content
Glama

post_comment

Add comments or answers to discussion threads using markdown formatting for clear communication in Ed Discussion forums.

Instructions

Post a comment or answer on a thread. Content can be markdown.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
thread_idYesGlobal thread ID
contentYesComment body (markdown or Ed XML)
typeNoComment or answercomment
is_privateNo
is_anonymousNo

Implementation Reference

  • The actual implementation of the post_comment logic, performing an HTTP POST request.
    async postComment(
      threadId: number,
      content: string,
      type: "comment" | "answer" = "comment",
      opts: { is_private?: boolean; is_anonymous?: boolean } = {}
    ): Promise<{ comment: EdComment }> {
      return this.request<{ comment: EdComment }>(
        "POST",
        `threads/${threadId}/comments`,
        {
          comment: {
            type,
            content,
            is_private: opts.is_private ?? false,
            is_anonymous: opts.is_anonymous ?? false,
          },
        }
      );
  • src/index.ts:317-338 (registration)
    MCP tool registration for "post_comment".
    server.tool(
      "post_comment",
      "Post a comment or answer on a thread. Content can be markdown.",
      {
        thread_id: z.number().describe("Global thread ID"),
        content: z.string().describe("Comment body (markdown or Ed XML)"),
        type: z.enum(["comment", "answer"]).default("comment").describe("Comment or answer"),
        is_private: z.boolean().default(false),
        is_anonymous: z.boolean().default(false),
      },
      async ({ thread_id, content, type, is_private, is_anonymous }) => {
        try {
          const result = await api.postComment(thread_id, ensureEdXml(content), type, {
            is_private,
            is_anonymous,
          });
          return ok(result);
        } catch (err) {
          return fail(err);
        }
      }
    );
Behavior3/5

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

With no annotations provided, the description carries full burden. It discloses markdown support ('Content can be markdown') but fails to mention side effects, permission requirements, whether posting triggers notifications, or what determines success/failure. Adequate but minimal behavioral disclosure.

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?

Extremely concise at two sentences. First sentence establishes purpose; second adds format context. No filler words or redundant information. Efficiently structured.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 5-parameter write operation with no output schema, the description covers the basics but leaves significant gaps. The privacy and anonymity parameters are unexplained, and there's no indication of return values or error conditions. Minimum viable coverage.

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 coverage is 60% (is_private and is_anonymous lack descriptions). The description mentions markdown (aligning with content) and comment/answer distinction (aligning with type) but does not compensate for the undocumented boolean flags. No syntax guidance or examples provided.

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 core action ('Post a comment or answer') and target resource ('on a thread'). It distinguishes from post_thread (creating threads) by specifying commenting on existing threads, though it could better differentiate from reply_to_comment.

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?

No guidance on when to use this tool versus siblings like reply_to_comment. No explanation of when to choose 'answer' versus 'comment' type, or when to use the privacy/anonymity flags. Completely absent decision criteria.

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/rob-9/edstem-mcp'

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