Skip to main content
Glama

get_risk_score

Calculate a 0-100 QA risk score for a code change, combining test gap, fix completeness, hotspot recurrence, blast radius, and churn to identify contributing risk factors.

Instructions

QA risk score for a change: 0-100 with level (low/medium/high) and contributing factors.

Combines test gap, fix completeness, hotspot recurrence, blast radius, and churn.

Returns: {score: int, level: "low"|"medium"|"high", factors: [{name, detail, points}]}

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
prNo
baseNo
headNo
repoYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.4.1

TDQS

B3.1/5.0
Behavior4/5

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

With no annotations, the description carries the behavioral disclosure burden and does a reasonable job: it states the output range, the level vocabulary, the contributing factors, and the exact return shape. It does not discuss side effects, but 'get' plus the output focus makes read-only behavior reasonably inferable. The main omission is how the tool behaves when optional parameters are omitted.

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?

The description is compact and well structured: the core purpose and output scale are front-loaded, followed by the combination inputs and then a precise return type. Every sentence adds information, and there is no filler or repetition.

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

Completeness2/5

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

The description is thorough about the output and calculation inputs, but it omits the most critical operational context: how to identify the change being scored. It does not explain whether repo+pr is the intended invocation or whether base/head commits define a range. With no annotations and no output schema, these omissions leave the tool underspecified for correct invocation.

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

Parameters1/5

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

Schema description coverage is 0%, and the description provides no explanation of the parameters: repo, pr, base, or head. It never states that pr is a pull request number, what base/head refer to, or how they relate to the required repo parameter. With no schema descriptions and no compensation in the description, an agent cannot confidently populate the parameters.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states that this tool produces a QA risk score (0-100) for a change, including a level and contributing factors. It also lists the combined inputs, which makes it distinct from siblings like get_blast_radius or get_test_impact. However, it does not explicitly name an alternative or contrast itself with a sibling.

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

Usage Guidelines2/5

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

There is no explicit guidance on when to use this tool versus the many siblings such as verify_fix, check_completeness, or classify_change. The phrase 'QA risk score for a change' implies a use case, but the description never states when this aggregate score should be chosen over more specific tools, nor does it mention any exclusions or prerequisites.

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