Skip to main content
Glama
Keesan12

MartinLoop — Stop Runaway Loops, Bad Code & Token Waste

martin_get_run

Read-onlyIdempotent

Load a saved run and return its budget, cost, verification, artifact, and canonical path summary to audit AI-agent work and control overspend.

Instructions

Load one Martin run and return its budget, cost, verification, artifact, and canonical path summary.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fileNoPath to a canonical loop-record.json, legacy file, or run-store directory.
latestNoWhen true, loads the most recently updated loop record in the run store.
loopIdNoLoop ID under the run store.
runsDirNoOptional runs-root override.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
costYes
loopYes
budgetYes
sourceYes
warningsYes
artifactsYes
inspectionYes
sourceKindYes
verificationYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.5.6
    • changedOutput schema / properties / budget / required
      Previous value: -[
      -  "maxUsd",
      -  "softLimitUsd",
      -  "maxIterations",
      -  "maxTokens"
      -]New value: +[
      +  "maxUsd",
      +  "softLimitUsd",
      +  "maxIterations"
      +]
    • changedOutput schema / properties / loop / required
      Previous value: -[
      -  "loopId",
      -  "title",
      -  "objective",
      -  "status",
      -  "lifecycleState",
      -  "attempts",
      -  "costUsd",
      -  "avoidedUsd",
      -  "pressure",
      -  "shouldStop",
      -  "remainingBudgetUsd",
      -  "remainingIterations",
      -  "remainingTokens"
      -]New value: +[
      +  "loopId",
      +  "title",
      +  "objective",
      +  "status",
      +  "lifecycleState",
      +  "attempts",
      +  "costUsd",
      +  "avoidedUsd",
      +  "pressure",
      +  "shouldStop",
      +  "remainingBudgetUsd",
      +  "remainingIterations"
      +]
  2. Changed2 schema fields changedv0.5.5
    • removedOutput schema / properties / loop / properties / costProvenance
      Removed value: -{
      -  "enum": [
      -    "actual",
      -    "calculated",
      -    "estimated",
      -    "unavailable"
      -  ],
      -  "type": "string"
      -}
    • changedOutput schema / properties / loop / required
      Previous value: -[
      -  "loopId",
      -  "title",
      -  "objective",
      -  "status",
      -  "lifecycleState",
      -  "attempts",
      -  "costUsd",
      -  "costProvenance",
      -  "avoidedUsd",
      -  "pressure",
      -  "shouldStop",
      -  "remainingBudgetUsd",
      -  "remainingIterations",
      -  "remainingTokens"
      -]New value: +[
      +  "loopId",
      +  "title",
      +  "objective",
      +  "status",
      +  "lifecycleState",
      +  "attempts",
      +  "costUsd",
      +  "avoidedUsd",
      +  "pressure",
      +  "shouldStop",
      +  "remainingBudgetUsd",
      +  "remainingIterations",
      +  "remainingTokens"
      +]
  3. Changed4 schema fields changedv0.5.3
    • addedOutput schema / properties / cost / properties / provenance
      Added value: +{
      +  "enum": [
      +    "actual",
      +    "calculated",
      +    "estimated",
      +    "unavailable"
      +  ],
      +  "type": "string"
      +}
    • changedOutput schema / properties / cost / required
      Previous value: -[
      -  "actualUsd",
      -  "avoidedUsd",
      -  "tokensIn",
      -  "tokensOut"
      -]New value: +[
      +  "actualUsd",
      +  "avoidedUsd",
      +  "tokensIn",
      +  "tokensOut",
      +  "provenance"
      +]
    • addedOutput schema / properties / loop / properties / costProvenance
      Added value: +{
      +  "enum": [
      +    "actual",
      +    "calculated",
      +    "estimated",
      +    "unavailable"
      +  ],
      +  "type": "string"
      +}
    • changedOutput schema / properties / loop / required
      Previous value: -[
      -  "loopId",
      -  "title",
      -  "objective",
      -  "status",
      -  "lifecycleState",
      -  "attempts",
      -  "costUsd",
      -  "avoidedUsd",
      -  "pressure",
      -  "shouldStop",
      -  "remainingBudgetUsd",
      -  "remainingIterations",
      -  "remainingTokens"
      -]New value: +[
      +  "loopId",
      +  "title",
      +  "objective",
      +  "status",
      +  "lifecycleState",
      +  "attempts",
      +  "costUsd",
      +  "costProvenance",
      +  "avoidedUsd",
      +  "pressure",
      +  "shouldStop",
      +  "remainingBudgetUsd",
      +  "remainingIterations",
      +  "remainingTokens"
      +]
  4. First observedv0.3.9

TDQS

A3.6/5.0
Behavior3/5

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

Annotations already declare readOnlyHint and idempotentHint, so the safety profile is known. The description adds useful context about the returned summary content, but does not disclose operational details such as identifier resolution behavior, run-store defaulting, or any edge cases beyond what annotations and schema already convey.

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 one efficient sentence with no wasted words. It front-loads the core action ('Load one Martin run') and then lists the returned summary categories, making it easy to scan and undersstand.

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?

With a rich input schema, a covering output schema, and read-only/idempotent annotations, the description is largely complete for a single-run read tool. It lacks usage-routing context and does not explain how the identifier options relate, but those gaps are partly covered by the schema's oneOf structure and sibling names.

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 each parameter (file, latest, loopId, runsDir) is already documented. The description adds no additional parameter-level semantics beyond 'canonical path' alignment, and the oneOf-selection logic is left entirely to the schema.

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 ('Load'), a specific resource ('one Martin run'), and a concrete set of returned summary categories (budget, cost, verification, artifact, canonical path). This clearly distinguishes it from list-oriented tools like martin_list_runs and attempt-level tools like martin_get_attempt.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

There is no guidance about when to prefer this tool over siblings such as martin_get_attempt, martin_status, or martin_dossier. The description implies the general need to load a run but gives no exclusions, prerequisites, or alternative-selection advice.

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