Skip to main content
Glama

Run Zero-Write Polyglot AST Repository X-Ray

nomos_xray
Read-onlyIdempotent

Audit a local repository with zero-write polyglot AST analysis to measure AI Hangover Score, cyclomatic/cognitive debt, and top hotspot files for codebase health baselines.

Instructions

Run a zero-write polyglot static AST structural X-Ray across a local repository directory to measure AI Hangover Score, cyclomatic/cognitive debt, and top hotspot files. Use when auditing overall codebase health, complexity hotspots, or brownfield baseline posture. Do NOT use when computing only the diff-scoped blast radius of modified files (use nomos_verify_impact instead) or looking up a single gate definition (use nomos_capabilities instead).

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": "nomos_xray"
  }
}

Input Schema

NameRequiredDescriptionDefault
dirNoTarget repository root or subdirectory path (defaults to current working directory)..
topNoNumber of highest-debt hotspot files to return.

Output Schema

NameRequiredDescriptionDefault
gradeNoStructural health letter grade.
hangover_scoreNoComposite 0-100 structural debt score.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.5/5.0
Behavior4/5

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

The annotations already declare readOnlyHint, idempotentHint, destructiveHint=false, and openWorldHint=false, so safety is well covered. The description adds meaningful behavioral context beyond those annotations: it is zero-write, static AST based, polyglot, and operates on a local repository directory. It does not discuss repository size limits or language support, so it is strong but not exhaustive.

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 three sentences, front-loaded with the core action and scope. Each sentence earns its place by covering purpose, when to use, and when not to use with named alternatives.

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?

The tool is fully covered by annotations, two parameters with complete schema descriptions, and an output schema. The description supplies the remaining decision context: what the audit measures and when to choose or avoid this 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 description coverage is 100%, so the baseline is 3. The description implies that the tool targets a local repository directory and returns top hotspot files, which loosely corresponds to the dir and top parameters, but it does not add syntax, constraints, or meaning beyond what the schema already provides.

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 states a specific verb and resource: run a zero-write polyglot static AST structural X-Ray across a local repository. It also names the measured outputs, AI Hangover Score, cyclomatic/cognitive debt, and top hotspot files, making the tool's purpose distinct from sibling tools.

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?

The description gives explicit when-to-use conditions: auditing overall codebase health, complexity hotspots, or brownfield baseline posture. It also gives explicit exclusions and routes the agent to nomos_verify_impact for diff-scoped blast radius and nomos_capabilities for a single gate definition.

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