Skip to main content
Glama
mcollina

GitHub Notifications MCP Server

mark-repo-notifications-read

Clear notification clutter by marking GitHub repository alerts as read. Specify owner and repo to manage your notification status.

Instructions

Mark GitHub notifications for a specific repository as read

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
ownerYesThe account owner of the repository
repoYesThe name of the repository
last_read_atNoISO 8601 timestamp - marks notifications updated at or before this time as read. Default is current time.
readNoWhether to mark notifications as read or unread

Implementation Reference

  • The main async handler function implementing the tool logic: prepares request body with last_read_at and read flags, calls GitHub API via githubPut to mark repo notifications, handles async response or success/error messages.
    export async function markRepoNotificationsReadHandler(args: z.infer<typeof markRepoNotificationsReadSchema>) {
      try {
        // Prepare request body
        const requestBody = {
          last_read_at: args.last_read_at,
          read: args.read
        };
    
        // Make request to GitHub API
        const response = await githubPut<MarkNotificationsReadResponse>(
          `/repos/${args.owner}/${args.repo}/notifications`, 
          requestBody
        );
    
        // Check if notifications are processed asynchronously
        if (response.message) {
          return {
            content: [{
              type: "text",
              text: `${response.message}`
            }]
          };
        }
    
        // Default success message
        return {
          content: [{
            type: "text",
            text: `Successfully marked notifications for repository ${args.owner}/${args.repo} as ${args.read ? 'read' : 'unread'}.${
              args.last_read_at 
                ? ` Notifications updated on or before ${new Date(args.last_read_at).toLocaleString()} were affected.` 
                : ''
            }`
          }]
        };
      } catch (error) {
        return {
          isError: true,
          content: [{
            type: "text",
            text: formatError(`Failed to mark notifications as read for repository ${args.owner}/${args.repo}`, error)
          }]
        };
      }
    }
  • Zod schema defining input parameters: owner, repo (required), last_read_at (optional ISO timestamp), read (optional boolean default true).
    export const markRepoNotificationsReadSchema = z.object({
      owner: z.string().describe("The account owner of the repository"),
      repo: z.string().describe("The name of the repository"),
      last_read_at: z.string().optional().describe(
        "ISO 8601 timestamp - marks notifications updated at or before this time as read. Default is current time."
      ),
      read: z.boolean().optional().default(true).describe(
        "Whether to mark notifications as read or unread"
      )
    });
  • Registration function that adds the tool to the MCP server using server.tool() with name, description, schema, and handler.
    export function registerMarkRepoNotificationsReadTool(server: any) {
      server.tool(
        "mark-repo-notifications-read",
        "Mark GitHub notifications for a specific repository as read",
        markRepoNotificationsReadSchema.shape,
        markRepoNotificationsReadHandler
      );
    }
  • src/server.ts:47-47 (registration)
    Call to register the mark-repo-notifications-read tool during server initialization in the startServer function.
    registerMarkRepoNotificationsReadTool(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 tool performs a write operation ('mark...as read'), implying mutation, but doesn't disclose permissions required, whether changes are reversible, rate limits, or what happens to notifications after marking. This leaves significant behavioral 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 that directly states the tool's purpose with zero wasted words. It's appropriately sized for a straightforward tool and front-loads the core functionality.

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?

For a mutation tool with no annotations and no output schema, the description is inadequate. It doesn't explain what happens after marking notifications as read (e.g., are they hidden from future queries?), error conditions, or return values. The agent must rely entirely on the schema for behavioral understanding.

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?

Schema description coverage is 100%, so the schema fully documents all 4 parameters. The description adds no parameter-specific information beyond what's in the schema (e.g., it doesn't explain the relationship between 'last_read_at' and 'read' parameters). This meets the baseline for high schema coverage.

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 ('mark...as read') and resource ('GitHub notifications for a specific repository'), making the purpose immediately understandable. However, it doesn't explicitly differentiate from sibling tools like 'mark-notifications-read' (global) or 'mark-thread-read' (thread-specific), which would require a 5.

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?

The description provides no guidance on when to use this tool versus alternatives like 'mark-notifications-read' (global notifications) or 'mark-thread-read' (specific threads). It also doesn't mention prerequisites or exclusions, leaving the agent to infer usage context from the tool name alone.

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