mark-thread-done
Mark GitHub notification threads as done to manage your inbox by clearing resolved notifications.
Instructions
Mark a GitHub notification thread as done
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| thread_id | Yes | The ID of the notification thread to mark as done |
Implementation Reference
- src/tools/mark-thread-done.ts:18-38 (handler)The handler function that executes the tool: deletes the GitHub notification thread via API and returns formatted success/error response.export async function markThreadDoneHandler(args: z.infer<typeof markThreadDoneSchema>) { try { // Make request to GitHub API await githubDelete(`/notifications/threads/${args.thread_id}`); return { content: [{ type: "text", text: `Successfully marked thread ${args.thread_id} as done.` }] }; } catch (error) { return { isError: true, content: [{ type: "text", text: formatError(`Failed to mark thread ${args.thread_id} as done`, error) }] }; } }
- src/tools/mark-thread-done.ts:11-13 (schema)Zod schema defining the input parameter 'thread_id' for the tool.export const markThreadDoneSchema = z.object({ thread_id: z.string().describe("The ID of the notification thread to mark as done") });
- src/tools/mark-thread-done.ts:43-50 (registration)Registers the 'mark-thread-done' tool with the MCP server using server.tool().export function registerMarkThreadDoneTool(server: any) { server.tool( "mark-thread-done", "Mark a GitHub notification thread as done", markThreadDoneSchema.shape, markThreadDoneHandler ); }
- src/server.ts:42-42 (registration)Invokes the registration function for this tool during server startup.registerMarkThreadDoneTool(server);