Skip to main content
Glama
mcollina

GitHub Notifications MCP Server

mark-thread-read

Mark a GitHub notification thread as read to clean up your notification list and focus on unread items.

Instructions

Mark a GitHub notification thread as read

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
thread_idYesThe ID of the notification thread to mark as read

Implementation Reference

  • The markThreadReadHandler function that executes the tool logic: calls GitHub API to mark the notification thread as read and returns success/error response.
    export async function markThreadReadHandler(args: z.infer<typeof markThreadReadSchema>) { try { // Make request to GitHub API await githubPatch(`/notifications/threads/${args.thread_id}`); return { content: [{ type: "text", text: `Successfully marked thread ${args.thread_id} as read.` }] }; } catch (error) { return { isError: true, content: [{ type: "text", text: formatError(`Failed to mark thread ${args.thread_id} as read`, error) }] }; } }
  • Zod schema for input validation: requires thread_id string.
    export const markThreadReadSchema = z.object({ thread_id: z.string().describe("The ID of the notification thread to mark as read") });
  • Registers the 'mark-thread-read' tool with the MCP server, providing name, description, schema, and handler.
    export function registerMarkThreadReadTool(server: any) { server.tool( "mark-thread-read", "Mark a GitHub notification thread as read", markThreadReadSchema.shape, markThreadReadHandler ); }
  • src/server.ts:41-41 (registration)
    Calls the registration function during server initialization to add the tool.
    registerMarkThreadReadTool(server);

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/mcollina/mcp-github-notifications'

If you have feedback or need assistance with the MCP directory API, please join our Discord server