Skip to main content
Glama
Keesan12

MartinLoop — Stop Runaway Loops, Bad Code & Token Waste

martin_pr_summary

Read-onlyIdempotent

Turn a completed run dossier into a GitHub-ready pull-request title and Markdown body, including verification grade and score.

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. 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"
      +]
  2. 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 declare readOnlyHint=true, idempotentHint=true, and destructiveHint=false, and the description adds meaningful context by stating the tool 'only reads saved run evidence and does not modify the repository or contact GitHub.' This clarifies that despite producing GitHub-ready copy, it has no external side effects. 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.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is front-loaded with the core action and then efficiently covers usage timing, sibling alternatives, preconditions, and behavioral safety. Every sentence earns its place, and there is no redundant restating of the tool name or schema details.

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?

Given the strong annotations, full parameter schema coverage, and the presence of an output schema, the description is complete enough for correct tool selection and invocation. It explains when to use it, what it consumes, what it produces, how it differs from related tools, and that it is read-only with no GitHub interaction.

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, including the oneOf requirement among file, loopId, and latest, and the format enum. The description adds no parameter-specific semantics, which is acceptable because the structured schema carries the full burden.

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 opens with a specific verb and resource: 'Generate a GitHub-ready pull-request title and Markdown body from a completed MartinLoop run dossier.' It clearly states the deliverable, including verification grade and score, and distinguishes itself from PR-creating and PR-reviewing siblings without needing to infer from the name alone.

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 guidance ('Use after a governed run completes when you need PR copy without creating the PR') and names concrete alternatives with conditions: use martin_create_pr to open the PR, martin_review_pr for existing PR bodies, and martin_eval first if a merge-readiness grade is needed. This fully routes an agent to the right sibling.

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