Skip to main content
Glama

read

Mark GitHub pull request notifications as read to manage your open source contribution workflow. Specify a single PR URL or mark all PRs as read.

Instructions

Mark PR notifications as read. Requires either prUrl or all to be specified.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
prUrlNoFull GitHub PR URL to mark as read. Omit to use --all instead.
allNoIf true, mark all PRs as read

Implementation Reference

  • The implementation of the read tool logic. It acts as a no-op in v2 as read state is not tracked locally.
    export async function runRead(options: { prUrl?: string; all?: boolean }): Promise<ReadOutput> {
      if (!options.all && !options.prUrl) {
        throw new Error('PR URL or --all flag required');
      }
    
      if (options.prUrl) {
        validateUrl(options.prUrl);
      }
    
      // In v2, unread state is not tracked locally — PRs are fetched fresh each run.
      if (options.all) {
        return { markedAsRead: 0, all: true, message: 'In v2, PR read state is not tracked locally.' };
      }
      return { marked: false, url: options.prUrl, message: 'In v2, PR read state is not tracked locally.' };
    }
  • Registration of the 'read' tool using the wrapTool helper and the runRead command handler.
    // 7. read — Mark notifications as read
    server.registerTool(
      'read',
      {
        description: 'Mark PR notifications as read. Requires either prUrl or all to be specified.',
        inputSchema: {
          prUrl: z.string().optional().describe('Full GitHub PR URL to mark as read. Omit to use --all instead.'),
          all: z.boolean().optional().describe('If true, mark all PRs as read'),
        },
        annotations: { readOnlyHint: false, destructiveHint: false },
      },
      wrapTool(runRead),
    );

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/costajohnt/oss-autopilot'

If you have feedback or need assistance with the MCP directory API, please join our Discord server