discord_get_forum_post
Retrieve forum post details and messages from Discord using thread ID to access discussion content.
Instructions
Get a forum post's details and its messages.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| thread_id | Yes | ||
| limit | No | Number of messages to fetch (1–100, default 20). |
Implementation Reference
- src/tools/forums.ts:213-242 (handler)The 'discord_get_forum_post' handler function in src/tools/forums.ts, which fetches thread details and messages from Discord.
case "discord_get_forum_post": { const thread = await getThreadChannel(args.thread_id as string); const limit = Math.min(Number(args.limit ?? 20), 100); const messages = await thread.messages.fetch({ limit }); const result = { id: thread.id, name: thread.name, archived: thread.archived, locked: thread.locked, messageCount: thread.messageCount, appliedTags: thread.appliedTags, createdAt: thread.createdAt?.toISOString(), messages: [...messages.values()] .sort((a, b) => a.createdTimestamp - b.createdTimestamp) .map((m) => ({ id: m.id, author: m.author.tag, content: m.content, timestamp: m.createdAt.toISOString(), })), }; return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] }; } case "discord_list_forum_threads": { const forum = await getForumChannel(args.forum_channel_id as string); const active = await forum.threads.fetchActive(); const archived = await forum.threads.fetchArchived(); const threads = [ ...active.threads.values(), - src/tools/forums.ts:51-60 (schema)The input schema definition for 'discord_get_forum_post' which requires 'thread_id' and optional 'limit'.
name: "discord_get_forum_post", description: "Get a forum post's details and its messages.", inputSchema: { type: "object", properties: { thread_id: { type: "string" }, limit: { type: "number", description: "Number of messages to fetch (1–100, default 20)." }, }, required: ["thread_id"], },