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

run_and_wait

run_and_wait( command, pane_id, timeout?, )
prompt

Run a shell command in a tmux pane and wait for completion.

The returned template teaches the high-level authored-command primitive: run_command sends the command, waits through a private tmux signal, captures output, and reports exit status in one typed result. Use lower-level send_keys + wait_for_channel only when the caller needs custom shell composition outside this common command-completion shape.

MCP request method
prompts/get Send run_and_wait as the prompt name, with the arguments below.

Arguments#

  • command#

    The shell command to run.

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

    Binding
    Prompt argument
    Required
    Yes
  • pane_id#

    Target pane (e.g. %1).

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

    Binding
    Prompt argument
    Required
    Yes
  • timeout#

    Maximum seconds to wait for command completion. Default 60.

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

    Binding
    Prompt argument
    Required
    No

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": "The shell command to run.\n\nProvide a value matching the following JSON schema: {\"type\":\"string\"}. Encode non-string values as JSON.",
"name": "command",
"required": true
},
{
"description": "Target pane (e.g. ``%1``).\n\nProvide a value matching the following JSON schema: {\"type\":\"string\"}. Encode non-string values as JSON.",
"name": "pane_id",
"required": true
},
{
"description": "Maximum seconds to wait for command completion. Default 60.\n\nProvide a value matching the following JSON schema: {\"type\":\"number\"}. Encode non-string values as JSON.",
"name": "timeout",
"required": false
}
],
"description": "Run a shell command in a tmux pane and wait for completion.\n\nThe returned template teaches the high-level authored-command\nprimitive: ``run_command`` sends the command, waits through a\nprivate tmux signal, captures output, and reports exit status in\none typed result. Use lower-level ``send_keys`` +\n``wait_for_channel`` only when the caller needs custom shell\ncomposition outside this common command-completion shape.",
"name": "run_and_wait"
}
Esc

Type to search.

Reference preview Open reference