read_remote_file
Read full file contents from a remote host over SSH, preferring direct file transfer and falling back to tmux PTY history if needed. Ideal for configs, logs, and source code.
Instructions
Read a file from the remote host using the established session.
Prefer this over running 'cat' via send_command/get_snapshot when you want file contents. send_command() and get_snapshot() only return the last N lines of visible terminal output.
read_remote_file() attempts a direct SSH file read first so agents can get the full file
instead of just the pane tail. If that is not possible, it falls back to reading via the
existing PTY. fallback_lines controls how much tmux history to inspect during that PTY
fallback (default 200). Best for text files such as configs, logs, and source code.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| session_id | Yes | ||
| remote_path | Yes | ||
| fallback_lines | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |