Skip to main content
Glama

trw_codebase_risk_report

Generates a composite-risk report ranking files by structural risk to prioritize code review effort. Returns file-level ordering from persisted analysis.

Instructions

Return c737/c739 ranked composite-risk report for the current SHA.

Use when a reviewer needs file-level structural risk ordering from a persisted trw-distill sidecar before prioritizing review effort.

Tier-gated. top_n=0 returns all entries; default 20. Returns CodebaseRiskReportResult.model_dump() enriched by client tier. NEVER raises.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
top_nNo
cache_dirNo
repo_rootNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior4/5

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

With no annotations, the description bears full burden. It discloses tier-gating, top_n behavior (default 20, 0 returns all), return format (model_dump enriched by tier), and states 'NEVER raises'. It lacks details on prerequisites like sidecar existence or authentication, but provides substantial behavioral information.

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 with no wasted words. It front-loads the purpose, then usage, then details. Every sentence adds value.

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 tool with 3 parameters and an output schema (so return values are documented), the description covers purpose, usage, key parameter, and behavioral note. The only gap is the two undocumented parameters (cache_dir, repo_root). Overall very functional.

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

Parameters2/5

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

Schema coverage is 0%, so description must compensate. It explains top_n thoroughly (0 returns all, default 20) but does not explain cache_dir or repo_root at all. Only one of three parameters is given meaning beyond the schema.

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 clearly states it returns a 'c737/c739 ranked composite-risk report for the current SHA', providing a specific verb and resource. It distinguishes itself from sibling tools like trw_entity_risk_map by referencing specific report codes and the use case for review prioritization.

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?

The description explicitly says 'Use when a reviewer needs file-level structural risk ordering...before prioritizing review effort', giving clear context. It does not explicitly state when not to use or mention alternative tools, but the use case is specific enough.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/wallter/trw-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server