Skip to main content
Glama

trw_review

Compute a code review verdict (pass/warn/block) and persist findings to review.yaml. Supports manual findings input, auto multi-reviewer analysis, and spec-vs-code reconciliation.

Instructions

Compute a structured code-review verdict and persist a review.yaml artifact.

Use when:

  • Gating a PR or delivery and you need a pass/warn/block verdict with receipts.

  • You have pre-collected findings from a reviewer subagent (auto mode).

  • You want to detect spec-vs-code drift between a PRD and git diff (reconcile).

Modes:

  • manual: caller passes findings=[...] directly (backward compatible).

  • auto: multi-reviewer analysis with confidence filtering.

  • cross_model: route diff to an external model family.

  • reconcile: compare PRD FRs against git diff.

Input:

  • findings: list[{category, severity, description}] — triggers manual mode.

  • run_path: explicit run directory; auto-detected when None.

  • mode: explicit mode override; auto-detected when None.

  • reviewer_findings: pre-collected findings from subagent layer (auto).

  • prd_ids: explicit PRD IDs; reconcile mode auto-discovers when None.

Output: dict with fields {verdict: "pass"|"warn"|"block", findings_count: int, categories: dict, review_path: str, run_id: str, mode: str}.

Example: trw_review(findings=[{"category":"security","severity":"high","description":"..."}]) → {"verdict": "block", "findings_count": 1, "review_path": ".../review.yaml", "mode": "manual"}

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modeNo
prd_idsNo
findingsNo
run_pathNo
reviewer_findingsNo
Behavior3/5

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

No annotations are provided, so the description carries full burden. It mentions persistence (writes review.yaml) and describes modes, but does not disclose side effects, authentication needs, or rate limits. It provides basic behavioral context but lacks depth.

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?

The description is well-structured with clear sections (summary, use when, modes, input, output, example) and front-loads the main action. It is somewhat lengthy but every section adds value. Could be slightly more concise.

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?

Despite no output schema, the description details output fields and covers parameter behavior and modes. It provides an example. For a tool with 5 parameters and multiple modes, it is fairly complete.

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 description coverage is 0%, but the description explains all parameters (findings, run_path, mode, reviewer_findings, prd_ids) with types and usage context. It compensates well for the lack of schema descriptions.

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 the tool computes a code-review verdict and persists a review.yaml artifact. It specifies modes and outputs, but does not explicitly differentiate from sibling tools like trw_prd_create or trw_prd_diff. However, the modes (manual, auto, cross_model, reconcile) provide implicit differentiation.

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 'Use when' section provides specific scenarios (gating PR, pre-collected findings, spec-vs-code drift) and lists four modes with contexts. It does not explicitly state when not to use, but the guidelines are clear and actionable.

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