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
| Name | Required | Description | Default |
|---|---|---|---|
| prUrl | No | Full GitHub PR URL to mark as read. Omit to use --all instead. | |
| all | No | If true, mark all PRs as read |
Implementation Reference
- packages/core/src/commands/read.ts:13-27 (handler)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.' }; } - packages/mcp-server/src/tools.ts:157-169 (registration)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), );