Skip to main content
Glama
mcollina

GitHub Notifications MCP Server

get-thread-subscription

Check subscription status for a GitHub notification thread to determine if you're receiving updates or have muted it.

Instructions

Get subscription status for a GitHub notification thread

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
thread_idYesThe ID of the notification thread to check subscription status

Implementation Reference

  • The main handler function that executes the tool logic: fetches GitHub notification thread subscription status, formats it, and handles errors including 404 for unsubscribed threads.
    export async function getThreadSubscriptionHandler(args: z.infer<typeof getThreadSubscriptionSchema>) {
      try {
        // Make request to GitHub API
        const subscription = await githubGet<ThreadSubscription>(`/notifications/threads/${args.thread_id}/subscription`);
    
        // Format the subscription for better readability
        const formattedSubscription = formatSubscription(subscription);
    
        return {
          content: [{
            type: "text",
            text: `Subscription status for thread ${args.thread_id}:\n\n${formattedSubscription}`
          }]
        };
      } catch (error) {
        if (error instanceof Error && error.message.includes("404")) {
          return {
            content: [{
              type: "text",
              text: `You are not subscribed to thread ${args.thread_id}.`
            }]
          };
        }
        
        return {
          isError: true,
          content: [{
            type: "text",
            text: formatError(`Failed to fetch subscription for thread ${args.thread_id}`, error)
          }]
        };
      }
    }
  • Zod schema defining the input parameter: thread_id (string).
    export const getThreadSubscriptionSchema = z.object({
      thread_id: z.string().describe("The ID of the notification thread to check subscription status")
    });
  • The registration function that adds the tool to the MCP server using server.tool() with name, description, schema, and handler.
    export function registerGetThreadSubscriptionTool(server: any) {
      server.tool(
        "get-thread-subscription",
        "Get subscription status for a GitHub notification thread",
        getThreadSubscriptionSchema.shape,
        getThreadSubscriptionHandler
      );
    }
  • src/server.ts:43-43 (registration)
    Invocation of the registration function in the main server startup.
    registerGetThreadSubscriptionTool(server);
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It only states what the tool does ('Get subscription status') without detailing behavioral traits such as whether it requires authentication, rate limits, error handling, or the format of the returned status. This leaves significant gaps for an agent to understand how to invoke it effectively.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, clear sentence that directly states the tool's purpose without any unnecessary words or fluff. It is front-loaded and efficiently communicates the essential information, making it highly concise and well-structured.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's low complexity (single parameter, no nested objects) and the lack of annotations and output schema, the description is minimally adequate. It covers the basic purpose but fails to provide behavioral context or output details, which are necessary for complete understanding. This meets the minimum viable threshold but has clear gaps.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 100% description coverage, with the single parameter 'thread_id' fully documented in the schema. The description does not add any additional meaning or context beyond what the schema provides, such as examples or usage notes. According to the rules, with high schema coverage, the baseline is 3 even without param info in the description.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the specific action ('Get subscription status') and the target resource ('for a GitHub notification thread'), distinguishing it from sibling tools like 'get-thread' (which retrieves thread content) or 'set-thread-subscription' (which modifies subscription). It uses precise language that avoids tautology with the tool name.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage context by specifying 'for a GitHub notification thread,' indicating it should be used to check subscription status of notification threads. However, it does not explicitly state when to use this tool versus alternatives like 'manage-repo-subscription' or 'list-notifications,' nor does it provide exclusions or prerequisites, keeping it from a perfect score.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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