reply_to_comment
Post a response to an existing comment in Ed Discussion, supporting markdown formatting and optional privacy settings.
Instructions
Reply to an existing comment
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| comment_id | Yes | Comment ID to reply to | |
| content | Yes | Reply body (markdown or Ed XML) | |
| is_private | No | ||
| is_anonymous | No |
Implementation Reference
- src/api.ts:223-242 (handler)The actual implementation of the replyToComment API method.
async replyToComment( commentId: number, content: string, opts: { is_private?: boolean; is_anonymous?: boolean } = {} ): Promise<{ comment: EdComment }> { return this.request<{ comment: EdComment }>( "POST", `comments/${commentId}/comments`, { comment: { type: "comment", content, is_private: opts.is_private ?? false, is_anonymous: opts.is_anonymous ?? false, }, } ); } async endorseComment(commentId: number): Promise<void> { - src/index.ts:340-359 (registration)The MCP tool registration and handler wrapper for reply_to_comment.
server.tool( "reply_to_comment", "Reply to an existing comment", { comment_id: z.number().describe("Comment ID to reply to"), content: z.string().describe("Reply body (markdown or Ed XML)"), is_private: z.boolean().default(false), is_anonymous: z.boolean().default(false), }, async ({ comment_id, content, is_private, is_anonymous }) => { try { const result = await api.replyToComment(comment_id, ensureEdXml(content), { is_private, is_anonymous, }); return ok(result); } catch (err) { return fail(err); } }