Skip to main content
Glama
Keesan12

MartinLoop — Stop Runaway Loops, Bad Code & Token Waste

martin_preflight

Read-onlyIdempotent

Validate a coding task's budget, constraints, and verification plan before execution to prevent runaway loops and token waste.

Instructions

Read-only validation of a planned Martin run before any execution or spend. This is the last required step before martin_run.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modelNoModel override passed to the CLI.
engineNoWhich agent CLI would be used. Defaults to claude.
maxUsdNoHard budget ceiling in USD.
contextNoOptional issue context carried into the run contract.
maxTokensNoMaximum total tokens across all attempts.
objectiveYesThe coding task to validate.
projectIdNo
maxMinutesNoEstimated wall-clock minutes allowed for the run contract.
policyPackNo
deniedPathsNoRepo-relative path globs Martin must never modify.
maxCommandsNoEstimated maximum commands allowed for the run contract.
workspaceIdNo
allowedPathsNoRepo-relative path globs Martin may modify.
maxIterationsNoMaximum number of loop attempts.
maxFilesChangedNoEstimated maximum files changed for the run contract.
verificationPlanNoCommands that must all exit 0 for completion.
workingDirectoryNoOptional repo-root override resolved under the MCP workspace root.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
okYes
summaryYes
warningsYes
executionYes
readinessYes
normalizedYes
receiptScopeYes
Behavior4/5

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

Annotations already declare readOnlyHint=true and idempotentHint=true. The description reinforces this with 'Read-only validation' and adds the behavioral context of being a pre-flight check. It doesn't contradict annotations and adds value by confirming the no-execution guarantee.

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 concise sentences with zero wasted words. The critical purpose and usage context are front-loaded. Every word serves a clear purpose.

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?

Given the tool's complexity (17 params, output schema present), the description covers the essential purpose and sequential relationship. It doesn't explain return values, but the output schema handles that. Minor gaps: no mention of prerequisites (e.g., that a project/workspace must exist) but not critical for a validation tool.

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 description coverage is high (82%), so the schema already documents 17 parameters adequately. The description does not add any additional meaning beyond 'validation' of these parameters. Baseline 3 is appropriate when the schema carries the weight.

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?

The description uses specific verbs ('Read-only validation') and resource ('planned Martin run'), clearly distinguishing it from sibling tools like martin_run (execution) and martin_plan (planning). The phrase 'last required step before martin_run' explicitly positions it in the workflow.

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?

The description states when to use it ('before any execution or spend') and its priority ('last required step before martin_run'). It doesn't explicitly list when not to use or alternatives, but the context of siblings and the nature of validation imply usage boundaries.

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