Skip to main content
Glama
mcollina

GitHub Notifications MCP Server

get-thread

Retrieve detailed information about a specific GitHub notification thread by providing its thread ID to manage and respond to notifications.

Instructions

Get information about a GitHub notification thread

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
thread_idYesThe ID of the notification thread to retrieve

Implementation Reference

  • The main handler function that fetches the GitHub notification thread using the GitHub API, formats it, and returns the content or an error.
    export async function getThreadHandler(args: z.infer<typeof getThreadSchema>) { try { // Make request to GitHub API const thread = await githubGet<NotificationResponse>(`/notifications/threads/${args.thread_id}`); // Format the thread for better readability const formattedThread = formatNotification(thread); return { content: [{ type: "text", text: `Thread details:\n\n${formattedThread}` }] }; } catch (error) { return { isError: true, content: [{ type: "text", text: formatError(`Failed to fetch thread ${args.thread_id}`, error) }] }; } }
  • Zod schema defining the input parameter 'thread_id' for the get-thread tool.
    export const getThreadSchema = z.object({ thread_id: z.string().describe("The ID of the notification thread to retrieve") });
  • Function that registers the 'get-thread' tool with the MCP server, specifying name, description, schema, and handler.
    export function registerGetThreadTool(server: any) { server.tool( "get-thread", "Get information about a GitHub notification thread", getThreadSchema.shape, getThreadHandler ); }

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