get_thread
Retrieve an Ed Discussion thread by its global ID to access all comments and answers in one view.
Instructions
Get a thread by global ID, including all comments and answers
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"thread_id": "<thread_id>"
},
"name": "get_thread"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| thread_id | Yes | Global thread ID |
Implementation Reference
- src/api.ts:130-132 (handler)The core API handler method that performs the network request to fetch thread details.
async getThread(threadId: number): Promise<EdGetThreadResponse> { return this.request<EdGetThreadResponse>("GET", `threads/${threadId}`); } - src/index.ts:139-150 (registration)The MCP tool registration for 'get_thread', which calls the api.getThread handler.
server.tool( "get_thread", "Get a thread by global ID, including all comments and answers", { thread_id: z.number().describe("Global thread ID"), }, async ({ thread_id }) => { try { return ok(await api.getThread(thread_id)); } catch (err) { return fail(err); }