Skip to main content
Glama
Keesan12

MartinLoop — Stop Runaway Loops, Bad Code & Token Waste

martin_run

Destructive

Execute a coding task under strict spend and iteration limits, requiring prior planning receipts, and return cost, artifacts, and verification status.

Instructions

Execute a governed Martin Loop run on a coding task and return the run summary, spend, artifact rollup, and verification state. This hard-blocks until martin_doctor, martin_estimate, martin_plan, and martin_preflight receipts exist for the same task.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modelNoOptional model override passed to the CLI.
engineNoWhich agent CLI to use. Defaults to claude.
maxUsdNoHard budget ceiling in USD.
maxTokensNoMaximum total tokens across all attempts.
objectiveYesThe coding task to complete. Be specific about what needs to change.
projectIdNoProject identifier for telemetry.
deniedPathsNoRepo-relative path globs Martin must never modify.
workspaceIdNoWorkspace identifier for telemetry.
allowedPathsNoRepo-relative path globs Martin may modify.
maxIterationsNoMaximum number of loop attempts.
verificationPlanNoCommands that must all exit 0 for the task to be considered complete.
workingDirectoryNoOptional repo-root override resolved under the MCP workspace root. Must stay within that safe root.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
budgetYes
engineYes
loopIdYes
reasonYes
statusYes
costUsdYes
attemptsYes
pressureYes
inspectionYes
shouldStopYes
lifecycleStateYes
remainingTokensYes
workingDirectoryYes
remainingBudgetUsdYes
verificationPassedYes
remainingIterationsYes
Behavior4/5

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

Annotations already mark destructiveHint: true. Description adds valuable behavioral context: it hard-blocks until certain receipts exist and returns run summary, spend, artifact rollup, and verification state. This goes beyond annotations by clarifying the blocking nature and return content.

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?

Two sentences front-load the main action and return values, then add a crucial prerequisite detail. Every word earns its place; no redundancy.

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?

Despite the tool's complexity (12 parameters, output schema exists), the description covers the main action, return values, and the important blocking prerequisite. It is fairly complete for an execution tool given the output schema explains return structure. Slight gap: could briefly explain 'governed Martin Loop' but not necessary for agent use.

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 coverage is 100%, so the schema already documents all 12 parameters. Description does not add any parameter-specific meaning beyond the schema, which is expected. Baseline score of 3 is appropriate.

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?

Description clearly states the tool executes a governed Martin Loop run on a coding task and specifies return values (run summary, spend, artifact rollup, verification state). It distinguishes from siblings by mentioning prerequisite tools (martin_doctor, martin_estimate, martin_plan, martin_preflight) that must exist, making it clear this is the execution step after planning.

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

Usage Guidelines4/5

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

Description implicitly provides usage context by stating it hard-blocks until prerequisite tool receipts exist, indicating it should be used after those tools. However, it does not explicitly say when to use, when not to use, or provide alternatives to other tools.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Keesan12/martin-loop'

If you have feedback or need assistance with the MCP directory API, please join our Discord server