MCPconceptTools

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.

tool MCPlatest

run_shell_command

Runs one authored command in a trusted pane shell and waits for singular framed output and completion. Its two preflights refuse caller or attended panes and an effective cohort larger than one. Pre-existing exact-client-path, trap, eval, or exit functions are outside the supported boundary; marker display-message commands honor the trusted server’s command aliases and hooks. Run a shell command in a pane with your user’s permissions.

MCP request method
tools/call Send run_shell_command as the tool name, with the arguments below.

Arguments#

  • command (string) #

    The shell command, run in the pane’s interactive shell.

  • max_lines? = 200 (integer) #

    Maximum output lines, keeping the newest. Defaults to 200.

  • pane_id (string) #

    The pane to act on, such as %1. Every listing tool returns these.

  • suppress_history? = true (boolean) #

    Best-effort persistent history suppression. Defaults to true.

  • timeout? = 30 (number) #

    Seconds to wait before giving up. Defaults to 30.0.

No other arguments are accepted.

Result#

Returns object

No other properties are accepted.

Annotations#

destructiveHint
true
idempotentHint
false
openWorldHint
true
readOnlyHint
false
title
"Run a shell command"

Protocol data#

Use the complete advertised contract for validation and client integration.

Input schema
{
"additionalProperties": false,
"properties": {
"command": {
"description": "The shell command, run in the pane's interactive shell.",
"type": "string"
},
"max_lines": {
"default": 200,
"description": "Maximum output lines, keeping the newest. Defaults to 200.",
"type": "integer"
},
"pane_id": {
"description": "The pane to act on, such as %1. Every listing tool returns these.",
"type": "string"
},
"suppress_history": {
"default": true,
"description": "Best-effort persistent history suppression. Defaults to true.",
"type": "boolean"
},
"timeout": {
"default": 30,
"description": "Seconds to wait before giving up. Defaults to 30.0.",
"type": "number"
}
},
"required": [
"pane_id",
"command"
],
"type": "object"
}
Output schema
{
"additionalProperties": false,
"properties": {
"effective_timeout": {
"type": "number"
},
"exit_status": {
"type": "integer"
},
"framed": {
"type": "boolean"
},
"lines_dropped": {
"type": "integer"
},
"note": {
"type": "string"
},
"outcome": {
"type": "string"
},
"output": {
"items": {
"type": "string"
},
"type": "array"
},
"pane_id": {
"type": "string"
},
"seconds": {
"type": "number"
},
"truncated": {
"type": "boolean"
}
},
"required": [
"pane_id",
"outcome",
"output",
"truncated",
"lines_dropped",
"framed",
"seconds",
"effective_timeout"
],
"type": "object"
}
Esc

Type to search.

Reference previewOpen reference