MartinLoop — Stop Runaway Loops, Bad Code & Token Waste
MartinLoop MCP lets you plan, preflight, execute, monitor, control, and audit governed AI coding runs, then evaluate evidence and prepare PRs.
Execute governed coding runs with budgets, token/iteration limits, verifier commands, path scopes, engine/model selection, and provider fallbacks.
Diagnose environment readiness, estimate cost, plan scope, and run read-only preflight checks before spending.
Inspect run status, logs, history, budget pressure, lifecycle state, attempts, artifacts, dossiers, and verifier evidence.
Triage saved runs that need attention and inspect failure context before retrying.
Pause, cancel, or continue active runs with durable control receipts.
Grade merge readiness, generate PR summaries/bodies, preview or create GitHub PRs, and review PR bodies against run evidence.
Use an optional Arcade evidence projection for presentation-only run views.
MartinLoop
Give coding agents more work. Watch them less. Ship more.
MartinLoop lets you give coding agents real software jobs without babysitting every step.
Your coding agent still writes the code. MartinLoop keeps the job focused, bounded, and accountable — with limits, stop conditions, verification, recovery, and a clear outcome when the run ends.
Trust your coding agents with real work.
Built from thousands of agent runs where the problem was not just intelligence — it was whether you could give the agent a real job and confidently walk away.
Measure your loop tax: npx -y martin-loop@latest audit
Get started: npx -y martin-loop@latest start
Try the demo: npx -y martin-loop@latest demo
MartinLoop is part of the NVIDIA Inception program.
Start Here
Audit first — run npx -y martin-loop@latest audit to see how much API-equivalent Claude Code spend went into fix-and-retry loops. Add --offline for zero network access or --share for a shareable summary.
Install / onboard — run npx -y martin-loop@latest start, or install it globally with npm install -g martin-loop@latest.
Governed run — define an objective, verifier, budget, and iteration cap with martin run.
Verifier — completion requires fresh verifier evidence bound to the active run and workspace. A configured verifier proves only the checks it runs; VERIFIED is not a claim that the code is bug-free or automatically safe to merge.
Budget — set a hard spend ceiling with --budget-usd and an attempt ceiling with --max-iterations.
Receipts — inspect the latest result with martin dossier --latest and validate stored integrity with martin runs verify --latest.
Hosted sync (optional) — governed work is local-first. Configure MARTIN_API_TOKEN and MARTIN_TELEMETRY_ENDPOINT, then use martin sync status and martin sync flush to send preserved evidence to a dashboard later. See the quickstart.
MCP — install @martinloop/mcp@latest in a supported host or generate host configuration with martin mcp print-config.
Documentation — continue with the quickstart, CLI reference, or MCP setup.
When --model is provided, MartinLoop passes it through unchanged. Without --model, the authenticated host runtime chooses its own default. MartinLoop does not inject a hidden fallback model.
Related MCP server: Playwright MCP
For AI Agents
MartinLoop is the system around the coding job.
The coding agent still writes the code. MartinLoop keeps the job, limits, verification, recovery, outcome, and history consistent around the work.
Use MartinLoop when a coding task needs:
clear job and success criteria
preflight readiness before agent spend
hard budget and iteration limits
allowed or denied edit scope
controlled retries and stop conditions
independent verifier commands
recovery and rollback evidence
a finite completion decision
run receipts, dossiers, history, failure classification, and post-run analysis
one consistent workflow across supported coding-agent runtimes
Canonical lifecycle:
DEFINE
-> PREFLIGHT
-> CONTROL
-> VERIFY
-> RECOVER
-> PROVE
-> ANALYZEThe product-level flow is Definition of Done -> Controlled Run -> Verified Handoff.
For machine-readable context start with llms.txt, llms-full.txt, and MartinLoop for AI Agents.
One System Around the Run
Teams should not need to stitch together a separate script or point tool for every part of coding-agent execution. MartinLoop connects the control path around the agent from preflight through post-run evidence.
Stage | MartinLoop role |
Define | Capture the objective, verifier, budget, scope, and finish line. |
Preflight | Check readiness and required workflow evidence before agent spend. |
Control | Enforce budgets, attempts, path boundaries, policy, and stop conditions while the coding agent works. |
Verify | Run configured checks and bind the evidence to the active run and workspace. |
Recover | Preserve recovery and rollback state when another attempt or human review is required. |
Prove | Produce the authoritative |
Analyze | Inspect run history, cost provenance, failure classes, dossiers, and shareable evidence after execution. |
MartinLoop does not replace Git, GitHub, CI, dedicated security scanners, observability platforms, code review, or the coding agent itself. It gives those workflows one governed execution record to inspect.
Change the worker. Keep the job.
MartinLoop is model-agnostic by design. The job, limits, verification, recovery, and outcome are separate from the worker underneath.
Native coding-agent CLIs and OpenAI-compatible model runtimes use different execution paths, so MartinLoop only describes a worker as fully supported when that execution path has been publicly released and validated.
Why MartinLoop
AI coding agents can create more software than ever. The problem is trusting them with bigger jobs without turning yourself into their full-time manager.
Agents drift. They retry. They break unrelated things. They say "done" too early. And a run that was supposed to save time can create even more work to review.
MartinLoop keeps the job accountable outside the agent itself: clear boundaries, hard limits, configured checks, recovery information, and an explicit outcome.
The goal is simple:
Give the agent more responsibility without giving it unlimited freedom.
Why Teams Adopt MartinLoop
Less babysitting — give agents larger jobs without watching every step.
Clear boundaries — keep scope, attempts, and spend inside the limits you set.
Checks before "done" — configured verification decides whether the evidence passed.
Understand failures — know why the run stopped instead of digging through logs.
Recover cleanly — preserve enough evidence to retry, repair, roll back, or hand off.
One workflow across agents — keep the job consistent as the worker underneath changes.
More software. Less supervision.
See Your Loop Tax
Before changing your workflow, measure it:
npx -y martin-loop@0.10.0 auditMartinLoop reads Claude Code session history locally and reports how much API-equivalent agent spend happened inside fix-and-retry loops, how often verifier commands failed, the longest retry chain, and sessions that ended red. Session contents stay local. Use --offline to disable even the public pricing lookup, and --share to create a screenshot-ready SVG plus Markdown summary.
Then put limits around the next run:
npx -y martin-loop@0.10.0 enable --engine codex
npx -y martin-loop@0.10.0 run "<task>" --verify "npm test" --budget-usd 2 --max-iterations 32-Minute Install Path
If MartinLoop detects more than one supported coding-agent runtime, save the one you want to use before the first governed run. For example:
npx -y martin-loop@latest enable --engine codexReplace codex with claude or gemini when that is your intended runtime.
npx -y martin-loop@latest start
npx -y martin-loop@latest demo
cd martin-loop-demo
npm install
npx -y martin-loop@latest run "Summarize the demo workspace and prove tests still pass" --verify "npm test" --budget-usd 2 --max-iterations 1Quick Start
Try MartinLoop in a disposable demo workspace:
npx -y martin-loop@latest enable --engine codex
npx -y martin-loop@latest start
npx -y martin-loop@latest demo
npx -y martin-loop@latest --version
cd martin-loop-demo
npm install
npx -y martin-loop@latest run "Summarize the demo workspace and prove tests still pass" --verify "npm test" --budget-usd 2 --max-iterations 1
npx -y martin-loop@latest dossier --latest
npx -y martin-loop@latest share --latestOptional global install:
npm install -g martin-loop
martin-loop --versionIf this flow is useful, open an issue with feedback so we can keep improving the public experience.
start prints the first-run guided path. run auto-checks doctor, session-start, and preflight, then executes when the environment is ready. Use --proof only when you intentionally want an explicit no-spend lane.
Inspect-first flow:
npx -y martin-loop@latest enable --engine codex
npx -y martin-loop@latest doctor
npx -y martin-loop@latest session-start
npx -y martin-loop@latest preflight "Summarize the demo workspace and prove tests still pass" --verify "npm test"share --latest writes three files into the selected run directory under share/: run-receipt.json, run-receipt.md, and proof-card.svg.
Release notes for MartinLoop 0.6.5: MartinLoop 0.6.5.
Release notes for MartinLoop 0.6.6: MartinLoop 0.6.6.
Release notes for MartinLoop 0.6.7: MartinLoop 0.6.7.
Release notes for MartinLoop 0.6.8: MartinLoop 0.6.8.
Release notes for MartinLoop 0.7.0: MartinLoop 0.7.0.
Release notes for MartinLoop 0.7.1: MartinLoop 0.7.1.
Release notes for MartinLoop 0.8.0: MartinLoop 0.8.0.
Release notes for MartinLoop 0.8.1: MartinLoop 0.8.1.
Release notes for MartinLoop 0.8.2: MartinLoop 0.8.2.
Release notes for MartinLoop 0.8.3: MartinLoop 0.8.3.
Release notes for MartinLoop 0.8.4: MartinLoop 0.8.4.
Release notes for MartinLoop 0.8.5: MartinLoop 0.8.5.
Release notes for MartinLoop 0.8.6: MartinLoop 0.8.6.
Release notes for MartinLoop 0.8.7: MartinLoop 0.8.7.
Release notes for MartinLoop 0.8.8: MartinLoop 0.8.8.
Release notes for MartinLoop 0.8.9: MartinLoop 0.8.9.
Release notes for MartinLoop 0.10.0: MartinLoop 0.10.0.
Swarm Mode Demo
Run the deterministic 15-agent launch-board demo without provider calls or spend:
npx -y martin-loop@0.10.0 demo --swarmThat default result is local simulation evidence only: it is non-governed, is not persisted to the Swarm run store, and does not evaluate signed receipt integrity. Inspect simulation output through the demo --swarm human view or demo --swarm --json, plus the local files created under --dir. Do not use swarm status, swarm inspect, swarm dossier, swarm verify, or swarm share for the default simulation output.
To exercise the persisted provider-free governance path, use:
npx -y martin-loop@0.10.0 demo --swarm --governed --agents 15 --max-concurrency 5 --budget-usd 0An approved live Codex qualification uses the same persisted route with --live, an explicit positive budget, and a clean repository baseline. Persisted modes use --cwd and --runs-dir; they reject the simulation-only --dir and --force flags. Live failures exit nonzero and never fall back to simulation.
Persisted demo runs and runs created by swarm plan plus swarm run are valid inputs to swarm status, swarm inspect, swarm dossier, swarm verify, and swarm share. A stored run is not automatically verified: rely on the verifier and receipt-integrity result, not the command route alone.
Model and Engine Support
MartinLoop governs the job independently of the coding worker.
Native agent CLIs: Codex, Claude Code, Gemini CLI
OpenAI-compatible endpoints: Kimi K2, NVIDIA Nemotron, DeepSeek, Qwen/Qwen Coder, Mistral/Codestral, OpenRouter/Together/Fireworks routes, Ollama, LM Studio, llama.cpp, and other compatible endpoints
Use
--engine openaifor OpenAI-compatible model endpoints.
The worker changes; MartinLoop's budget, scope, verifier, receipt, and integrity contract does not.
More detail: Model and engine support
The Run From Start to Handoff
MartinLoop's terminal presentation is built around the governed lifecycle, not around a single verifier command.
Governed Run Plan shows the configured finish line before work starts, including the task, budget posture, verifier plan, scope, and execution boundaries.
Controlled Run keeps the coding agent working inside those boundaries while MartinLoop tracks attempts, cost, stop conditions, and recovery state.
Verified Handoff closes the loop with one authoritative outcome:
VERIFIEDwhen the configured evidence supports the Definition of DoneSTOPPEDwhen a configured hard boundary ends the runNEEDS REVIEWwhen completion cannot be established from the available evidence
The handoff can include verifier steps, scope state, attempt count, cost provenance, unresolved evidence, recovery state, receipt integrity, and the next safe action. The exact fields depend on what the run actually established.
Visual Proof
MartinLoop turns an AI coding run into an inspectable execution record: budget used, verifier result, changed files, rollback evidence, and final receipt.
Ungoverned agents can retry until cost and scope drift. MartinLoop adds budget caps, verifier gates, and audit evidence so the run has a clear stop condition.
MartinLoop Arcade
Long governed runs do not have to mean staring at a spinner. In an interactive terminal, MartinLoop Arcade can be offered while the coding agent continues working in the background.
Arcade is presentation-only. It cannot change the agent, budget, verifier, policy decision, run outcome, or receipt evidence. It stays out of JSON, CI, non-interactive, and other machine-readable execution paths.
Use --arcade to offer Arcade immediately for a supported interactive run, or --no-arcade to suppress it for that run.
Proof Receipts
Proof receipts are local share bundles for governed AI coding runs. They show the task, spend, budget, verifier result, receipt integrity, and any evidence boundary that should not be rounded into confidence.
This real governed run spent $0.51 against a $3.00 budget. The verifier passed and the receipt integrity was signed, but the proof stayed at EVIDENCE_BOUNDARY because rollback evidence was not recorded.
Generate your own receipt after a governed run:
npx -y martin-loop@latest run "Summarize the demo workspace and prove tests still pass" --proof --verify "npm test"
npx -y martin-loop@latest runs verify --latest
npx -y martin-loop@latest share --latestExample receipt files: Markdown and JSON.
Verify the Public Release Yourself
Use this lane from a clean temp directory to verify the public CLI flow exactly as shipped:
npx -y martin-loop@0.10.0 enable --engine codex
npx -y martin-loop@0.10.0 --version
npx -y martin-loop@0.10.0 start
npx -y martin-loop@0.10.0 demo
cd martin-loop-demo
npm install
npx -y martin-loop@0.10.0 run "Summarize the demo workspace and prove tests still pass" --verify "npm test" --budget-usd 2 --max-iterations 1 --json
npx -y martin-loop@0.10.0 dossier --latest --json
npx -y martin-loop@0.10.0 share --latest --jsonFor deterministic installs, pin the package line (martin-loop@0.10.0) or use martin-loop@latest. Plain npx martin-loop can resolve a stale local cache on some machines.
Expected share bundle outputs:
share/run-receipt.jsonshare/run-receipt.mdshare/proof-card.svg
See It In Action
The point is not that every governed run is always cheaper. The point is that every run becomes inspectable and enforceable: budget policy, verifier result, stop reason, and evidence are explicit.
For a deterministic public repro lane, use the benchmark workspace and compare governed execution to unbounded retry behavior:
npx martin-loop bench --suite under-3-challengenpx martin-loop bench --suite ralphy-engineering-50
Ralph-Style Loops
A Ralph-style loop is the failure mode where an AI coding agent keeps trying without knowing when continuing is unsafe, uneconomical, or unlikely to succeed.
MartinLoop keeps the useful part of the loop, then adds brakes:
stop before budget overspend
classify unsafe or invalid actions before execution
write an audit record for every attempt
preserve rollback and verifier evidence for review
reduce runaway context growth with compact run summaries
Failure Taxonomy (13 Runtime Classes)
When a coding agent fails, "something went wrong" is not useful enough.
MartinLoop classifies runtime failures into 13 canonical classes so a failed run can tell you what happened, what needs attention, and what future runs can learn from.
See the canonical table: Failure Taxonomy (13 Runtime Classes).
What It Does
Budget caps stop the next attempt before a configured USD, token, or iteration limit is exceeded.
Verifier gates require a real check, such as
npm test, before a run can count as complete.Policy checks block unsafe verifier commands, risky path changes, and secret-like task inputs before execution.
Failure classification uses canonical runtime classes for triage and reporting. See Failure Taxonomy (13 Runtime Classes).
Run receipts capture stop reason, verifier evidence, budget posture, integrity state, and the next safe action.
martin share --latestturns the latest governed run into a local share bundle with a redacted JSON receipt, Markdown recap, and proof-card SVG.MCP integration gives hosts one write-capable execution entrypoint plus richer planning, inspection, and review helpers.
How It Works
Layer | Purpose |
Task contract | Objective, verifier plan, repo root, allowed paths, denied paths, acceptance criteria, workspace, project, and budget. |
Policy and budget | Defaults come from |
Agent adapters | Claude CLI, Codex CLI, Gemini CLI, and direct-provider adapters normalize execution results. |
Safety and verification | Scope checks, verifier command checks, prompt integrity, and grounding decide whether work can continue. |
Persistence | JSONL run records, evidence summaries, and repo-backed artifacts make every run inspectable later. Each loop record is locally signed (HMAC, per-runs-root key) and |
Trust Boundaries
Cost and token outputs always include provenance (
actual,calculated,estimated, orunavailable).For Codex specifically, MartinLoop reports authoritative usage only when the host exposes it; otherwise MartinLoop labels usage as estimated and avoids presenting it as settled accounting.
Receipt integrity must be
verifiedbefore a run is treated as trustworthy evidence for external review.
CLI
martin-loop doctor
martin-loop demo
martin-loop session-start [--host <claude|codex|gemini|generic>]
martin-loop phase status|contract|session-start|preflight|run [--execute]
martin-loop preflight <objective> [options]
martin-loop run <objective> [options]
martin-loop bench --suite <suiteId>
martin-loop triage
martin-loop dossier (--latest | --loop-id <id> | --file <path>)
martin-loop runs list|get|attempt|verify ...
martin-loop mcp print-config --host <codex|claude|gemini|cursor|vscode|generic>
martin-loop mcp install --host <codex|claude|gemini|cursor|vscode|generic>
martin-loop mcp verify-install --host <name> [--scope <user|project|local>]
martin-loop mcp rollback --host <name> [--scope <user|project|local>]
martin-loop mcp uninstall --host <name> [--scope <user|project|local>]
martin-loop challenge [--loop-id <id> | --file <path> | --latest]
martin-loop share (--loop-id <id> | --file <path> | --latest) [--out-dir <path>]
martin-loop badge [--format svg|json] [--runs-dir <path>]
Common options:
--budget <n> Hard cost cap in USD
--budget-usd <n> Alias for --budget
--soft-limit-usd <n> Soft budget threshold in USD
--verify <cmd> Verifier command after each attempt
--proof Run verifier-only evidence checks without claiming governed execution
--max-iterations <n> Maximum number of attempts
--max-tokens <n> Maximum token budget
--engine <name> Adapter to use: claude, codex, gemini, or openai
--cwd <path> Repo root for the run
--allow-path <glob> Restrict writes to this path pattern; repeatable
--deny-path <glob> Block this path pattern; repeatable
--runs-dir <path> Override the local Martin runs rootExamples below use npx martin-loop so they work without a global install. If you install martin-loop globally, the martin alias works too.
Use martin-loop share --latest after dossier when you want a redacted bundle you can hand to another person without sending raw run-store files.
More detail: CLI reference and configuration reference.
Benchmarks
MartinLoop ships a public deterministic benchmark workspace in benchmarks/ plus the installed-package bench command.
From an installed package:
npx martin-loop bench --suite under-3-challenge
npx martin-loop bench --suite ralphy-engineering-50From a clean public clone:
pnpm install --frozen-lockfile
pnpm bench:build
pnpm bench:eval
pnpm bench:report:ralphyEquivalent workspace-filter commands:
pnpm --filter @martin/benchmarks build
pnpm --filter @martin/benchmarks test
pnpm --filter @martin/benchmarks eval
pnpm --filter @martin/benchmarks report:ralphyThe installed-package command reads the shipped public fixtures. The repo-clone workflow runs the public benchmark workspace directly.
MCP
Run the standalone MCP package directly:
npx -y @martinloop/mcpAdd it to common hosts:
codex mcp add martin-loop -- npx -y @martinloop/mcp
claude mcp add --transport stdio --scope user martin-loop -- npx -y @martinloop/mcp
claude mcp add --transport stdio --scope user martin-loop -- cmd /c npx -y @martinloop/mcpGenerate host config from the root CLI:
npx martin-loop mcp print-config --host codex --transport stdio --profile minimal
npx martin-loop mcp print-config --host claude --transport stdio --profile diagnostic
npx martin-loop mcp print-config --host gemini --transport stdio --profile full-local
npx martin-loop mcp print-config --host generic --transport stdio --profile github-reviewThe root martin-loop package, standalone @martinloop/mcp package, plugin metadata, and MCPB product version are aligned at 0.10.0. The MCPB manifest schema remains 0.3.
The public MCP release train labels are:
0.1.4operator foundation0.2.0cockpit expansion0.2.5public MCP package line0.2.7usability and review release0.3.0host adoption and onboarding release0.3.1review and handoff release0.5.3execution-control and host-compatibility release0.5.5governed-autonomous execution and proof-surface release0.5.6hosted run sync, fail-closed rollback, and verified-completion hardening
The standalone MCP registry/server identifier is io.github.Keesan12/martin-loop.
More detail: MCP setup, MCP tool reference, and MCP compatibility.
SDK
npm install martin-loopimport { MartinLoop, createClaudeCliAdapter } from "martin-loop";
const loop = new MartinLoop({
adapter: createClaudeCliAdapter({ workingDirectory: process.cwd() }),
defaults: {
workspaceId: "my-workspace",
projectId: "my-project",
budget: {
maxUsd: 3,
softLimitUsd: 2.25,
maxIterations: 3,
maxTokens: 20_000,
},
},
});
const result = await loop.run({
task: {
title: "Fix auth regression",
objective: "Fix the failing auth regression tests",
verificationPlan: ["pnpm test"],
repoRoot: process.cwd(),
},
});
console.log(result.decision.status);The root SDK also exports createCodexCliAdapter, createGeminiCliAdapter, createDirectProviderAdapter, and createOpenAiCompatibleAdapter.
More detail: SDK reference and package map.
Examples
Development
Requirements:
Node.js 20+
pnpm 10.x
git clone https://github.com/Keesan12/martin-loop.git
cd martin-loop
pnpm install --frozen-lockfile
pnpm lint
pnpm test
pnpm build
pnpm public:copy-scan
pnpm public:git-surface
pnpm oss:validate
pnpm public:smoke
pnpm release:matrix:localStandalone MCP validation:
pnpm --filter @martinloop/mcp lint
pnpm --filter @martinloop/mcp test
pnpm --filter @martinloop/mcp build
pnpm --filter @martinloop/mcp smoke:pack
pnpm --filter @martinloop/mcp smoke:published:pack
pnpm --filter @martinloop/mcp verify:releaseContributing
Issues, bug reports, workflow feedback, and focused pull requests are welcome. Public-facing docs should stay concise, user-centered, and accurate.
git checkout -b feat/your-feature
pnpm lint
pnpm test
git commit -m "feat: describe what you built"
git push -u origin feat/your-featureTelemetry & Privacy
MartinLoop sends minimal anonymous usage data to help improve reliability and prioritize development. On a fresh interactive install, telemetry is enabled by default but remains blocked until the one-time disclosure is shown. After the disclosure, the same run may send the allowlisted anonymous events unless you opt out.
What is sent:
Random installation ID (generated locally, never linked to your identity)
Per-process session ID
CLI version, Node version, OS and architecture
Event name and timestamp
Command category, run duration, success/failure category
Whether a receipt was generated; whether recovery occurred
Opaque remote-experience ID/type after a click
What is never sent:
Source code, prompts, task text, repository contents, file names, file paths
Environment variables, secrets, provider/model output
Receipt contents, ledger contents, approval details, verifier evidence
Email addresses, workspace, project, or organization identifiers
Raw exception messages or stack traces
Endpoint: https://tupopqvqnyyjuxseyxkr.supabase.co/functions/v1/product-events
Headers sent: Content-Type: application/json, User-Agent: MartinLoop-CLI/<version>
No authorization header, API key, or direct table access.
Opt out anytime:
martin telemetry offInspect what is sent:
martin telemetry explainEnvironment variables that disable telemetry: MARTIN_TELEMETRY_DISABLED=1, DO_NOT_TRACK=1, CI=1
Set MARTIN_TELEMETRY_DEBUG=1 to print the telemetry envelope to stderr without transmitting it.
MartinLoop continues to work normally with telemetry disabled. No features are gated on telemetry consent.
License
Apache-2.0. See LICENSE.
Available Tools
24 toolsmartin_arcadeA
Open the presentation-only MartinLoop Arcade when the host supports MCP Apps. The Arcade cannot change governed execution or evidence.
Inputs: no named parameters.
martin_arcade_statusARead-onlyIdempotent
Read the read-only evidence projection used by the Arcade view. Provide loopId for one exact run or omit it to load the latest run. Use only for Arcade rendering; use martin_status for budget pressure or martin_run_dossier for full evidence. This tool reads persisted evidence and never changes run state.
Inputs: loopId. Returns: cost, budget, loopId, attempts, +6 more
martin_cancelADestructiveIdempotent
Publish the canonical durable cancellation signal for one active MartinLoop run. The active executor polls this signal, aborts its provider, restores governed workspace state, and records terminal evidence. Use the tool when work must stop; publication is not application proof, so use martin_status to observe terminal state or martin_pause for a reversible safe-boundary hold.
Inputs: file, latest, loopId, reason, +1 more. Returns: ok, state, action, loopId, +10 more
martin_continueBDestructive
Release the exact pending cooperative pause for one active MartinLoop run. Continue is bound to that pause and does not grant approval, widen safety policy, or resume a terminal approval escalation.
Inputs: file, latest, loopId, reason, +1 more. Returns: ok, state, action, loopId, +10 more
martin_create_prBDestructive
Create or preview a GitHub PR with a MartinLoop dossier body. Use execute=true to actually call gh.
Inputs: base, file, title, format, +4 more. Returns: url, body, grade, score, +5 more
martin_doctorARead-onlyIdempotent
Read-only environment, engine, workspace, and run-store diagnostics for MartinLoop. Use first for software work, fresh installs, suspicious state, or before retries. Do not use as proof that a task is complete. Next: call martin_estimate or martin_triage_runs depending on whether this is new work or failed prior work.
Inputs: engine, runsDir, workingDirectory. Returns: server, status, engines, summary, +5 more
martin_dossierARead-onlyIdempotent
Read a formatted evidence summary for one MartinLoop run. Provide exactly one selector: file, loopId, or latest; runsDir changes the run-store root. Set format to json, md, or github-pr; json is the default. Use after martin_run, before merge or release claims, or when sharing what happened. Do not use as a substitute for missing verifier evidence; use martin_run_dossier for the full structured record. Next: review verification results, retry, or hand off the receipt.
Inputs: file, format, latest, loopId, +1 more. Returns: cost, loop, budget, source, +8 more
martin_estimateARead-onlyIdempotent
Read-only cost, route, and pre-work burn estimate for a software objective. Use before planning/preflight when a change may spend agent time or exceed budget. Do not use for casual questions or as permission to execute. Next: call martin_plan if the estimate is acceptable, or ask for consent if budget/risk is high.
Inputs: objective (required), engine, budgetUsd, fileScope, +1 more. Returns: engine, reason, budgetUsd, objective, +8 more
martin_evalARead-onlyIdempotent
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.
Inputs: file, latest, loopId, runsDir. Returns: grade, score, checks, loopId, +4 more
martin_get_attemptBRead-onlyIdempotent
Load one Martin attempt summary with artifact directory references for a canonical run.
Inputs: file, loopId, runsDir, attemptIndex. Returns: loop, source, attempt, warnings, +1 more
martin_get_runBRead-onlyIdempotent
Load one Martin run and return its budget, cost, verification, artifact, and canonical path summary.
Inputs: file, latest, loopId, runsDir. Returns: cost, loop, budget, source, +5 more
martin_get_verification_resultsARead-onlyIdempotent
Load structured verification evidence for a MartinLoop run — verifier commands, pass/fail outcomes, and contradiction signals — from stored loop events and ledger entries. Use after a run completes to confirm whether automated verifiers passed before merging or promoting the result. Do not use to get a merge-readiness grade — use martin_eval for a scored grade with six check dimensions. Do not use for live run status — use martin_get_status instead. This tool only reads persisted run files and does not execute commands, modify state, or contact GitHub.
Inputs: file, loopId, runsDir. Returns: loop, source, warnings, sourceKind, +1 more
martin_inspectBRead-onlyIdempotent
Summarise Martin Loop run records from a saved loop file or run-store directory.
Inputs: file, runsDir. Returns: source, warnings, latestRun, loopCount, +5 more
martin_list_runsARead-onlyIdempotent
List recent Martin runs from the run store with lightweight filters for status, lifecycle, engine metadata, and recency.
Inputs: limit, model, status, runsDir, +3 more. Returns: source, filters, runsRoot, warnings, +5 more
martin_logsARead-onlyIdempotent
Read recent MartinLoop events, ledger entries, operator control receipts, and reconciled executor control-application records for a single run. Use to observe live or completed run activity, diagnose stuck or failed runs, or audit operator actions. Do not use to check run completion status — use martin_get_status instead. Do not use to retrieve verification evidence — use martin_get_verification_results instead. This tool only reads persisted run files and does not execute commands, modify state, or contact GitHub.
Inputs: file, limit, latest, loopId, +1 more. Returns: live, loopId, source, entries, +2 more
martin_pauseADestructive
Request a durable cooperative pause for one active MartinLoop run. The executor applies it at the next safe attempt boundary; it does not suspend or kill an in-flight provider. Provide exactly one selector: file, loopId, or latest. Use martin_status to distinguish requested from applied state; use martin_cancel to abandon work or martin_continue to release the applied pause.
Inputs: file, latest, loopId, reason, +1 more. Returns: ok, state, action, loopId, +10 more
martin_planARead-onlyIdempotent
Read-only planning step that turns an objective into bounded scope, verifier proposal, policy pack, and risk recommendation. Use for authorized software changes before preflight/run. Do not use to mutate files or replace the verifier. Next: call martin_preflight with the chosen scope, budget, and verifier.
Inputs: objective (required), maxUsd, context, maxTokens, +9 more. Returns: object
martin_preflightARead-onlyIdempotent
Read-only validation of the exact run contract before execution or spend. Use after planning and before martin_run to check engine, verifier, path scope, and budget. Do not use as execution or completion proof. Next: call martin_run if allowed, otherwise resolve the reported blocker.
Inputs: objective (required), model, engine, maxUsd, +14 more. Returns: ok, summary, warnings, execution, +3 more
martin_pr_summaryARead-onlyIdempotent
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.
Inputs: file, format, latest, loopId, +1 more. Returns: body, grade, score, title, +1 more
martin_review_prARead-onlyIdempotent
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.
Inputs: file, format, latest, loopId, +2 more. Returns: loopId, summary, verdict, findings
martin_runADestructive
Execute a governed MartinLoop coding run after MCP workflow admission is satisfied. Use when the user has authorized implementation, bug fixing, tests, or refactoring and doctor/estimate/plan/preflight receipts match this task. Do not use for question-only diagnosis or when policy, budget, credentials, or scope still need consent. Next: read martin_dossier and verifier evidence.
Inputs: objective (required), model, engine, maxUsd, +12 more. Returns: budget, engine, loopId, reason, +12 more
martin_run_dossierARead-onlyIdempotent
Read the full structured execution dossier for one MartinLoop run, including attempts, events, artifacts, verification, integrity, cost, and related discovery surfaces. Provide exactly one selector: file, loopId, or latest; runsDir changes the run-store root. Use for comprehensive evidence review. Do not use for a compact state check; use martin_get_run, or use martin_dossier when formatted sharing output is required.
Inputs: file, latest, loopId, runsDir. Returns: cost, loop, budget, source, +8 more
martin_statusARead-onlyIdempotent
Read the current budget, cost, remaining limits, and stop pressure for one MartinLoop run. Provide exactly one selector: loopJson for an inline record, file for a saved record, loopId for a run-store ID, or latest for the newest run; runsDir only changes the run-store root. Use for a compact budget check. Do not use for full events or artifacts; use martin_get_run or martin_run_dossier instead.
Inputs: file, latest, loopId, runsDir, +1 more. Returns: live, budget, loopId, source, +11 more
martin_triage_runsARead-onlyIdempotent
Read-only prioritization of saved Martin runs that need attention. Use when the user says a prior attempt failed, asks what to fix next, or resumes an interrupted session. Do not use for a brand-new objective with no relevant run history. Next: inspect the selected run or dossier before retrying.
Inputs: limit, model, status, runsDir, +4 more. Returns: source, filters, findings, runsRoot, +4 more
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 24 tools
Descriptions do unusually heavy lifting, explicitly naming sibling tools and stating 'do not use X — use Y' exclusions, which helps a lot. However there are seven overlapping read surfaces on the same run data (martin_get_run, martin_inspect, martin_dossier, martin_run_dossier, martin_status, martin_get_attempt, martin_arcade_status), and the agent must learn a fine-grained verbosity ladder to pick correctly. Overlap is real but documented, landing mid-range.
Everything is uniformly snake_case with a consistent martin_ prefix, so the set reads as one coherent family. Minor deviation: many tools are noun-only (martin_status, martin_logs, martin_eval, martin_dossier) while others follow verb_noun (martin_get_run, martin_create_pr, martin_triage_runs), and martin_arcade_status mixes a noun with a status suffix.
24 tools sits at the heavy end for what is essentially a single-workflow coding-run system, and several of them (martin_arcade, martin_arcade_status) exist only for a presentation layer rather than core governance. The lifecycle tools each earn their place, but the read/diagnostic surface has clearly been allowed to sprawl.
The governance lifecycle is well covered: doctor, estimate, plan, preflight, run, pause/cancel/continue, status/logs/dossier, eval, and PR generation/creation/review, plus listing and triage. Gaps are modest — no explicit retry/resume tool despite triage advising retries, and no run cleanup/archive or config-mutation surface.
Maintenance
Related MCP Connectors
Token guard and rate limiter preventing runaway API cost spikes for OpenAI and Anthropic.
Deterministic runtime safety for AI agents: scan PII, gate tool actions, verify LLM output.
Budget & cost control for AI agents — per-agent spend caps + rate limits before each call.
AI code governance and code review for Claude Code, Copilot and Cursor. Checks rules and security.
Related MCP Servers
- AlicenseAqualityBmaintenanceThis server enables LLMs to retrieve and process content from web pages, converting HTML to markdown for easier consumption.21244,685 PyPI92,139MIT
- AlicenseAqualityNot gradedmaintenanceEnables browser automation through Playwright using accessibility tree snapshots instead of screenshots. Supports web scraping, form interactions, testing, and connecting to existing browser sessions with logged-in accounts.238,303 npm5-
- AlicenseAqualityDmaintenancePython MCP server for GitHub operations, providing native tool integration with Claude Code and other MCP clients. It enables managing issues, pull requests, CI status, milestones, and batch operations via natural language.15MIT
- AlicenseNot gradedqualityAmaintenanceEnables AI agents to access and search up-to-date Solana documentation, get canonical spec references, and fix Anchor/Pinocchio Solana programs via MCP tools.86ISC