Skip to main content
Glama

Explain Pull Request Score Tool

explain-pull-request-score-tool
Read-onlyIdempotent

Explain why one specific pull request got the quality score and label Coderbuds gave it. Returns the receipts rather than a summary: the recorded score, its label, the size counts, every penalty that was applied with its point cost, the AI adjustment, and the stored breakdown. Use this when someone asks "why is #1186 marked poor" or wants to understand a low score on a PR they opened.

The score is structural: it starts at 100 and subtracts penalties for diff size, lines changed, files changed, change complexity, focus, title/description quality and changes spanning unrelated areas, then applies a bounded AI adjustment (at most ±20) for readability, test coverage and security. It does not read CI results and does not run a linter — never claim otherwise. Report only the factors this tool returns.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
repositoryYesThe repository the pull request lives in, as "owner/name" (e.g. patchstack/saas) or a bare repository name.
pull_request_numberYesThe pull request number, e.g. 1186.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlNoLink to the pull request.
sizeNoadditions, deletions, total_changes, changed_files, lines_category, diff_characters.
foundYesWhether Coderbuds is tracking this pull request.
labelNoThe label for that score: Elite, Excellent, Good, Average, Below Average, Needs Improvement, Poor.
scoreNoThe recorded quality score out of 100.
titleNoPull request title.
authorNoWho opened it.
numberYesPull request number.
scoredYesWhether a quality score was recorded.
statusNoPull request status.
factorsYesHuman-readable receipts: each penalty applied and its point cost.
messageNoWhy the lookup failed, when found is false.
categoryNoHow Coderbuds categorised the change (feature, bug-fix, dependency-update, …).
repositoryNoFull repository name.
ai_adjustmentNoPoints the AI review added or removed on top of the structural score.
scoring_basisYesWhat the score does and does not measure. Quote this rather than inventing criteria.
recommendationNoWhat would raise the score next time.
objective_scoreNoThe structural score before any AI adjustment.
not_scored_reasonNoWhy there is no score, when scored is false — usually the PR was past the size limit for review.
recorded_breakdownNoThe breakdown stored when the review ran.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior5/5

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

Annotations only cover read-only and idempotent behavior, but the description adds substantial context beyond that: the scoring model (start at 100, subtract size/lines/files/complexity/focus/title-description/cross-area penalties), a bounded AI adjustment of at most ±20, and explicit exclusions (no CI results, no linter). It also constrains reporting to the returned `factors`, preventing fabricated explanations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with purpose and a concrete example use case, then a second paragraph on methodology and caveats. Every sentence carries information, though the methodology paragraph is slightly dense and could be trimmed without losing meaning.

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

Completeness5/5

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

Output schema exists, so return values need no explanation, yet the description still clarifies the shape of the response and the scoring rationale. The exclusions (CI, linter) and the instruction to report only returned factors close the remaining ambiguity for an explain-style tool.

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 coverage is 100% and both parameters are documented in the schema with format examples ('owner/name', PR number 1186). The description adds no additional parameter-level detail, so the baseline of 3 for a fully-documented schema is appropriate.

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?

States a specific verb and resource: explain why one specific PR received its score and label. The description also enumerates exactly what it returns (score, label, size counts, penalties with point cost, AI adjustment, breakdown), which clearly separates it from sibling metrics tools like get-pull-request-metrics-tool.

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?

Gives explicit trigger scenarios such as someone asking 'why is #1186 marked poor' or wanting to understand a low score on their own PR, and it defines the scope as one specific pull request. It does not, however, name an alternative sibling (e.g. get-pull-request-metrics-tool) for aggregate or cross-PR comparisons.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources