Skip to main content
Glama

repo_status

Read-onlyIdempotent

Summarize repository-wide comprehension debt by quantifying AI-written code, human understanding, and riskiest files for targeted review.

Instructions

Summarize comprehension debt for the whole repository: how much code is AI-written, how much of that anyone understands, and which files are riskiest.

When to use: the user asks how much of the code is AI-written, where the risk is, or for an overview. For
specific files you are about to change, use comprehension_risk instead; for change over time, use ai_trend.

Returns {"repo", "head", "risk", "total", "critical_paths", "riskiest_files"}. total and critical_paths hold
lines, human, ai, understood, skimmed, fading, unread, debt_pct, ai_pct, agents and understood_by.
riskiest_files lists up to `top` files with lines, ai_lines, unread, debt_pct and critical. Debt counts unread
AI-written lines in full and skimmed or fading ones (understood over 180 days ago) as half.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "repo_status"
  }
}

Input Schema

NameRequiredDescriptionDefault
topNoHow many of the riskiest files to list.
repoNoPath inside the git repository. Defaults to the server's working directory.

Output Schema

NameRequiredDescriptionDefault
headYesCommit scanned (short SHA).
repoYesRepository folder name.
riskYesOverall risk level for the repository.
totalYes
critical_pathsYesSame numbers for critical paths only; null if none are configured.
riskiest_filesYesFiles with the most comprehension debt, worst first.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.4.0
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$defs": {
      +    "LineStats": {
      +      "additionalProperties": true,
      +      "properties": {
      +        "agents": {
      +          "additionalProperties": {
      +            "type": "integer"
      +          },
      +          "description": "AI agent -> lines it wrote.",
      +          "title": "Agents",
      +          "type": "object"
      +        },
      +        "ai": {
      +          "description": "Lines written by AI coding agents.",
      +          "title": "Ai",
      +          "type": "integer"
      +        },
      +        "ai_pct": {
      +          "description": "Share of lines written by AI, in percent.",
      +          "title": "Ai Pct",
      +          "type": "number"
      +        },
      +        "debt_lines": {
      +          "description": "unread + half of skimmed and fading.",
      +          "title": "Debt Lines",
      +          "type": "number"
      +        },
      +        "debt_pct": {
      +          "description": "Comprehension debt: debt_lines as a percentage of all lines.",
      +          "title": "Debt Pct",
      +          "type": "number"
      +        },
      +        "fading": {
      +          "description": "AI-written lines understood more than 180 days ago.",
      +          "title": "Fading",
      +          "type": "integer"
      +        },
      +        "human": {
      +          "description": "Lines written by people.",
      +          "title": "Human",
      +          "type": "integer"
      +        },
      +        "lines": {
      +          "description": "Meaningful lines scanned.",
      +          "title": "Lines",
      +          "type": "integer"
      +        },
      +        "skimmed": {
      +          "description": "AI-written lines only reviewed, or quizzed with a low score.",
      +          "title": "Skimmed",
      +          "type": "integer"
      +        },
      +        "understood": {
      +          "description": "AI-written lines someone has shown they understand.",
      +          "title": "Understood",
      +          "type": "integer"
      +        },
      +        "understood_by": {
      +          "additionalProperties": {
      +            "type": "integer"
      +          },
      +          "description": "Person (git email) -> AI-written lines they understand.",
      +          "title": "Understood By",
      +          "type": "object"
      +        },
      +        "unread": {
      +          "description": "AI-written lines nobody has checked.",
      +          "title": "Unread",
      +          "type": "integer"
      +        }
      +      },
      +      "required": [
      +        "lines",
      +        "human",
      +        "ai",
      +        "understood",
      +        "fading",
      +        "skimmed",
      +        "unread",
      +        "debt_lines",
      +        "debt_pct",
      +        "ai_pct",
      +        "understood_by",
      +        "agents"
      +      ],
      +      "title": "LineStats",
      +      "type": "object"
      +    },
      +    "RiskyFile": {
      +      "additionalProperties": true,
      +      "properties": {
      +        "ai_lines": {
      +          "title": "Ai Lines",
      +          "type": "integer"
      +        },
      +        "critical": {
      +          "description": "Matches a critical path in .grokmap.toml.",
      +          "title": "Critical",
      +          "type": "boolean"
      +        },
      +        "debt_pct": {
      +          "title": "Debt Pct",
      +          "type": "number"
      +        },
      +        "lines": {
      +          "title": "Lines",
      +          "type": "integer"
      +        },
      +        "path": {
      +          "title": "Path",
      +          "type": "string"
      +        },
      +        "unread": {
      +          "title": "Unread",
      +          "type": "integer"
      +        }
      +      },
      +      "required": [
      +        "path",
      +        "lines",
      +        "ai_lines",
      +        "unread",
      +        "debt_pct",
      +        "critical"
      +      ],
      +      "title": "RiskyFile",
      +      "type": "object"
      +    }
      +  },
      +  "additionalProperties": true,
      +  "properties": {
      +    "critical_paths": {
      +      "anyOf": [
      +        {
      +          "$ref": "#/$defs/LineStats"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "description": "Same numbers for critical paths only; null if none are configured."
      +    },
      +    "head": {
      +      "description": "Commit scanned (short SHA).",
      +      "title": "Head",
      +      "type": "string"
      +    },
      +    "repo": {
      +      "description": "Repository folder name.",
      +      "title": "Repo",
      +      "type": "string"
      +    },
      +    "risk": {
      +      "description": "Overall risk level for the repository.",
      +      "enum": [
      +        "none",
      +        "low",
      +        "medium",
      +        "high",
      +        "very high"
      +      ],
      +      "title": "Risk",
      +      "type": "string"
      +    },
      +    "riskiest_files": {
      +      "description": "Files with the most comprehension debt, worst first.",
      +      "items": {
      +        "$ref": "#/$defs/RiskyFile"
      +      },
      +      "title": "Riskiest Files",
      +      "type": "array"
      +    },
      +    "total": {
      +      "$ref": "#/$defs/LineStats"
      +    }
      +  },
      +  "required": [
      +    "repo",
      +    "head",
      +    "risk",
      +    "total",
      +    "critical_paths",
      +    "riskiest_files"
      +  ],
      +  "title": "RepoStatus",
      +  "type": "object"
      +}
  2. First observedv0.3.0

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, non-destructive, closed-world, so the safety profile is covered. The description goes beyond that by disclosing the scoring rule — unread AI-written lines count in full, skimmed or fading (understood over 180 days) count as half — which materially affects how the agent should interpret 'risk' and 'debt_pct'. It stops short of stating any caveats about staleness or performance, so not a full 5.

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, then usage routing, then returns — a sensible order with no filler sentences. The field-by-field enumeration of the return object is somewhat redundant given an output schema exists, which keeps it from a 5.

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?

For a two-parameter read-only aggregate, the definition covers purpose, alternatives, scoring semantics, and the shape of the response. An agent has everything needed to decide to call it and to interpret the result without further probing.

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%, so both parameters are already documented. The description only echoes that `top` bounds the riskiest_files list and implies repo defaults to the server's working directory; it adds no new syntax or constraints beyond the schema. Baseline 3 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 ('Summarize comprehension debt for the whole repository') plus the exact dimensions it covers: AI-written share, understanding, and riskiest files. The repository-wide scope is explicit, which cleanly separates it from the per-file sibling.

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

Usage Guidelines5/5

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

Provides an explicit 'When to use' trigger (user asks how much code is AI-written, where risk is, or wants an overview) and names two alternatives with the conditions that select them: comprehension_risk for specific files about to change, ai_trend for change over time.

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