accept_answer
Mark a comment as the accepted solution to resolve a question thread in Ed Discussion.
Instructions
Accept a comment as the answer to a question thread
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| thread_id | Yes | Global thread ID | |
| comment_id | Yes | Comment ID to accept |
Implementation Reference
- src/api.ts:250-252 (handler)The actual API implementation for accepting an answer.
async acceptAnswer(threadId: number, commentId: number): Promise<void> { await this.request("POST", `threads/${threadId}/accept/${commentId}`); } - src/index.ts:390-404 (registration)Tool registration and handler invocation for 'accept_answer'.
server.tool( "accept_answer", "Accept a comment as the answer to a question thread", { thread_id: z.number().describe("Global thread ID"), comment_id: z.number().describe("Comment ID to accept"), }, async ({ thread_id, comment_id }) => { try { await api.acceptAnswer(thread_id, comment_id); return msg(`Comment ${comment_id} accepted as answer for thread ${thread_id}.`); } catch (err) { return fail(err); } }