# interrupt_gracefully

Source: https://libtmux.org/en/py/latest/mcp/prompts/interrupt_gracefully/

> Interrupt a running command and verify the prompt returned.

promptMCPlatest

MCP is in development

Server behavior and tool contracts may change. Tool availability depends on the server configuration.

* **interrupt_gracefully**( [pane_id](https://libtmux.org/en/py/latest/mcp/prompts/interrupt_gracefully/#mcp.prompt.interrupt_gracefully.parameter.pane_id), )

  prompt[¶](https://libtmux.org/en/py/latest/mcp/prompts/interrupt_gracefully/#mcp.prompt.interrupt_gracefully)

  Interrupt a running command and verify the prompt returned.

  Sends `C-c` through `send_keys(literal=True)`, then waits on shell-prompt patterns via [`wait_for_text`](https://libtmux.org/en/py/latest/mcp/tools/wait_for_text/). Fails loudly if the process ignores SIGINT — the right escalation point is the caller, not an automatic `C-\` follow-up (SIGQUIT can core-dump).

  * MCP request method

    `prompts/get` Send `interrupt_gracefully` as the prompt name, with the arguments below.

  ## Arguments[#](https://libtmux.org/en/py/latest/mcp/prompts/interrupt_gracefully/#mcp.prompt.interrupt_gracefully.parameters)

  * `pane_id`[#](https://libtmux.org/en/py/latest/mcp/prompts/interrupt_gracefully/#mcp.prompt.interrupt_gracefully.parameter.pane_id)

    Target pane.

    Provide a value matching the following JSON schema: {“type”:“string”}. Encode non-string values as JSON.

    * Binding

      Prompt argument

    * Required

      Yes

  ## Result[#](https://libtmux.org/en/py/latest/mcp/prompts/interrupt_gracefully/#mcp.prompt.interrupt_gracefully.result)

  Returns the prompt’s messages. The client supplies the advertised arguments as strings.

  ## Protocol data[#](https://libtmux.org/en/py/latest/mcp/prompts/interrupt_gracefully/#mcp.prompt.interrupt_gracefully.schemas)

  Use the complete advertised contract for validation and client integration.

  Registration

  ```json
  {
    "_meta": {
      "fastmcp": {
        "tags": []
      }
    },
    "arguments": [
      {
        "description": "Target pane.\n\nProvide a value matching the following JSON schema: {\"type\":\"string\"}. Encode non-string values as JSON.",
        "name": "pane_id",
        "required": true
      }
    ],
    "description": "Interrupt a running command and verify the prompt returned.\n\nSends ``C-c`` through ``send_keys(literal=True)``, then waits on\nshell-prompt patterns via ``wait_for_text``. Fails loudly if the\nprocess ignores SIGINT — the right escalation point is the caller,\nnot an automatic ``C-\\`` follow-up (SIGQUIT can core-dump).",
    "name": "interrupt_gracefully"
  }
  ```

Source revision: [tmux-python/libtmux-mcp@4daddc0dfca96c43bf521d818bf91564e1434760](https://github.com/tmux-python/libtmux-mcp/tree/4daddc0dfca96c43bf521d818bf91564e1434760).
