Skip to main content
Glama
Keesan12

MartinLoop — Stop Runaway Loops, Bad Code & Token Waste

martin_review_pr

Read-onlyIdempotent

Review a PR body against MartinLoop run evaluation evidence and return a verdict with specific findings to catch inaccuracies before merge.

Instructions

Review a PR body or draft against the MartinLoop run dossier and evaluation evidence, and return a verdict with specific findings. Use when you have an existing PR body and want to check whether it accurately represents the governed run evidence. Supply prBody to review a specific body string; omit it to evaluate the auto-generated dossier body. Do not use to generate a PR body from scratch — use martin_pr_summary instead. Do not use to open or create a PR — use martin_create_pr instead. This tool only reads saved run evidence and does not modify the repository or contact GitHub.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fileNoAbsolute or relative path to a loop-record.json file or run directory. Mutually exclusive with loopId and latest.
formatNoDossier format used when generating the reference body for comparison. Defaults to github-pr.
latestNoWhen true, reviews against the most recently updated run. Mutually exclusive with file and loopId.
loopIdNoMartinLoop run identifier from the run store. Mutually exclusive with file and latest.
prBodyNoThe PR body text to review. If omitted, the auto-generated dossier body is evaluated instead.
runsDirNoOverride the default run-store root directory. Optional.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
loopIdYesMartinLoop run identifier the review was performed against.
summaryYesPlain-English review summary.
verdictYesMerge verdict: approve_with_review means safe to merge with human review; needs_changes requires fixes; blocked means do not merge.
findingsYesSpecific findings that informed the verdict.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed9 schema fields changedv0.5.6
    • addedInput schema / properties / file / description
      Added value: +"Absolute or relative path to a loop-record.json file or run directory. Mutually exclusive with loopId and latest."
    • addedInput schema / properties / format / description
      Added value: +"Dossier format used when generating the reference body for comparison. Defaults to github-pr."
    • addedInput schema / properties / latest / description
      Added value: +"When true, reviews against the most recently updated run. Mutually exclusive with file and loopId."
    • addedInput schema / properties / loopId / description
      Added value: +"MartinLoop run identifier from the run store. Mutually exclusive with file and latest."
    • addedInput schema / properties / prBody / description
      Added value: +"The PR body text to review. If omitted, the auto-generated dossier body is evaluated instead."
    • addedInput schema / properties / runsDir / description
      Added value: +"Override the default run-store root directory. Optional."
    • changedOutput schema / additionalProperties
      Previous value: -trueNew value: +false
    • addedOutput schema / properties
      Added value: +{
      +  "findings": {
      +    "description": "Specific findings that informed the verdict.",
      +    "items": {
      +      "type": "string"
      +    },
      +    "type": "array"
      +  },
      +  "loopId": {
      +    "description": "MartinLoop run identifier the review was performed against.",
      +    "type": "string"
      +  },
      +  "summary": {
      +    "description": "Plain-English review summary.",
      +    "type": "string"
      +  },
      +  "verdict": {
      +    "description": "Merge verdict: approve_with_review means safe to merge with human review; needs_changes requires fixes; blocked means do not merge.",
      +    "enum": [
      +      "approve_with_review",
      +      "needs_changes",
      +      "blocked"
      +    ],
      +    "type": "string"
      +  }
      +}
    • addedOutput schema / required
      Added value: +[
      +  "loopId",
      +  "verdict",
      +  "findings",
      +  "summary"
      +]
  2. First observedv0.3.9

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and destructiveHint=false. The description adds genuinely useful context beyond those fields: the tool 'only reads saved run evidence and does not modify the repository or contact GitHub.' This is valuable because the name 'review_pr' could otherwise imply GitHub API interaction. No contradiction with 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?

Five sentences, each earning its place: purpose, when-to-use, invocation mode, two sibling exclusions, and safety. It is appropriately sized given the sibling ambiguity (martin_pr_summary, martin_create_pr) and includes all necessary routing information. The prBody sentence slightly overlaps with schema text, 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 6-parameter tool with full schema coverage and an output schema, the description covers everything an agent needs: what it does, when to use it, how to invoke both modes, which tools not to use instead, and the safety profile. Return-value details are handled by the output schema, so no gap remains.

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's guidance on prBody ('Supply prBody to review a specific body string; omit it to evaluate the auto-generated dossier body') largely restates the schema's own prBody description. It adds minimal meaning beyond the structured fields, but no compensation is needed given full schema coverage.

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 ('Review') with a clear resource ('PR body or draft against the MartinLoop run dossier and evaluation evidence') and a concrete outcome ('return a verdict with specific findings'). It further disambiguates from siblings by naming what it is not: not martin_pr_summary (generation) and not martin_create_pr (creating/opening PRs). An agent can select this tool confidently without opening the schema.

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?

Explicit when-to-use is stated ('when you have an existing PR body and want to check whether it accurately represents the governed run evidence') and two explicit exclusions name the exact alternatives. The description also covers the two invocation modes (supply prBody vs omit it), which is practical operational guidance an agent needs before calling.

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