Martin Loop
v1.0.0One system around coding agents to run, verify, recover, and hand off software work.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
martin_run
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.
| Parameter | Type | Description |
|---|---|---|
objective * | string | The coding task to complete. Be specific about what needs to change. |
allowedPaths | array | Repo-relative path globs Martin may modify. |
deniedPaths | array | Repo-relative path globs Martin must never modify. |
engine | string | Which agent CLI to use. Defaults to claude. |
fallbackEngines | array | Deprecated engine-only form. Rejected with migration guidance; use fallbackProfiles. |
fallbackProfiles | array | Explicit ordered fallback providers with exact concrete model authority. No provider or model is added implicitly. |
maxIterations | integer | Maximum number of loop attempts. |
maxTokens | integer | Maximum total tokens across all attempts. |
maxUsd | number | Hard budget ceiling in USD. |
maxWallClockMs | integer | Hard elapsed time limit in milliseconds. |
model | string | Optional model override passed to the primary provider. |
pricePerMTokenUsd | number | Explicit conservative per-million-token pricing authority for a catalog-unknown OpenAI-compatible model. |
projectId | string | Project identifier for telemetry. |
providerExecutionTimeoutMs | integer | Hard timeout for each provider coding process in milliseconds. |
softTimeLimitMs | integer | Time to warn and stop starting attempts, in milliseconds. |
verificationPlan | array | Commands that must all exit 0 for the task to be considered complete. |
verifyTimeoutMs | integer | Hard timeout for each verifier command in milliseconds. |
workingDirectory | string | Optional repo-root override resolved under the MCP workspace root. Must stay within that safe root. |
workspaceId | string | Workspace identifier for telemetry. |
martin_inspect
Summarise Martin Loop run records from a saved loop file or run-store directory.
| Parameter | Type | Description |
|---|---|---|
file | string | Optional path under the Martin runs root to a loop-record.json file, a legacy .jsonl file, or a run-store directory. |
runsDir | string | Optional runs-root override resolved under the default Martin runs root. |
martin_status
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.
| Parameter | Type | Description |
|---|---|---|
file | string | Path under the Martin runs root to a loop-record.json file, a legacy .jsonl file, or a run-store directory. Mutually exclusive with loopJson, loopId, and latest. |
latest | When true, loads the most recently updated loop record. Mutually exclusive with loopJson, file, and loopId. | |
loopId | string | Loop ID resolved as <runsDir>/<loopId>/loop-record.json. Mutually exclusive with loopJson, file, and latest. |
loopJson | string | JSON-serialized LoopRecord. |
runsDir | string | Optional runs-root override resolved under the default Martin runs root. |
martin_doctor
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.
| Parameter | Type | Description |
|---|---|---|
engine | string | Optional engine to highlight in diagnostics. |
runsDir | string | Optional runs-root override resolved under the default Martin runs root. |
workingDirectory | string | Optional repo-root override for doctor context. |
martin_plan
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.
| Parameter | Type | Description |
|---|---|---|
objective * | string | The coding objective to plan. |
allowedPaths | array | |
context | string | Optional extra issue or bug context. |
deniedPaths | array | |
maxCommands | integer | |
maxFilesChanged | integer | |
maxIterations | integer | |
maxMinutes | integer | |
maxTokens | integer | |
maxUsd | number | |
maxWallClockMs | integer | Hard elapsed time limit in milliseconds. |
policyPack | string | |
softTimeLimitMs | integer | Time to warn and stop starting attempts, in milliseconds. |
verificationPlan | array | |
workingDirectory | string | Optional repo-root override resolved under the MCP workspace root. |
martin_preflight
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.
| Parameter | Type | Description |
|---|---|---|
objective * | string | The coding task to validate. |
allowedPaths | array | Repo-relative path globs Martin may modify. |
context | string | Optional issue context carried into the run contract. |
deniedPaths | array | Repo-relative path globs Martin must never modify. |
engine | string | Which agent CLI would be used. Defaults to claude. |
maxCommands | integer | Estimated maximum commands allowed for the run contract. |
maxFilesChanged | integer | Estimated maximum files changed for the run contract. |
maxIterations | integer | Maximum number of loop attempts. |
maxMinutes | integer | Estimated wall-clock minutes allowed for the run contract. |
maxTokens | integer | Maximum total tokens across all attempts. |
maxUsd | number | Hard budget ceiling in USD. |
maxWallClockMs | integer | Hard elapsed time limit in milliseconds. |
model | string | Model override passed to the CLI. |
policyPack | string | |
pricePerMTokenUsd | number | Explicit conservative per-million-token pricing authority for a catalog-unknown OpenAI-compatible model. |
projectId | string | |
softTimeLimitMs | integer | Time to warn and stop starting attempts, in milliseconds. |
verificationPlan | array | Commands that must all exit 0 for completion. |
workingDirectory | string | Optional repo-root override resolved under the MCP workspace root. |
workspaceId | string |
martin_logs
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.
| Parameter | Type | Description |
|---|---|---|
file | string | Absolute or relative path to a loop-record.json file or run directory. Mutually exclusive with loopId and latest. |
latest | When true, loads the most recently updated run in the run store. Mutually exclusive with file and loopId. | |
limit | integer | Maximum number of log entries to return, sorted by timestamp descending. Defaults to 20. |
loopId | string | MartinLoop run identifier from the run store. Mutually exclusive with file and latest. |
runsDir | string | Override the default run-store root directory. Optional; defaults to the MartinLoop runs directory. |
martin_pause
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.
| Parameter | Type | Description |
|---|---|---|
file | string | Path to one canonical run record or directory. Mutually exclusive with loopId and latest. |
latest | When true, targets the latest canonical run. Mutually exclusive with file and loopId. | |
loopId | string | Canonical MartinLoop run identifier. Mutually exclusive with file and latest. |
reason | string | Optional non-empty reason recorded in the pause receipt. |
runsDir | string | Optional run-store root override used to resolve loopId or latest. |
martin_cancel
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.
| Parameter | Type | Description |
|---|---|---|
file | string | Path to one canonical run record or directory. Mutually exclusive with loopId and latest. |
latest | When true, targets the latest canonical run. Mutually exclusive with file and loopId. | |
loopId | string | Canonical MartinLoop run identifier. Mutually exclusive with file and latest. |
reason | string | Optional non-empty reason recorded in the cancellation receipt. |
runsDir | string | Optional run-store root override used to resolve loopId or latest. |
martin_continue
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.
| Parameter | Type | Description |
|---|---|---|
file | string | |
latest | ||
loopId | string | |
reason | string | |
runsDir | string |
martin_list_runs
List recent Martin runs from the run store with lightweight filters for status, lifecycle, engine metadata, and recency.
| Parameter | Type | Description |
|---|---|---|
adapterId | string | Filter by attempt adapter ID. |
lifecycleState | string | Filter by lifecycle state. |
limit | integer | Maximum number of runs to return. Defaults to 20. |
model | string | Filter by attempt model. |
runsDir | string | Optional runs-root override. |
status | string | Filter by loop status. |
updatedAfter | string | Optional ISO-8601 timestamp for recency filtering. |
martin_triage_runs
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.
| Parameter | Type | Description |
|---|---|---|
adapterId | string | Filter by attempt adapter ID. |
includeHealthy | boolean | When true, include healthy runs instead of only attention-worthy findings. |
lifecycleState | string | Filter by lifecycle state. |
limit | integer | Maximum number of runs to triage. Defaults to 20. |
model | string | Filter by attempt model. |
runsDir | string | Optional runs-root override. |
status | string | Filter by loop status. |
updatedAfter | string | Optional ISO-8601 timestamp for recency filtering. |
martin_get_run
Load one Martin run and return its budget, cost, verification, artifact, and canonical path summary.
| Parameter | Type | Description |
|---|---|---|
file | string | Path to a canonical loop-record.json, legacy file, or run-store directory. |
latest | When true, loads the most recently updated loop record in the run store. | |
loopId | string | Loop ID under the run store. |
runsDir | string | Optional runs-root override. |
martin_get_attempt
Load one Martin attempt summary with artifact directory references for a canonical run.
| Parameter | Type | Description |
|---|---|---|
attemptIndex | integer | Attempt index to inspect. Defaults to the latest attempt. |
file | string | Path to a canonical loop-record.json file or run directory. |
loopId | string | Loop ID under the run store. |
runsDir | string | Optional runs-root override. |
martin_get_verification_results
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.
| Parameter | Type | Description |
|---|---|---|
file | string | Absolute or relative path to a loop-record.json file or run directory. Mutually exclusive with loopId. |
loopId | string | MartinLoop run identifier from the run store. Mutually exclusive with file. |
runsDir | string | Override the default run-store root directory. Optional. |
martin_run_dossier
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.
| Parameter | Type | Description |
|---|---|---|
file | string | Path to a canonical loop-record.json, legacy file, or run-store directory. Mutually exclusive with loopId and latest. |
latest | When true, loads the most recently updated loop record. Mutually exclusive with file and loopId. | |
loopId | string | Loop ID under the run store. Mutually exclusive with file and latest. |
runsDir | string | Optional run-store root override used to resolve loopId or latest. |
martin_dossier
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.
| Parameter | Type | Description |
|---|---|---|
file | string | Path to one run record or directory. Mutually exclusive with loopId and latest. |
format | string | Output format. Defaults to json. |
latest | When true, loads the latest run. Mutually exclusive with file and loopId. | |
loopId | string | MartinLoop run identifier. Mutually exclusive with file and latest. |
runsDir | string | Optional run-store root override used to resolve loopId or latest. |
martin_eval
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 inspe…
| Parameter | Type | Description |
|---|---|---|
file | string | Absolute or relative path to a loop-record.json file or run directory. Mutually exclusive with loopId and latest. |
latest | When true, evaluates the most recently updated run in the run store. Mutually exclusive with file and loopId. | |
loopId | string | MartinLoop run identifier from the run store. Mutually exclusive with file and latest. |
runsDir | string | Override the default run-store root directory. Optional. |
martin_pr_summary
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.
| Parameter | Type | Description |
|---|---|---|
file | string | Absolute or relative path to a loop-record.json file or run directory. Mutually exclusive with loopId and latest. |
format | string | Dossier rendering format. Defaults to github-pr for PR body generation. Use md for plain Markdown or json for structured output. |
latest | When true, generates the summary for the most recently updated run. Mutually exclusive with file and loopId. | |
loopId | string | MartinLoop run identifier from the run store. Mutually exclusive with file and latest. |
runsDir | string | Override the default run-store root directory. Optional. |
martin_create_pr
Create or preview a GitHub PR with a MartinLoop dossier body. Use execute=true to actually call gh.
| Parameter | Type | Description |
|---|---|---|
base | string | |
execute | boolean | |
file | string | |
format | string | |
latest | ||
loopId | string | |
runsDir | string | |
title | string |
martin_review_pr
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.
| Parameter | Type | Description |
|---|---|---|
file | string | Absolute or relative path to a loop-record.json file or run directory. Mutually exclusive with loopId and latest. |
format | string | Dossier format used when generating the reference body for comparison. Defaults to github-pr. |
latest | When true, reviews against the most recently updated run. Mutually exclusive with file and loopId. | |
loopId | string | MartinLoop run identifier from the run store. Mutually exclusive with file and latest. |
prBody | string | The PR body text to review. If omitted, the auto-generated dossier body is evaluated instead. |
runsDir | string | Override the default run-store root directory. Optional. |
martin_estimate
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.
| Parameter | Type | Description |
|---|---|---|
objective * | string | The coding task to estimate. |
budgetUsd | number | Budget ceiling for estimation. Defaults to 5. |
engine | string | Which agent CLI would be used. Defaults to claude. |
fileScope | array | Optional file paths to scope the estimate. |
workingDirectory | string | Optional workspace path for recording the estimate receipt against the same task root you plan to run. |
martin_arcade
Open the presentation-only MartinLoop Arcade when the host supports MCP Apps. The Arcade cannot change governed execution or evidence.
martin_arcade_status
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.
| Parameter | Type | Description |
|---|---|---|
loopId | string | Optional MartinLoop run identifier. Omit it to read the latest persisted run. |