Skip to main content
Glama
mcollina

GitHub Notifications MCP Server

set-thread-subscription

Subscribe to a GitHub notification thread to receive updates or ignore notifications for specific conversations.

Instructions

Subscribe to a GitHub notification thread

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
thread_idYesThe ID of the notification thread to subscribe to
ignoredNoIf true, notifications will be ignored

Implementation Reference

  • The main handler function that executes the tool logic: updates GitHub notification thread subscription via API call.
    export async function setThreadSubscriptionHandler(args: z.infer<typeof setThreadSubscriptionSchema>) {
      try {
        // Prepare request body
        const requestBody = {
          ignored: args.ignored
        };
    
        // Make request to GitHub API
        const subscription = await githubPut<ThreadSubscription>(
          `/notifications/threads/${args.thread_id}/subscription`, 
          requestBody
        );
    
        // Format the subscription for better readability
        const formattedSubscription = formatSubscription(subscription);
        const status = args.ignored ? "ignoring" : "subscribing to";
    
        return {
          content: [{
            type: "text",
            text: `Successfully updated subscription by ${status} thread ${args.thread_id}:\n\n${formattedSubscription}`
          }]
        };
      } catch (error) {
        return {
          isError: true,
          content: [{
            type: "text",
            text: formatError(`Failed to update subscription for thread ${args.thread_id}`, error)
          }]
        };
      }
    }
  • Zod schema defining input parameters for the tool: thread_id (string) and ignored (optional boolean).
    export const setThreadSubscriptionSchema = z.object({
      thread_id: z.string().describe("The ID of the notification thread to subscribe to"),
      ignored: z.boolean().optional().default(false).describe("If true, notifications will be ignored")
    });
  • Registration function that adds the tool to the MCP server using server.tool().
    export function registerSetThreadSubscriptionTool(server: any) {
      server.tool(
        "set-thread-subscription",
        "Subscribe to a GitHub notification thread",
        setThreadSubscriptionSchema.shape,
        setThreadSubscriptionHandler
      );
    }
  • src/server.ts:44-44 (registration)
    Call to the registration function during MCP server startup to enable the tool.
    registerSetThreadSubscriptionTool(server);
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the action ('Subscribe') but doesn't explain what subscription entails (e.g., email notifications, API events), whether it's idempotent, or if there are rate limits or authentication requirements. This leaves significant gaps for a mutation tool.

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, efficient sentence with zero wasted words. It's front-loaded with the core action and resource, making it easy to scan and understand quickly.

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

Completeness2/5

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

Given the tool's mutation nature (subscription implies a write operation), lack of annotations, and no output schema, the description is incomplete. It doesn't cover behavioral aspects like side effects, error conditions, or return values, which are critical for safe and effective use.

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 schema description coverage is 100%, so the schema already fully documents both parameters (thread_id and ignored). The description adds no additional meaning beyond what's in the schema, such as explaining the implications of 'ignored' or thread ID format, resulting in the baseline score.

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

Purpose4/5

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

The description clearly states the action ('Subscribe') and resource ('GitHub notification thread'), making the purpose immediately understandable. However, it doesn't explicitly differentiate from sibling tools like 'get-thread-subscription' or 'manage-repo-subscription', which prevents a perfect score.

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

Usage Guidelines2/5

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

No guidance is provided on when to use this tool versus alternatives like 'delete-thread-subscription' or 'manage-repo-subscription'. The description lacks context about prerequisites, such as whether the thread must exist or if the user needs specific permissions, leaving usage unclear.

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