Skip to main content
Glama

interrupt

Stops a session's running command when it takes too long, safe even if idle; resets the shell and immediately ends any in-flight command.

Instructions

Stops whatever is running on a session, e.g. a command taking far longer than expected. Safe to call even if nothing is currently running. This resets the session's shell: the working directory is restored, but shell variables and background jobs are gone, and any run_command still in flight returns immediately marked interrupted. Plan on having lost that state rather than assuming continuity.

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": {
      "sessionId": "<sessionId>"
    },
    "name": "interrupt"
  }
}

Input Schema

NameRequiredDescriptionDefault
sessionIdYesThe sessionId returned by open_session.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.1/5.0
Behavior5/5

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

With no annotations supplied, the description carries the full behavioral burden and does so thoroughly: it discloses the destructive side effects (working directory restored, shell variables and background jobs lost) and the effect on concurrent work (an in-flight run_command returns immediately marked interrupted). This is exactly the state-loss warning an agent needs before calling a mutation tool.

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?

Four short sentences ordered by importance: what it does, safety, consequences, then the planning implication. The closing sentence reinforces rather than repeats, and no wording is wasted.

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?

For a one-parameter tool with no annotations or output schema, the description covers purpose, safety, and side effects completely. The only gap is that it never says what the call itself returns, leaving the agent to guess the response shape.

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?

There is a single parameter with 100% schema description coverage, so the schema already explains that sessionId comes from open_session. The description adds no further parameter-level meaning, which matches the baseline 3 for a fully documented schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

"Stops whatever is running on a session" gives a specific verb and resource, and the example ("a command taking far longer than expected") makes the scope concrete. It does not explicitly distinguish itself from siblings like cancel_runbook_run or close_session, so the agent must infer that boundary.

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 supplies a clear trigger condition (a command running far longer than expected) and a negative case ("Safe to call even if nothing is currently running"), which removes the main hesitation about invoking it. It stops short of naming an alternative tool for adjacent needs such as tearing down a session entirely.

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