Martin Loop

v1.0.0
io.github.Keesan12/martin-loop Checked 4 hours ago Published 4 days ago

One 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.

ParameterTypeDescription
objective *stringThe coding task to complete. Be specific about what needs to change.
allowedPathsarrayRepo-relative path globs Martin may modify.
deniedPathsarrayRepo-relative path globs Martin must never modify.
enginestringWhich agent CLI to use. Defaults to claude.
fallbackEnginesarrayDeprecated engine-only form. Rejected with migration guidance; use fallbackProfiles.
fallbackProfilesarrayExplicit ordered fallback providers with exact concrete model authority. No provider or model is added implicitly.
maxIterationsintegerMaximum number of loop attempts.
maxTokensintegerMaximum total tokens across all attempts.
maxUsdnumberHard budget ceiling in USD.
maxWallClockMsintegerHard elapsed time limit in milliseconds.
modelstringOptional model override passed to the primary provider.
pricePerMTokenUsdnumberExplicit conservative per-million-token pricing authority for a catalog-unknown OpenAI-compatible model.
projectIdstringProject identifier for telemetry.
providerExecutionTimeoutMsintegerHard timeout for each provider coding process in milliseconds.
softTimeLimitMsintegerTime to warn and stop starting attempts, in milliseconds.
verificationPlanarrayCommands that must all exit 0 for the task to be considered complete.
verifyTimeoutMsintegerHard timeout for each verifier command in milliseconds.
workingDirectorystringOptional repo-root override resolved under the MCP workspace root. Must stay within that safe root.
workspaceIdstringWorkspace identifier for telemetry.

martin_inspect

Summarise Martin Loop run records from a saved loop file or run-store directory.

ParameterTypeDescription
filestringOptional path under the Martin runs root to a loop-record.json file, a legacy .jsonl file, or a run-store directory.
runsDirstringOptional 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.

ParameterTypeDescription
filestringPath 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.
latestWhen true, loads the most recently updated loop record. Mutually exclusive with loopJson, file, and loopId.
loopIdstringLoop ID resolved as <runsDir>/<loopId>/loop-record.json. Mutually exclusive with loopJson, file, and latest.
loopJsonstringJSON-serialized LoopRecord.
runsDirstringOptional 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.

ParameterTypeDescription
enginestringOptional engine to highlight in diagnostics.
runsDirstringOptional runs-root override resolved under the default Martin runs root.
workingDirectorystringOptional 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.

ParameterTypeDescription
objective *stringThe coding objective to plan.
allowedPathsarray
contextstringOptional extra issue or bug context.
deniedPathsarray
maxCommandsinteger
maxFilesChangedinteger
maxIterationsinteger
maxMinutesinteger
maxTokensinteger
maxUsdnumber
maxWallClockMsintegerHard elapsed time limit in milliseconds.
policyPackstring
softTimeLimitMsintegerTime to warn and stop starting attempts, in milliseconds.
verificationPlanarray
workingDirectorystringOptional 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.

ParameterTypeDescription
objective *stringThe coding task to validate.
allowedPathsarrayRepo-relative path globs Martin may modify.
contextstringOptional issue context carried into the run contract.
deniedPathsarrayRepo-relative path globs Martin must never modify.
enginestringWhich agent CLI would be used. Defaults to claude.
maxCommandsintegerEstimated maximum commands allowed for the run contract.
maxFilesChangedintegerEstimated maximum files changed for the run contract.
maxIterationsintegerMaximum number of loop attempts.
maxMinutesintegerEstimated wall-clock minutes allowed for the run contract.
maxTokensintegerMaximum total tokens across all attempts.
maxUsdnumberHard budget ceiling in USD.
maxWallClockMsintegerHard elapsed time limit in milliseconds.
modelstringModel override passed to the CLI.
policyPackstring
pricePerMTokenUsdnumberExplicit conservative per-million-token pricing authority for a catalog-unknown OpenAI-compatible model.
projectIdstring
softTimeLimitMsintegerTime to warn and stop starting attempts, in milliseconds.
verificationPlanarrayCommands that must all exit 0 for completion.
workingDirectorystringOptional repo-root override resolved under the MCP workspace root.
workspaceIdstring

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.

ParameterTypeDescription
filestringAbsolute or relative path to a loop-record.json file or run directory. Mutually exclusive with loopId and latest.
latestWhen true, loads the most recently updated run in the run store. Mutually exclusive with file and loopId.
limitintegerMaximum number of log entries to return, sorted by timestamp descending. Defaults to 20.
loopIdstringMartinLoop run identifier from the run store. Mutually exclusive with file and latest.
runsDirstringOverride 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.

ParameterTypeDescription
filestringPath to one canonical run record or directory. Mutually exclusive with loopId and latest.
latestWhen true, targets the latest canonical run. Mutually exclusive with file and loopId.
loopIdstringCanonical MartinLoop run identifier. Mutually exclusive with file and latest.
reasonstringOptional non-empty reason recorded in the pause receipt.
runsDirstringOptional 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.

ParameterTypeDescription
filestringPath to one canonical run record or directory. Mutually exclusive with loopId and latest.
latestWhen true, targets the latest canonical run. Mutually exclusive with file and loopId.
loopIdstringCanonical MartinLoop run identifier. Mutually exclusive with file and latest.
reasonstringOptional non-empty reason recorded in the cancellation receipt.
runsDirstringOptional 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.

ParameterTypeDescription
filestring
latest
loopIdstring
reasonstring
runsDirstring

martin_list_runs

List recent Martin runs from the run store with lightweight filters for status, lifecycle, engine metadata, and recency.

ParameterTypeDescription
adapterIdstringFilter by attempt adapter ID.
lifecycleStatestringFilter by lifecycle state.
limitintegerMaximum number of runs to return. Defaults to 20.
modelstringFilter by attempt model.
runsDirstringOptional runs-root override.
statusstringFilter by loop status.
updatedAfterstringOptional 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.

ParameterTypeDescription
adapterIdstringFilter by attempt adapter ID.
includeHealthybooleanWhen true, include healthy runs instead of only attention-worthy findings.
lifecycleStatestringFilter by lifecycle state.
limitintegerMaximum number of runs to triage. Defaults to 20.
modelstringFilter by attempt model.
runsDirstringOptional runs-root override.
statusstringFilter by loop status.
updatedAfterstringOptional ISO-8601 timestamp for recency filtering.

martin_get_run

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

ParameterTypeDescription
filestringPath to a canonical loop-record.json, legacy file, or run-store directory.
latestWhen true, loads the most recently updated loop record in the run store.
loopIdstringLoop ID under the run store.
runsDirstringOptional runs-root override.

martin_get_attempt

Load one Martin attempt summary with artifact directory references for a canonical run.

ParameterTypeDescription
attemptIndexintegerAttempt index to inspect. Defaults to the latest attempt.
filestringPath to a canonical loop-record.json file or run directory.
loopIdstringLoop ID under the run store.
runsDirstringOptional 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.

ParameterTypeDescription
filestringAbsolute or relative path to a loop-record.json file or run directory. Mutually exclusive with loopId.
loopIdstringMartinLoop run identifier from the run store. Mutually exclusive with file.
runsDirstringOverride 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.

ParameterTypeDescription
filestringPath to a canonical loop-record.json, legacy file, or run-store directory. Mutually exclusive with loopId and latest.
latestWhen true, loads the most recently updated loop record. Mutually exclusive with file and loopId.
loopIdstringLoop ID under the run store. Mutually exclusive with file and latest.
runsDirstringOptional 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.

ParameterTypeDescription
filestringPath to one run record or directory. Mutually exclusive with loopId and latest.
formatstringOutput format. Defaults to json.
latestWhen true, loads the latest run. Mutually exclusive with file and loopId.
loopIdstringMartinLoop run identifier. Mutually exclusive with file and latest.
runsDirstringOptional 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…

ParameterTypeDescription
filestringAbsolute or relative path to a loop-record.json file or run directory. Mutually exclusive with loopId and latest.
latestWhen true, evaluates the most recently updated run in the run store. Mutually exclusive with file and loopId.
loopIdstringMartinLoop run identifier from the run store. Mutually exclusive with file and latest.
runsDirstringOverride 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.

ParameterTypeDescription
filestringAbsolute or relative path to a loop-record.json file or run directory. Mutually exclusive with loopId and latest.
formatstringDossier rendering format. Defaults to github-pr for PR body generation. Use md for plain Markdown or json for structured output.
latestWhen true, generates the summary for the most recently updated run. Mutually exclusive with file and loopId.
loopIdstringMartinLoop run identifier from the run store. Mutually exclusive with file and latest.
runsDirstringOverride 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.

ParameterTypeDescription
basestring
executeboolean
filestring
formatstring
latest
loopIdstring
runsDirstring
titlestring

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.

ParameterTypeDescription
filestringAbsolute or relative path to a loop-record.json file or run directory. Mutually exclusive with loopId and latest.
formatstringDossier format used when generating the reference body for comparison. Defaults to github-pr.
latestWhen true, reviews against the most recently updated run. Mutually exclusive with file and loopId.
loopIdstringMartinLoop run identifier from the run store. Mutually exclusive with file and latest.
prBodystringThe PR body text to review. If omitted, the auto-generated dossier body is evaluated instead.
runsDirstringOverride 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.

ParameterTypeDescription
objective *stringThe coding task to estimate.
budgetUsdnumberBudget ceiling for estimation. Defaults to 5.
enginestringWhich agent CLI would be used. Defaults to claude.
fileScopearrayOptional file paths to scope the estimate.
workingDirectorystringOptional 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.

ParameterTypeDescription
loopIdstringOptional MartinLoop run identifier. Omit it to read the latest persisted run.