Skip to main content
Glama
mcp-interactive-terminal

mcp-interactive-terminal

by hugo94z

terminal_interrupt

Stop a running command in an interactive terminal session while keeping the shell alive; sends Ctrl+C, then terminates unresponsive child processes after a grace period or immediately with force.

Instructions

Stop the command running in a session, keeping the shell alive.

Sends Ctrl+C first. Processes that ignore the control character are terminated after a grace period; the shell itself is preserved.

Args: session_id: Session returned by terminal_start. force: Skip the grace period and terminate child processes immediately.

Returns: session_id, sent, running, killed (pids terminated) and running_children.

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": {
      "session_id": "<session_id>"
    },
    "name": "terminal_interrupt"
  }
}

Input Schema

NameRequiredDescriptionDefault
forceNo
session_idYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.4/5.0
Behavior4/5

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

With no annotations supplied, the description carries the burden and does well: it discloses the escalation sequence (Ctrl+C first, grace period, then termination), that the shell survives, and what force skips. It does not say what happens if no command is running, or whether the session's output buffer is retained, which are the remaining behavioral gaps.

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?

Front-loaded with the single most important fact (the shell survives), then the escalation mechanics, then Args/Returns. Every sentence adds information; the Returns block earns its place because no output schema exists.

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?

A low-complexity, two-parameter tool with no annotations and no output schema — the description still covers purpose, escalation behavior, both parameters, and the return keys. Nothing an agent needs in order to call it correctly is missing.

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

Parameters5/5

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

Schema coverage is 0%, so the description must compensate and it does: session_id is anchored to 'Session returned by terminal_start' (a real provenance hint), and force is explained in terms of the grace period and child-process termination, which is meaning the boolean type cannot convey.

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 ('Stop the command running in a session') plus the distinguishing constraint 'keeping the shell alive', which separates it from the sibling terminal_stop that presumably ends the session itself. An agent can pick this tool 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 Guidelines3/5

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

The 'keeping the shell alive' clause implies when to choose this over terminal_stop, and the force arg implies a when-to-escalate decision, but neither alternative nor exclusion is named explicitly. Usage is inferable rather than stated.

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