martin_run
Executes a governed coding run after workflow admission, enforcing budget, scope, and verification to prevent runaway loops and bad code.
Instructions
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.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"objective": "<objective>"
},
"name": "martin_run"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| model | No | Optional model override passed to the primary provider. | |
| engine | No | Which agent CLI to use. Defaults to claude. | |
| maxUsd | No | Hard budget ceiling in USD. | |
| maxTokens | No | Maximum total tokens across all attempts. | |
| objective | Yes | The coding task to complete. Be specific about what needs to change. | |
| projectId | No | Project identifier for telemetry. | |
| deniedPaths | No | Repo-relative path globs Martin must never modify. | |
| workspaceId | No | Workspace identifier for telemetry. | |
| allowedPaths | No | Repo-relative path globs Martin may modify. | |
| maxIterations | No | Maximum number of loop attempts. | |
| fallbackEngines | No | Explicit ordered provider fallbacks authorized for this run. No provider is added implicitly. | |
| verifyTimeoutMs | No | Hard timeout for each verifier command in milliseconds. | |
| verificationPlan | No | Commands that must all exit 0 for the task to be considered complete. | |
| workingDirectory | No | Optional repo-root override resolved under the MCP workspace root. Must stay within that safe root. | |
| pricePerMTokenUsd | No | Explicit conservative per-million-token pricing authority for a catalog-unknown OpenAI-compatible model. | |
| providerExecutionTimeoutMs | No | Hard timeout for each provider coding process in milliseconds. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| budget | Yes | ||
| engine | Yes | ||
| loopId | Yes | ||
| reason | Yes | ||
| status | Yes | ||
| costUsd | Yes | ||
| attempts | Yes | ||
| pressure | Yes | ||
| inspection | Yes | ||
| shouldStop | Yes | ||
| lifecycleState | Yes | ||
| remainingTokens | No | ||
| workingDirectory | Yes | ||
| remainingBudgetUsd | Yes | ||
| verificationPassed | Yes | ||
| remainingIterations | Yes |