run_and_wait
-
Run a shell command in a tmux pane and wait for completion.
The returned template teaches the high-level authored-command primitive:
run_commandsends the command, waits through a private tmux signal, captures output, and reports exit status in one typed result. Use lower-levelsend_keys+wait_for_channelonly when the caller needs custom shell composition outside this common command-completion shape.- MCP request method
prompts/getSendrun_and_waitas 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"}