Skip to main content
Glama
Keesan12

MartinLoop — Stop Runaway Loops, Bad Code & Token Waste

martin_pr_summary

Read-onlyIdempotent

Generate a GitHub-ready pull-request title and Markdown body from a completed MartinLoop run, including verification grade and score. Uses saved run evidence without modifying the repository or contacting GitHub.

Instructions

Generate a GitHub-ready pull-request title and Markdown body from a completed MartinLoop run dossier, including its verification grade and score. Use after a governed run completes when you need PR copy without creating the PR. Use martin_create_pr instead to actually open the PR on GitHub. Use martin_review_pr to evaluate an existing PR body against run evidence. Use martin_eval first if you need a merge-readiness grade before generating the PR body. 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 rendering format. Defaults to github-pr for PR body generation. Use md for plain Markdown or json for structured output.
latestNoWhen true, generates the summary for the most recently updated run. Mutually exclusive with file and loopId.
loopIdNoMartinLoop run identifier from the run store. Mutually exclusive with file and latest.
runsDirNoOverride the default run-store root directory. Optional.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
bodyYesGitHub-flavoured Markdown PR body containing the run dossier.
gradeYesVerification grade assigned to the run.
scoreYesNumeric verification score from 0–100.
titleYesSuggested GitHub pull-request title.
loopIdYesMartinLoop run identifier used to generate the summary.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.6.6
    • removedInput schema / oneOf
      Removed value: -[
      -  {
      -    "required": [
      -      "file"
      -    ]
      -  },
      -  {
      -    "required": [
      -      "loopId"
      -    ]
      -  },
      -  {
      -    "required": [
      -      "latest"
      -    ]
      -  }
      -]
  2. Changed8 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 rendering format. Defaults to github-pr for PR body generation. Use md for plain Markdown or json for structured output."
    • addedInput schema / properties / latest / description
      Added value: +"When true, generates the summary for 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 / 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: +{
      +  "body": {
      +    "description": "GitHub-flavoured Markdown PR body containing the run dossier.",
      +    "type": "string"
      +  },
      +  "grade": {
      +    "description": "Verification grade assigned to the run.",
      +    "enum": [
      +      "mergeable",
      +      "mergeable_with_review",
      +      "needs_review",
      +      "blocked",
      +      "insufficient_evidence"
      +    ],
      +    "type": "string"
      +  },
      +  "loopId": {
      +    "description": "MartinLoop run identifier used to generate the summary.",
      +    "type": "string"
      +  },
      +  "score": {
      +    "description": "Numeric verification score from 0–100.",
      +    "type": "number"
      +  },
      +  "title": {
      +    "description": "Suggested GitHub pull-request title.",
      +    "type": "string"
      +  }
      +}
    • addedOutput schema / required
      Added value: +[
      +  "loopId",
      +  "title",
      +  "body",
      +  "grade",
      +  "score"
      +]
  3. First observedv0.3.9

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already carry readOnlyHint, idempotentHint, and destructiveHint, and the description adds useful concrete context: it only reads saved run evidence, does not modify the repository, and does not contact GitHub. This goes beyond the annotations by explicitly ruling out network side effects and repo mutations.

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 main purpose is front-loaded, the alternative routing is compressed into clear usage guidance, and the no-side-effect statement earns its place. Every sentence contributes to selection, invocation, or safety clarification.

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?

With an output schema present and strong annotations, the description covers when to use it, what it consumes, what it produces, and what it does not do. An agent has enough information to invoke it correctly without guessing.

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 schema already documents all five parameters, their mutual exclusivity, and format defaults. The description does not add parameter-level detail, but it does not need to since the schema covers it.

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?

Opens with a specific verb ('Generate') and names the concrete artifacts: a GitHub-ready PR title and Markdown body from a completed MartinLoop run dossier. It also distinguishes itself from martin_create_pr, martin_review_pr, and martin_eval, so an agent can tell which sibling to pick.

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?

Explicitly states when to use the tool: after a governed run completes when PR copy is needed without creating the PR. It also names the alternatives for actually opening the PR, reviewing an existing PR, and obtaining a merge-readiness grade first.

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