Skip to main content
Glama

Convergence Score

convergence_score

Scores how closely a git diff matches a stated task intent on a deterministic 0–100 scale, with coverage, scope, and risk-alignment sub-scores for review.

Instructions

Score convergence: a deterministic 0–100 measure of the distance between a stated task (intent) and the actual git diff (execution), with sub-scores for Coverage (did the intent happen?), Scope (did only the intent happen?), and Risk alignment (did unrequested drift land on risk-sensitive paths?). No model. A task that predicts no owner file is band inconclusive, with no score. Emits a recomputable receipt (a hash anyone can regenerate). Requires a base git ref to diff against; scores the working tree's tracked changes unless head or staged selects an exact subject.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "base": "<base>"
    },
    "name": "convergence_score"
  }
}

Input Schema

NameRequiredDescriptionDefault
topNoNumber of predicted owner files to consider. Defaults to 10.
baseYesGit ref to diff against (e.g. origin/main, HEAD~1). Required.
headNoScore exactly base..head instead of the working tree; the receipt binds to the head commit. Cannot be combined with staged.
pathNoRepository path. Defaults to current working directory.
queryNoThe stated task / intent to measure against the diff, e.g. "add Stripe refunds". Required unless intent is passed, whose request is then the query.
intentNoDeclared intent from change_impact declare (record, JSON, or path): score against the declared files instead of a live prediction.
stagedNoScore only the Git index; the receipt binds to its tree.
includeMarkdownNoReturn a compact human-readable markdown report instead of the full JSON. Defaults to false.
includeUntrackedNoWorking-tree mode only: also score untracked, non-ignored files. Defaults to false; untracked files are otherwise listed under untracked and not scored.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv4.13.0
    • changedInput schema / properties / query / description
      Previous value: -"The stated task / intent to measure against the diff, e.g. \"add Stripe refunds\"."New value: +"The stated task / intent to measure against the diff, e.g. \"add Stripe refunds\". Required unless intent is passed, whose request is then the query."
    • changedInput schema / required
      Previous value: -[
      -  "query",
      -  "base"
      -]New value: +[
      +  "base"
      +]
  2. Changed3 schema fields changedv4.10.0
    • changedInput schema / properties / head / description
      Previous value: -"Score exactly base..head (a direct tree diff, no merge base) instead of the working tree, and bind the receipt to the head commit and its tree SHA. Uncommitted and untracked files play no part. Cannot be combined with staged."New value: +"Score exactly base..head instead of the working tree; the receipt binds to the head commit. Cannot be combined with staged."
    • changedInput schema / properties / intent / description
      Previous value: -"Optional declared intent (from change_impact with declare: the record, its JSON, or a path to it). The diff is then scored against the files declared before the edit instead of a live prediction, and the receipt names the contract."New value: +"Declared intent from change_impact declare (record, JSON, or path): score against the declared files instead of a live prediction."
    • changedInput schema / properties / staged / description
      Previous value: -"Measure only the exact Git index tree and bind the receipt to its tree SHA. May create Git object or index-cache metadata; source files are unchanged."New value: +"Score only the Git index; the receipt binds to its tree."
  3. Changed1 schema field changedv4.7.2
    • addedInput schema / properties / intent
      Added value: +{
      +  "description": "Optional declared intent (from change_impact with declare: the record, its JSON, or a path to it). The diff is then scored against the files declared before the edit instead of a live prediction, and the receipt names the contract."
      +}
  4. Changed2 schema fields changedv1.15.2
    • addedInput schema / properties / head
      Added value: +{
      +  "description": "Score exactly base..head (a direct tree diff, no merge base) instead of the working tree, and bind the receipt to the head commit and its tree SHA. Uncommitted and untracked files play no part. Cannot be combined with staged.",
      +  "type": "string"
      +}
    • addedInput schema / properties / includeUntracked
      Added value: +{
      +  "description": "Working-tree mode only: also score untracked, non-ignored files. Defaults to false; untracked files are otherwise listed under untracked and not scored.",
      +  "type": "boolean"
      +}
  5. First observed

TDQS

A4.1/5.0
Behavior3/5

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

The description adds substantial behavior beyond the single readOnlyHint=false annotation: determinism with no model, the inconclusive no-score band when no owner file is predicted, a recomputable receipt hash, and untracked-file handling. However, it never explains why the tool is flagged non-read-only (presumably receipt writing), so a small ambiguity remains against the annotations.

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?

It is front-loaded: the core definition and sub-scores come first, mechanics and parameters after. The final sentence is a long run-on clause chain ('unless head or staged selects an exact subject') that impedes fast parsing, but no sentence is filler.

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 9-parameter analytical tool with no output schema, the description covers the scoring model, sub-scores, the inconclusive case, and the markdown-versus-JSON output switch. Remaining gaps are minor: no description of score bands or how to interpret a numeric result.

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 parameter meanings are already documented and the baseline is 3. The description still adds real value by explaining mutual exclusivity implications (head vs staged) and how query versus intent alternate as the intent source, which is relationship-level information the per-field schema doesn't convey.

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 names a specific verb and resource — a deterministic 0–100 score of distance between stated intent and the actual git diff — and decomposes it into Coverage, Scope, and Risk alignment sub-scores. No sibling tool does diff-versus-intent scoring, so an agent can distinguish it immediately.

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 states prerequisites (a required base git ref) and precisely which subject is scored: working tree by default, or base..head / staged when those parameters select an exact subject. It also notes intent can come from a change_impact declaration. What's missing is explicit when-not-to-use guidance or named alternatives for adjacent needs.

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