Skip to main content
Glama

send_control

Send control characters like ctrl-c to a specific iTerm2 session to interrupt runaway processes, end stdin, or clear the screen.

Instructions

PREFER SendMessage when you want another Claude Code session to stop, change course, or do something else — interrupting it by keystroke races whatever it is doing and discards its in-flight work, where a message is delivered cleanly at its next turn. Reach for send_control for genuine terminal control: killing a runaway process, ending stdin, clearing a screen. Send a control character (e.g. ctrl-c to interrupt) to a specific iTerm2 session.

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>",
      "character": "<character>"
    },
    "name": "send_control"
  }
}

Input Schema

NameRequiredDescriptionDefault
characterYesControl character to send
session_idYesThe unique session ID (UUID) from list_sessions

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4.3/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 does disclose the key behavioral trait: keystroke injection 'races whatever it is doing and discards its in-flight work,' a real data-loss risk. It scopes the tool to iTerm2 sessions. It does not state the return value, what happens when the session is idle or missing, or whether the character reaches the foreground process.

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?

Three tight clauses with no filler, and the destructive-tradeoff rationale is compact and useful. It is slightly back-loaded: the tool's own action appears only in the final sentence after the alternative-tool steering.

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 two-parameter, no-output-schema, no-annotation tool, the definition covers what it does, when to reach for it, the competing alternative, and the key risk. Remaining gaps (return value, failure modes on missing sessions) are minor.

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 coverage is 100% with a full enum, so the schema already defines both parameters and their values; baseline is 3. The description adds meaning for only one enum value (ctrl-c = interrupt) and points at list_sessions for session_id, leaving the other nine control characters unexplained.

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: 'Send a control character (e.g. ctrl-c to interrupt) to a specific iTerm2 session.' It also explicitly separates this tool from SendMessage, so an agent can pick between them without opening schemas.

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?

Gives explicit when-to-use ('genuine terminal control: killing a runaway process, ending stdin, clearing a screen') and an explicit when-to-prefer-the-alternative rule ('PREFER SendMessage when you want another Claude Code session to stop, change course, or do something else'). Nothing is left to inference.

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