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),
    );
Behavior3/5

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

Annotations establish write/non-destructive safety profile (readOnlyHint:false, destructiveHint:false). Description adds what specifically gets modified (notification read status), but omits details like idempotency, auth requirements, or behavior when re-marking already-read items.

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?

Two sentences, zero waste. Front-loaded with action verb, immediately followed by critical parameter constraint. Every word serves a purpose.

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

Completeness4/5

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

Adequate for a simple state-change tool. Compensates for schema's missing 'required' constraint. Good annotations cover safety profile; no output schema means no return value documentation needed. Could benefit from noting GitHub auth scope requirements.

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

Parameters4/5

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

With 100% schema coverage, baseline is 3. Description adds value by explicitly stating the logical XOR requirement ('either...or') that the schema fails to enforce (required: []), clarifying that omitting both is invalid despite schema allowing it.

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?

Excellent: Specific verb 'Mark' + resource 'PR notifications as read'. Clearly distinguishes from siblings like 'dismiss', 'claim', or 'track' by specifying notification read-state modification rather than ownership or visibility changes.

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

Usage Guidelines3/5

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

Provides necessary parameter constraint ('Requires either prUrl or all'), but lacks explicit guidance on when to choose this tool over siblings like 'dismiss' or 'unshelve' for managing PR notifications.

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

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