Skip to main content
Glama

Explain pull request score

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

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

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 cover the safety profile (readOnly, idempotent), and the description goes well beyond them: it explains the scoring model (starts at 100, subtracts diff/file/complexity/focus/title penalties), the bounded ±20 AI adjustment and its dimensions, and explicitly disclaims CI and linting so the agent cannot misreport. It also instructs 'Report only the `factors` this tool returns', which is real behavioral guidance.

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?

The lead sentence front-loads the purpose followed by the return contents and usage triggers, all earning their place. The second paragraph on the scoring algorithm is longer than strictly necessary for tool selection but does support correct interpretation of the output, so the cost is mild.

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?

With an output schema present, the description needn't document return fields, yet it highlights the key ones and warns about what the score does and does not include. For a two-parameter read tool with full annotation coverage, nothing an agent needs is missing.

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 description coverage is 100% for both required parameters, so the schema already documents repository format and PR number. The description adds only an incidental example ('#1186') and no additional semantics, so the baseline of 3 applies.

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?

The description opens with a precise verb and resource: 'Explain why one specific pull request got the quality score and label Coderbuds gave it.' It also enumerates what the response contains (score, label, size counts, penalties with point costs, AI adjustment, stored breakdown), which distinguishes it from aggregate siblings like get-pull-request-metrics-tool without naming them.

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?

It gives concrete triggering contexts ('why is #1186 marked poor', 'a low score on a PR they opened') and states explicit exclusions: it does not read CI results and does not run a linter. It does not name a specific sibling tool as the alternative for aggregate or list-level questions, which is the only gap.

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