MCPPrompts

Choose documentation 3

latest

Current version

latest
English

Prerelease This site documents an alpha of libtmux. Its structure, URLs and APIs are subject to change.

promptMCPlatest

interrupt_gracefully

interrupt_gracefully( pane_id, )
prompt

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. 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#

  • 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#

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

Protocol data#

Use the complete advertised contract for validation and client integration.

Registration
{
"_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"
}
Esc

Type to search.

Reference preview Open reference