Skip to main content
Glama

interrupt

Sends a kernel interrupt signal to the currently running execution to stop it early. Use it to halt long-running or stuck Python code in the persistent kernel.

Instructions

向当前正在运行的 execution 发送 kernel 中断信号。

中断语义

kernel 到达 IOPub idle 后,记录才会报告 interrupted、 error 或其他最终状态。kernel 空闲时返回 idle。

Returns: 已发送信号时返回目标 execution;kernel 空闲时返回 idle。

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": "interrupt"
  }
}

Input Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.1.13

TDQS

A3.8/5.0
Behavior4/5

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

With no annotations, the description carries the full burden, and it does disclose meaningful behavior: the interrupt is asynchronous, the record only reports interrupted/error/other final status after the kernel reaches IOPub idle, and an idle kernel returns idle. It omits whether partial output is preserved or permissions required, keeping it below 5.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is front-loaded with the purpose and then a clearly separated semantics section. The Returns block repeats the already-stated idle behavior, which is minor redundancy, but the structure is otherwise efficient.

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?

With no annotations, no output schema, and zero parameters, the description covers the safety-relevant behavior (async completion, final status reporting, idle handling) that an agent needs before invoking it. Only minor details such as side effects on buffered output are absent.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool takes zero parameters, so the baseline is 4. There is nothing further for the description to disambiguate, and it adds no misleading parameter claims.

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?

The description gives a specific verb and resource: sending a kernel interrupt signal to the currently running execution. It is clear about what happens, but it does not name the sibling it differs from, so an agent cannot tell interrupt from restart purely from this text.

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

Usage Guidelines3/5

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

The phrase about the currently running execution implies when the tool applies, but there is no explicit instruction on when to use it instead of restart or wait, and no exclusions. The agent must infer that this cancels a running execution rather than restarting the kernel.

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