MCPpre-alphaPrompts

Choose documentation 3

latest

Current version

latest
English

Early release libtmux is released, and its APIs may still change between releases. This site's structure and URLs may change too.

MoreLess about this notice

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

prompt MCP

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

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
Search in

Type to search.

Reference previewOpen reference