Skip to main content
Glama
jamesjfoong

github-pr-review-mcp

by jamesjfoong

validate_pr_comment_target

Ensure a PR comment target (path, line, side) is valid for the diff; if invalid, get the reason and nearest valid line.

Instructions

Validate if a comment target (path, line, side) is valid for the PR diff. Returns validation status, reason for invalidity, and nearest valid line suggestion if applicable.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
lineYesLine number to validate
pathYesFile path in the PR
repoYesRepository name
sideNoSide of the diff (LEFT for old, RIGHT for new)
ownerYesRepository owner/organization
prNumberYesPull request number

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observedv1.0.4

TDQS

A4.4/5.0
Behavior4/5

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

With no annotations provided, the description carries the burden of behavioral disclosure. It clearly signals a non-mutating validation operation and describes what the agent should expect back: a status, an invalidity reason, and a nearest valid line suggestion. It does not cover auth or edge cases, but it meaningfully discloses the tool's behavior.

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 tightly written sentences with no filler. The primary action is stated first, and the return information is included compactly in the second sentence.

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?

For a 6-parameter tool with no output schema, the description covers the core inputs as a comment target and enumerates the key return components. It could be more explicit about exact response shape or error conditions, but it gives enough for an agent to understand when and how to invoke the tool.

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?

Schema coverage is 100%, so the baseline is 3. The description adds value by grouping path, line, and side into the concept of a 'comment target' and linking validation to the PR diff, which clarifies how the parameters relate beyond their individual schema descriptions.

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?

Uses a specific verb ('Validate') with a clear resource: a PR comment target composed of path, line, and side. It also states what the tool returns (validation status, invalidity reason, nearest valid line suggestion), making it clearly distinct from sibling tools that get, add, or review comments.

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

Usage Guidelines4/5

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

The description gives clear context: this tool is for checking whether a comment target is valid for the PR diff, which implies use before placing a comment. It does not explicitly name alternatives or say when not to use it, but the context is strong enough to guide selection.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

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/jamesjfoong/github-pr-review-mcp'

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