Load buffer

load_buffer

load_buffer
mutating tool

Load text into a new agent-namespaced tmux paste buffer.

Returns:

BufferRef

Use when you need to stage multi-line text for paste — sending a shell script, prepared input for an interactive prompt, or content that’s too long for a clean send_keys invocation.

Avoid when the text is a single command line that send_keys can deliver directly. load_buffer allocates server-side state that must be cleaned up via delete_buffer.

Side effects: Allocates a tmux paste buffer. Use the returned buffer_name for follow-up calls. The content argument is redacted in audit logs.

Example:

{
  "tool": "load_buffer",
  "arguments": {
    "content": "for i in 1 2 3; do\n  echo line $i\ndone\n",
    "logical_name": "loop"
  }
}

Response:

{
  "buffer_name": "libtmux_mcp_a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6_loop",
  "logical_name": "loop"
}

Parameters

Parameter

Type

Required

Default

Description

content

str

yes

The text to stage. Can be multi-line. Redacted in audit logs.

logical_name

str

no

Short label for the buffer. Limited to [A-Za-z0-9_.-]{1,64} so the final name stays safe on the tmux command line. Empty or None uses "buf".

socket_name

str

no

tmux socket name.

Paste