Skip to main content
Glama
mcollina

GitHub Notifications MCP Server

delete-thread-subscription

Unsubscribe from a GitHub notification thread to stop receiving updates for that specific conversation.

Instructions

Unsubscribe from a GitHub notification thread

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
thread_idYesThe ID of the notification thread to unsubscribe from

Implementation Reference

  • Main handler function that deletes the thread subscription via GitHub API, handles success, 404 (not subscribed), and other errors.
    export async function deleteThreadSubscriptionHandler(args: z.infer<typeof deleteThreadSubscriptionSchema>) { try { // Make request to GitHub API await githubDelete(`/notifications/threads/${args.thread_id}/subscription`); return { content: [{ type: "text", text: `Successfully unsubscribed from thread ${args.thread_id}.` }] }; } catch (error) { if (error instanceof Error && error.message.includes("404")) { return { content: [{ type: "text", text: `You were not subscribed to thread ${args.thread_id}.` }] }; } return { isError: true, content: [{ type: "text", text: formatError(`Failed to unsubscribe from thread ${args.thread_id}`, error) }] }; } }
  • Zod schema defining the input parameter 'thread_id' for the tool.
    * Schema for delete-thread-subscription tool input parameters */ export const deleteThreadSubscriptionSchema = z.object({ thread_id: z.string().describe("The ID of the notification thread to unsubscribe from") });
  • Registration function that registers the tool with the MCP server using server.tool(name, description, schema, handler).
    export function registerDeleteThreadSubscriptionTool(server: any) { server.tool( "delete-thread-subscription", "Unsubscribe from a GitHub notification thread", deleteThreadSubscriptionSchema.shape, deleteThreadSubscriptionHandler ); }
  • src/server.ts:45-45 (registration)
    Invocation of the registration function during server startup to add the tool.
    registerDeleteThreadSubscriptionTool(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