Skip to main content
Glama
Keesan12

MartinLoop — Stop Runaway Loops, Bad Code & Token Waste

martin_eval

Read-onlyIdempotent

Grade a MartinLoop run across six quality dimensions and return a scored merge-readiness verdict. Use after a governed run to decide if the result is safe to merge or promote.

Instructions

Grade a MartinLoop run across six dimensions — task completion, verifier health, diff discipline, regression risk, security risk, and reviewability — and return a scored merge-readiness verdict. Use after a governed run completes to decide whether the result is safe to merge or promote. Use before martin_pr_summary or martin_create_pr to confirm the run is merge-ready. Do not use to retrieve raw verification command output — use martin_get_verification_results for that. Do not use to review an existing PR body — use martin_review_pr instead. This tool reads saved run evidence and inspects local git signals; it does not modify state 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.
latestNoWhen true, evaluates the most recently updated run in the run store. 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
gradeYesOverall merge readiness grade derived from the six check dimensions.
scoreYesNumeric evaluation score from 0–100.
checksYes
loopIdYesUnique MartinLoop run identifier.
sourceYesResolved path to the loop-record source file.
summaryYesOne-paragraph plain-English evaluation summary.
warningsYesNon-blocking advisory warnings from the evaluation.
sourceKindYesHow the run was identified.

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. Changed7 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 / latest / description
      Added value: +"When true, evaluates the most recently updated run in the run store. 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: +{
      +  "checks": {
      +    "additionalProperties": false,
      +    "properties": {
      +      "diffDiscipline": {
      +        "description": "Whether file-scope discipline was maintained.",
      +        "enum": [
      +          "passed",
      +          "warning",
      +          "failed"
      +        ],
      +        "type": "string"
      +      },
      +      "regressionRisk": {
      +        "description": "Whether regression risk signals were detected.",
      +        "enum": [
      +          "passed",
      +          "warning",
      +          "failed"
      +        ],
      +        "type": "string"
      +      },
      +      "reviewability": {
      +        "description": "Whether the PR body and dossier are reviewer-ready.",
      +        "enum": [
      +          "passed",
      +          "warning",
      +          "failed"
      +        ],
      +        "type": "string"
      +      },
      +      "securityRisk": {
      +        "description": "Whether security risk signals were detected.",
      +        "enum": [
      +          "passed",
      +          "warning",
      +          "failed"
      +        ],
      +        "type": "string"
      +      },
      +      "taskCompletion": {
      +        "description": "Whether the run reached a completed status.",
      +        "enum": [
      +          "passed",
      +          "warning",
      +          "failed"
      +        ],
      +        "type": "string"
      +      },
      +      "verifier": {
      +        "description": "Whether automated verifiers passed.",
      +        "enum": [
      +          "passed",
      +          "warning",
      +          "failed"
      +        ],
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "taskCompletion",
      +      "verifier",
      +      "diffDiscipline",
      +      "regressionRisk",
      +      "securityRisk",
      +      "reviewability"
      +    ],
      +    "type": "object"
      +  },
      +  "grade": {
      +    "description": "Overall merge readiness grade derived from the six check dimensions.",
      +    "enum": [
      +      "mergeable",
      +      "mergeable_with_review",
      +      "needs_review",
      +      "blocked",
      +      "insufficient_evidence"
      +    ],
      +    "type": "string"
      +  },
      +  "loopId": {
      +    "description": "Unique MartinLoop run identifier.",
      +    "type": "string"
      +  },
      +  "score": {
      +    "description": "Numeric evaluation score from 0–100.",
      +    "type": "number"
      +  },
      +  "source": {
      +    "description": "Resolved path to the loop-record source file.",
      +    "type": "string"
      +  },
      +  "sourceKind": {
      +    "description": "How the run was identified.",
      +    "enum": [
      +      "file",
      +      "loop_id",
      +      "latest",
      +      "runs_root"
      +    ],
      +    "type": "string"
      +  },
      +  "summary": {
      +    "description": "One-paragraph plain-English evaluation summary.",
      +    "type": "string"
      +  },
      +  "warnings": {
      +    "description": "Non-blocking advisory warnings from the evaluation.",
      +    "items": {
      +      "type": "string"
      +    },
      +    "type": "array"
      +  }
      +}
    • addedOutput schema / required
      Added value: +[
      +  "source",
      +  "sourceKind",
      +  "loopId",
      +  "score",
      +  "grade",
      +  "checks",
      +  "warnings",
      +  "summary"
      +]
  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 declare readOnlyHint=true and destructiveHint=false, and the description reinforces this by stating it 'reads saved run evidence and inspects local git signals' and 'does not modify state or contact GitHub.' It adds valuable context beyond the annotations by revealing that the tool operates on local signals only and does not reach out to GitHub, which is not inferable from structured fields alone.

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 dense but well-structured, front-loading the core purpose before usage guidance and exclusions. Every sentence earns its place: purpose, when to use, workflow placement, what not to use it for, and behavioral guarantees. It avoids fluff and provides substantial decision-relevant information in a compact form.

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 that the tool has an output schema and strong annotations, the description covers the remaining context an agent needs: the domain of operation (MartinLoop run grading), the six dimensions, merge-readiness interpretation, workflow ordering, alternatives, and side-effect guarantees. The optional parameter selection is already documented in the schema, and the output schema covers return-value expectations, so no critical context is missing.

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 parameters already have clear descriptions in the schema, including mutual exclusivity between file, latest, and loopId. The description itself does not add much parameter-level detail beyond saying it grades a run, but with complete schema coverage this is acceptable and does not require compensation.

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: 'Grade a MartinLoop run across six dimensions' and clearly states the output is 'a scored merge-readiness verdict.' It distinguishes the tool from siblings by explicitly listing what it is not for, such as retrieving raw verification output and reviewing PR bodies, so an agent can tell it apart without opening schemas.

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 timing guidance ('Use after a governed run completes'), workflow placement ('Use before martin_pr_summary or martin_create_pr'), and two explicit negative use cases with named alternatives (martin_get_verification_results and martin_review_pr). This leaves little ambiguity about when to invoke this tool versus its siblings.

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