Skip to main content
Glama
MartinLoop — Stop Runaway Loops, Bad Code & Token Waste

MartinLoop — Stop Runaway Loops, Bad Code & Token Waste

martin_pause

Destructive

Request a durable cooperative pause for one active MartinLoop run by file, loopId, or latest; it applies at the next safe attempt boundary without killing in-flight provider work.

Instructions

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.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "martin_pause"
  }
}

Input Schema

NameRequiredDescriptionDefault
fileNoPath to one canonical run record or directory. Mutually exclusive with loopId and latest.
latestNoWhen true, targets the latest canonical run. Mutually exclusive with file and loopId.
loopIdNoCanonical MartinLoop run identifier. Mutually exclusive with file and latest.
reasonNoOptional non-empty reason recorded in the pause receipt.
runsDirNoOptional run-store root override used to resolve loopId or latest.

Output Schema

NameRequiredDescriptionDefault
okYesWhether the control receipt was recorded.
stateYes
actionYesThe control action that was recorded.
loopIdYesMartinLoop run identifier the control was applied to.
reasonNoHuman-readable reason for the control, if provided.
summaryYesHuman-readable result of the control request.
controlIdYesUnique receipt ID for this control action.
principalYes
receiptHashYes
requestedAtYesISO 8601 timestamp when the control was recorded.
requestedActionYesThe control action that was requested.
applicationStateYesWhether the active executor has applied the control; publication alone is not application proof.
publicationStateYesWhether an authoritative cancellation signal was published or a cooperative receipt was recorded.
authorityBoundaryYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed12 schema fields changedv0.9.0
    • removedInput schema / properties / requestedBy
      Removed value: -{
      -  "description": "Optional human or runtime identity label recorded for audit context.",
      -  "type": "string"
      -}
    • addedOutput schema / properties / applicationState
      Added value: +{
      +  "description": "Whether the active executor has applied the control; publication alone is not application proof.",
      +  "enum": [
      +    "pending_observation",
      +    "requested_only",
      +    "terminal_reconciled"
      +  ],
      +  "type": "string"
      +}
    • addedOutput schema / properties / authorityBoundary
      Added value: +{
      +  "const": "local_os_user"
      +}
    • addedOutput schema / properties / principal
      Added value: +{
      +  "const": "local_mcp_client"
      +}
    • addedOutput schema / properties / publicationState
      Added value: +{
      +  "description": "Whether an authoritative cancellation signal was published or a cooperative receipt was recorded.",
      +  "enum": [
      +    "published",
      +    "already_requested",
      +    "receipt_recorded",
      +    "published_audit_pending"
      +  ],
      +  "type": "string"
      +}
    • addedOutput schema / properties / receiptHash
      Added value: +{
      +  "pattern": "^[a-f0-9]{64}$",
      +  "type": "string"
      +}
    • removedOutput schema / properties / requestedBy
      Removed value: -{
      -  "description": "Identity that requested the control, if provided.",
      -  "type": "string"
      -}
    • changedOutput schema / properties / state / additionalProperties
      Previous value: -trueNew value: +false
    • removedOutput schema / properties / state / description
      Removed value: -"Run control state after this request, including all recorded receipts."
    • addedOutput schema / properties / state / properties
      Added value: +{
      +  "applicationPath": {
      +    "type": "string"
      +  },
      +  "applications": {
      +    "items": {
      +      "additionalProperties": false,
      +      "properties": {
      +        "action": {
      +          "enum": [
      +            "pause_applied",
      +            "continue_applied"
      +          ],
      +          "type": "string"
      +        },
      +        "applicationHash": {
      +          "pattern": "^[a-f0-9]{64}$",
      +          "type": "string"
      +        },
      +        "appliedAt": {
      +          "type": "string"
      +        },
      +        "controlId": {
      +          "type": "string"
      +        },
      +        "loopId": {
      +          "type": "string"
      +        },
      +        "previousApplicationHash": {
      +          "pattern": "^[a-f0-9]{64}$",
      +          "type": "string"
      +        },
      +        "receiptHash": {
      +          "pattern": "^[a-f0-9]{64}$",
      +          "type": "string"
      +        },
      +        "relatedControlId": {
      +          "type": "string"
      +        },
      +        "schemaVersion": {
      +          "const": "martin.run-control-application.v2"
      +        }
      +      },
      +      "required": [
      +        "schemaVersion",
      +        "loopId",
      +        "controlId",
      +        "action",
      +        "appliedAt",
      +        "receiptHash",
      +        "applicationHash"
      +      ],
      +      "type": "object"
      +    },
      +    "type": "array"
      +  },
      +  "appliedState": {
      +    "enum": [
      +      "active",
      +      "paused",
      +      "cancellation_pending",
      +      "terminal"
      +    ],
      +    "type": "string"
      +  },
      +  "approvalState": {
      +    "enum": [
      +      "not_required",
      +      "resume_requested"
      +    ],
      +    "type": "string"
      +  },
      +  "latestReceipt": {
      +    "additionalProperties": false,
      +    "properties": {
      +      "action": {
      +        "enum": [
      +          "pause",
      +          "cancel",
      +          "continue"
      +        ],
      +        "type": "string"
      +      },
      +      "authorityBoundary": {
      +        "const": "local_os_user"
      +      },
      +      "controlId": {
      +        "type": "string"
      +      },
      +      "executorLeaseToken": {
      +        "type": "string"
      +      },
      +      "expectedPreviousControlId": {
      +        "type": "string"
      +      },
      +      "loopId": {
      +        "type": "string"
      +      },
      +      "previousReceiptHash": {
      +        "pattern": "^[a-f0-9]{64}$",
      +        "type": "string"
      +      },
      +      "principal": {
      +        "const": "local_mcp_client"
      +      },
      +      "projectId": {
      +        "type": "string"
      +      },
      +      "reason": {
      +        "type": "string"
      +      },
      +      "receiptHash": {
      +        "pattern": "^[a-f0-9]{64}$",
      +        "type": "string"
      +      },
      +      "requestedAt": {
      +        "type": "string"
      +      },
      +      "schemaVersion": {
      +        "const": "martin.run-control.v2"
      +      },
      +      "workspaceId": {
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "schemaVersion",
      +      "controlId",
      +      "loopId",
      +      "action",
      +      "requestedAt",
      +      "authorityBoundary",
      +      "principal",
      +      "executorLeaseToken",
      +      "receiptHash"
      +    ],
      +    "type": "object"
      +  },
      +  "publications": {
      +    "items": {
      +      "additionalProperties": false,
      +      "properties": {
      +        "controlId": {
      +          "type": "string"
      +        },
      +        "loopId": {
      +          "type": "string"
      +        },
      +        "previousPublicationHash": {
      +          "pattern": "^[a-f0-9]{64}$",
      +          "type": "string"
      +        },
      +        "publicationHash": {
      +          "pattern": "^[a-f0-9]{64}$",
      +          "type": "string"
      +        },
      +        "receiptHash": {
      +          "pattern": "^[a-f0-9]{64}$",
      +          "type": "string"
      +        },
      +        "recordedAt": {
      +          "type": "string"
      +        },
      +        "schemaVersion": {
      +          "const": "martin.run-control-publication.v1"
      +        },
      +        "signalState": {
      +          "enum": [
      +            "created",
      +            "already_exists"
      +          ],
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "schemaVersion",
      +        "loopId",
      +        "controlId",
      +        "receiptHash",
      +        "signalState",
      +        "recordedAt",
      +        "publicationHash"
      +      ],
      +      "type": "object"
      +    },
      +    "type": "array"
      +  },
      +  "receiptPath": {
      +    "type": "string"
      +  },
      +  "receipts": {
      +    "items": {
      +      "additionalProperties": false,
      +      "properties": {
      +        "action": {
      +          "enum": [
      +            "pause",
      +            "cancel",
      +            "continue"
      +          ],
      +          "type": "string"
      +        },
      +        "authorityBoundary": {
      +          "const": "local_os_user"
      +        },
      +        "controlId": {
      +          "type": "string"
      +        },
      +        "executorLeaseToken": {
      +          "type": "string"
      +        },
      +        "expectedPreviousControlId": {
      +          "type": "string"
      +        },
      +        "loopId": {
      +          "type": "string"
      +        },
      +        "previousReceiptHash": {
      +          "pattern": "^[a-f0-9]{64}$",
      +          "type": "string"
      +        },
      +        "principal": {
      +          "const": "local_mcp_client"
      +        },
      +        "projectId": {
      +          "type": "string"
      +        },
      +        "reason": {
      +          "type": "string"
      +        },
      +        "receiptHash": {
      +          "pattern": "^[a-f0-9]{64}$",
      +          "type": "string"
      +        },
      +        "requestedAt": {
      +          "type": "string"
      +        },
      +        "schemaVersion": {
      +          "const": "martin.run-control.v2"
      +        },
      +        "workspaceId": {
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "schemaVersion",
      +        "controlId",
      +        "loopId",
      +        "action",
      +        "requestedAt",
      +        "authorityBoundary",
      +        "principal",
      +        "executorLeaseToken",
      +        "receiptHash"
      +      ],
      +      "type": "object"
      +    },
      +    "type": "array"
      +  },
      +  "requestedState": {
      +    "enum": [
      +      "active",
      +      "paused",
      +      "cancellation_requested",
      +      "terminal"
      +    ],
      +    "type": "string"
      +  }
      +}
    • addedOutput schema / properties / state / required
      Added value: +[
      +  "requestedState",
      +  "approvalState",
      +  "appliedState",
      +  "receipts",
      +  "applications",
      +  "publications"
      +]
    • changedOutput schema / required
      Previous value: -[
      -  "loopId",
      -  "action",
      -  "controlId",
      -  "requestedAt",
      -  "ok",
      -  "summary",
      -  "requestedAction",
      -  "state"
      -]New value: +[
      +  "loopId",
      +  "action",
      +  "controlId",
      +  "requestedAt",
      +  "ok",
      +  "summary",
      +  "requestedAction",
      +  "publicationState",
      +  "applicationState",
      +  "authorityBoundary",
      +  "principal",
      +  "receiptHash",
      +  "state"
      +]
  2. Changed5 schema fields changedv0.8.6
    • addedOutput schema / properties / ok
      Added value: +{
      +  "description": "Whether the control receipt was recorded.",
      +  "type": "boolean"
      +}
    • addedOutput schema / properties / requestedAction
      Added value: +{
      +  "description": "The control action that was requested.",
      +  "enum": [
      +    "pause",
      +    "cancel",
      +    "continue"
      +  ],
      +  "type": "string"
      +}
    • addedOutput schema / properties / state
      Added value: +{
      +  "additionalProperties": true,
      +  "description": "Run control state after this request, including all recorded receipts.",
      +  "type": "object"
      +}
    • addedOutput schema / properties / summary
      Added value: +{
      +  "description": "Human-readable result of the control request.",
      +  "type": "string"
      +}
    • changedOutput schema / required
      Previous value: -[
      -  "loopId",
      -  "action",
      -  "controlId",
      -  "requestedAt"
      -]New value: +[
      +  "loopId",
      +  "action",
      +  "controlId",
      +  "requestedAt",
      +  "ok",
      +  "summary",
      +  "requestedAction",
      +  "state"
      +]
  3. Changed1 schema field changedv0.6.6
    • removedInput schema / oneOf
      Removed value: -[
      -  {
      -    "required": [
      -      "file"
      -    ]
      -  },
      -  {
      -    "required": [
      -      "loopId"
      -    ]
      -  },
      -  {
      -    "required": [
      -      "latest"
      -    ]
      -  }
      -]
  4. Changed6 schema fields changedv0.5.9
    • addedInput schema / properties / file / description
      Added value: +"Path to one canonical run record or directory. Mutually exclusive with loopId and latest."
    • addedInput schema / properties / latest / description
      Added value: +"When true, targets the latest canonical run. Mutually exclusive with file and loopId."
    • addedInput schema / properties / loopId / description
      Added value: +"Canonical MartinLoop run identifier. Mutually exclusive with file and latest."
    • addedInput schema / properties / reason / description
      Added value: +"Optional non-empty reason recorded in the pause receipt."
    • addedInput schema / properties / requestedBy / description
      Added value: +"Optional human or runtime identity label recorded for audit context."
    • addedInput schema / properties / runsDir / description
      Added value: +"Optional run-store root override used to resolve loopId or latest."
  5. Changed3 schema fields changedv0.5.6
    • changedOutput schema / additionalProperties
      Previous value: -trueNew value: +false
    • addedOutput schema / properties
      Added value: +{
      +  "action": {
      +    "description": "The control action that was recorded.",
      +    "enum": [
      +      "pause",
      +      "cancel",
      +      "continue"
      +    ],
      +    "type": "string"
      +  },
      +  "controlId": {
      +    "description": "Unique receipt ID for this control action.",
      +    "type": "string"
      +  },
      +  "loopId": {
      +    "description": "MartinLoop run identifier the control was applied to.",
      +    "type": "string"
      +  },
      +  "reason": {
      +    "description": "Human-readable reason for the control, if provided.",
      +    "type": "string"
      +  },
      +  "requestedAt": {
      +    "description": "ISO 8601 timestamp when the control was recorded.",
      +    "type": "string"
      +  },
      +  "requestedBy": {
      +    "description": "Identity that requested the control, if provided.",
      +    "type": "string"
      +  }
      +}
    • addedOutput schema / required
      Added value: +[
      +  "loopId",
      +  "action",
      +  "controlId",
      +  "requestedAt"
      +]
  6. First observedv0.3.9

TDQS

A4.5/5.0
Behavior4/5

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

The annotations only give destructiveHint=true and idempotentHint=false, so the description meaningfully adds that the pause is cooperative, applied at the next safe attempt boundary, and does not suspend or kill an in-flight provider — critical context an agent would otherwise guess at. It stops short of covering edge cases such as what happens when no run is active or whether repeated calls queue, which keeps it below a 5.

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?

Three sentences, front-loaded with the action, then the timing/limitation, then the selector rule and sibling routing. No filler and no repetition of the title.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

An output schema exists, so return-value detail is unnecessary. For a coordination tool, the description covers effect timing, non-interruption, selector exclusivity, and the sibling tools for state inspection and reversal — everything needed to call it correctly.

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?

With 100% schema description coverage, the parameter machine-readable docs already carry file/loopId/latest/reason/runsDir semantics, which sets the baseline at 3. The description does add one genuinely new constraint — the exactly-one-selector rule — since required parameters are zero and the schema only says 'mutually exclusive' per property, but that is a modest addition over the schema.

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?

States a specific verb and resource — 'Request a durable cooperative pause for one active MartinLoop run' — and immediately scopes it to a single run, which separates it from martin_cancel and martin_continue by name later in the text. An agent can identify the operation without opening the schema.

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

Usage Guidelines5/5

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

Explicitly routes the agent: use martin_status to distinguish requested from applied state, martin_cancel to abandon work, martin_continue to release the pause. It also states a hard invocation rule — 'Provide exactly one selector: file, loopId, or latest' — so both when-to-use and how-to-select are covered.

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