Paste text

paste_text

paste_text
mutating tool

Paste multi-line text into a pane using tmux paste buffers.

Returns:

str

Use when you need to paste multi-line text into a pane — e.g. a code block, a config snippet, or a heredoc. Uses tmux paste buffers for clean multi-line input instead of sending text line-by-line via send_keys.

Side effects: Pastes text into the pane. With bracket=true (default), uses bracketed paste mode so the terminal knows this is pasted text.

Example:

{
  "tool": "paste_text",
  "arguments": {
    "text": "def hello():\n    print('world')\n",
    "pane_id": "%0"
  }
}

Response (string):

Text pasted to pane %0

Parameters

Parameter

Type

Required

Default

Description

text

str

yes

The text to paste.

pane_id

str

no

Pane ID (e.g. ‘%1’).

bracket

bool

no

True

Whether to use bracketed paste mode. Default True. Bracketed paste wraps the text in escape sequences that tell the terminal “this is pasted text, not typed input”.

session_name

str

no

Session name for pane resolution.

session_id

str

no

Session ID for pane resolution.

window_id

str

no

Window ID for pane resolution.

socket_name

str

no

tmux socket name.

Destroy