Tools
Every tool LetKite's MCP server offers, with what it does, whether it only reads or can change things, and its parameters. This page is generated from the gateway's code, so it lists exactly what an AI client sees.
Each tool carries the standard MCP annotations:
- Read-only
readOnlyHint: true: changes nothing on a machine or in LetKite. - Destructive
destructiveHint: true: may change or remove what is there, for example by running a command, writing or deleting a file, stopping a job or typing on a screen. - Opens or closes a session neither: adds or removes something reversible, such as a shell session, a log subscription, a tunnel or a web share.
Every tool has openWorldHint: false: tools act only on the machines in your own LetKite account. Whatever a tool's annotations, the permissions and approvals of the connection still apply to every call, and every call is recorded in the audit log.
Most tools take a host: a machine's alias or node ID from list_hosts, never an IP address.
Generated from the gateway's code (letkite/letkite@78168ef, 2026-10-19). 47 tools: 17 read-only, 22 destructive, 8 that open or close a session.
| Hosts and commands | ||
|---|---|---|
list_hosts | List hosts | Read-only |
host_facts | Host facts | Read-only |
fleet_status | Gateway status | Read-only |
exec | Run command | Destructive |
exec_many | Run command on many hosts | Destructive |
shell_open | Open shell session | Opens or closes a session |
shell_run | Run in shell session | Destructive |
shell_close | Close shell session | Opens or closes a session |
| Files and transfers | ||
list_dir | List directory | Read-only |
read_file | Read file | Read-only |
write_file | Write file | Destructive |
delete_path | Delete path | Destructive |
copy_between_hosts | Copy file between hosts | Destructive |
transfer_start | Start file transfer | Destructive |
transfer_status | Transfer status | Read-only |
transfer_cancel | Cancel transfer | Destructive |
| Jobs, logs, tunnels and nodes | ||
job_start | Start background job | Destructive |
job_status | Job status | Read-only |
job_output | Read job output | Read-only |
job_kill | Kill job | Destructive |
job_purge | Purge job | Destructive |
log_open | Open log subscription | Opens or closes a session |
log_read | Read log lines | Read-only |
log_close | Close log subscription | Opens or closes a session |
tunnel_open | Open tunnel | Opens or closes a session |
tunnel_http | HTTP through tunnel | Destructive |
tunnel_close | Close tunnel | Opens or closes a session |
wake_node | Wake node | Destructive |
wake_device | Wake LAN device | Destructive |
approval_wait | Wait for approval | Read-only |
audit_tail | Audit log tail | Read-only |
| Schedules | ||
schedule_create | Create schedule | Destructive |
schedule_list | List schedules | Read-only |
schedule_delete | Delete schedule | Destructive |
schedule_runs | Schedule run history | Read-only |
| Web shares | ||
share_create | Create web share | Opens or closes a session |
share_list | List web shares | Read-only |
share_delete | Delete web share | Destructive |
| Terminals | ||
terminal_open | Open terminal | Destructive |
terminal_send | Type into terminal | Destructive |
terminal_read | Read terminal output | Read-only |
terminal_ask | Ask person to type | Destructive |
terminal_resize | Resize terminal | Opens or closes a session |
terminal_close | Close terminal | Destructive |
| Screen | ||
gui_observe | Observe screen | Read-only |
gui_zoom | Zoom into screen | Read-only |
gui_act | Act on screen | Destructive |
Hosts and commands
list_hosts List hosts Read-only
List every host in the fleet: node_id, alias, address, user, tags, scopes, notes.
Entry point for every other tool. Their host argument takes an alias or a node_id, never a bare IP. Aliases may repeat; if one is ambiguous the call fails and lists the candidate node_ids. Read-only.
| Parameter | Type | Required | Description |
|---|---|---|---|
tags | array of string (optional) | no | filter by tag |
host_facts Host facts Read-only
Collect basic facts: distro, kernel, load, memory, disk, current user, containers.
Run this before doing real work on a host so you do not send Debian commands to Alpine, or assume you are root. Read-only: a fixed set of probes that change nothing; needs fleet.read.
| Parameter | Type | Required | Description |
|---|---|---|---|
host | string | yes | alias or node_id from list_hosts |
fleet_status Gateway status Read-only
Show the gateway's own state: SSH pool, shell sessions, log subscriptions, tunnels.
Read-only; lists this connection's handles only; needs fleet.read.
exec Run command Destructive
Run one command on one host and wait for the result.
For work measured in seconds to a couple of minutes. Anything longer (builds, backups, large transfers) belongs in job_start, which survives SSH disconnects. Each call is a fresh process: cd and export do not carry over. Use shell_open when you need that state.
Side effects are whatever the command does. Needs fleet.exec; the connection's command rules and approvals apply (a high-risk command needs confirm=true). Output is capped (32 KB by default) and the timeout clamped (60 s by default, 900 s at most).
Batch several steps into one command rather than making many round trips.
| Parameter | Type | Required | Description |
|---|---|---|---|
host | string | yes | alias or node_id from list_hosts |
command | string | yes | bash in a login shell on SSH nodes; on agent nodes the node's default shell (PowerShell on Windows) unless shell= says otherwise |
cwd | string (optional) | no | working directory |
env | object of string (optional) | no | extra environment |
timeout | integer (minimum 1) (optional) | no | seconds |
sudo | boolean | no | run via sudo -n (host must allow it) (default false) |
confirm | boolean | no | confirm a high-risk command (default false) |
shell | string (optional) | no | agent nodes only: sh, bash, zsh, pwsh, powershell or cmd; the node's default when omitted (host_facts lists them) |
exec_many Run command on many hosts Destructive
Run the same command on several hosts concurrently.
Use this for sweeps instead of looping over exec. One host failing does not stop the others. Same side effects and checks as exec on every target: the command rules check every target before any runs, and one approval covers the sweep. At most 8 hosts by default; each host's output is capped at half of exec's.
| Parameter | Type | Required | Description |
|---|---|---|---|
command | string | yes | command to run on every target |
hosts | array of string (optional) | no | aliases or node_ids |
tags | array of string (optional) | no | select by tag instead |
timeout | integer (minimum 1) (optional) | no | |
concurrency | integer (minimum 1, maximum 32) | no | (default 5) |
confirm | boolean | no | confirm a high-risk command (default false) |
shell_open Open shell session Opens or closes a session
Open a persistent shell session; cwd, variables and functions persist.
bash on SSH hosts; on agent nodes the node's shell (PowerShell on Windows). For continuous debugging: cd somewhere, source an env, activate a venv, then keep working. Close it with shell_close; idle sessions are reaped after 30 min. Starts a shell process and runs nothing else; needs fleet.exec; at most 4 sessions per host; refused when the command rules are an allowlist.
| Parameter | Type | Required | Description |
|---|---|---|---|
host | string | yes | alias or node_id from list_hosts |
cwd | string (optional) | no | initial working directory |
env | object of string (optional) | no | initial environment |
shell | string (optional) | no | agent nodes only: pwsh or powershell on Windows, bash, sh or zsh elsewhere; the node's default when omitted |
shell_run Run in shell session Destructive
Run a command in an open session; returns exit code, merged output and cwd.
A command inside a session cannot be interrupted on its own: a timeout destroys the session. Use job_start for long work. Side effects are whatever the command does; needs fleet.exec, and the command rules, approvals and output cap of exec apply.
| Parameter | Type | Required | Description |
|---|---|---|---|
session_id | string | yes | id from shell_open |
command | string | yes | command to run in that session |
timeout | integer (minimum 1) (optional) | no | |
confirm | boolean | no | confirm a high-risk command (default false) |
shell_close Close shell session Opens or closes a session
Close a persistent shell session and end its shell process. Needs fleet.exec.
| Parameter | Type | Required | Description |
|---|---|---|---|
session_id | string | yes | session to close |
Files and transfers
list_dir List directory Read-only
List a remote directory: type, size, mode, mtime. Optionally recursive.
Read-only; needs fleet.read. Recursion goes 4 levels deep at most and the answer holds at most 2000 entries.
| Parameter | Type | Required | Description |
|---|---|---|---|
host | string | yes | alias or node_id from list_hosts |
path | string | no | absolute path, or relative to workdir (default ".") |
depth | integer (minimum 1, maximum 4) | no | recursion depth (default 1) |
show_hidden | boolean | no | include dotfiles (default false) |
read_file Read file Read-only
Read a remote file. Text is decoded as UTF-8; set binary=true for base64.
Read-only; needs fleet.read. Returns at most max_bytes per call, never more than the gateway's file limit (4 MB by default); continue from next_offset.
| Parameter | Type | Required | Description |
|---|---|---|---|
host | string | yes | alias or node_id from list_hosts |
path | string | yes | remote file path |
max_bytes | integer (minimum 1) | no | max bytes to read (default 200000) |
offset | integer (minimum 0) | no | byte offset (default 0) |
binary | boolean | no | return base64 for binary files (default false) |
write_file Write file Destructive
Write a remote file: create, overwrite or append; parent directories are created.
Overwrites are backed up next to the file (<path>.bak-<time>) unless backup=false. Needs fleet.write and may need a person's approval; content is limited to the gateway's file limit (4 MB by default).
Config edits: read_file, write_file with backup, validate with exec (nginx -t, sshd -t), then reload.
| Parameter | Type | Required | Description |
|---|---|---|---|
host | string | yes | alias or node_id from list_hosts |
path | string | yes | target path; parent dirs are created |
content | string | yes | file content |
append | boolean | no | append instead of overwrite (default false) |
base64_content | boolean | no | content is base64-encoded (default false) |
mode | string (optional) | no | octal mode, e.g. '0644' |
backup | boolean | no | back up before overwriting (default true) |
delete_path Delete path Destructive
Delete a remote file, or a directory tree with recursive=true.
Irreversible: nothing is backed up. Requires confirm=true and fleet.write, and may need a person's approval; refuses system directories (/, /etc, /usr, /home, ...).
| Parameter | Type | Required | Description |
|---|---|---|---|
host | string | yes | alias or node_id from list_hosts |
path | string | yes | absolute path to delete |
recursive | boolean | no | recurse into directories (default false) |
confirm | boolean | no | must be true to proceed (default false) |
copy_between_hosts Copy file between hosts Destructive
Copy a file between two hosts through the gateway.
Replaces the destination file without a backup. Needs fleet.read on the source and fleet.write on the destination; the file must fit the gateway's file limit (4 MB by default). For large files use transfer_start between agent nodes, or exec with rsync/scp directly between the hosts.
| Parameter | Type | Required | Description |
|---|---|---|---|
src_host | string | yes | source host |
src_path | string | yes | source path |
dst_host | string | yes | destination host |
dst_path | string | yes | destination path |
transfer_start Start file transfer Destructive
Copy a file or a whole directory between two agent nodes, of any size.
Runs in the background through the gateway; returns when done or after wait_s with a transfer_id (follow it with transfer_status). Each file appears at its target only complete and checked (SHA-256); links are skipped. Writes on the destination node and replaces files already there only with overwrite=true. Both nodes' policies apply: read (fleet.read) at the source, write (fleet.write) at the destination. For SSH hosts use copy_between_hosts or rsync with exec.
| Parameter | Type | Required | Description |
|---|---|---|---|
src_host | string | yes | source agent node |
src_path | string | yes | a file or a directory there |
dst_host | string | yes | destination agent node |
dst_path | string | yes | where it goes: the file's new path (a directory that exists, or a path ending in / or \, receives the file inside it), or the directory to copy into |
overwrite | boolean | no | replace files already there (default false) |
wait_s | integer (minimum 0, maximum 60) | no | wait this long for it to finish (default 20) |
transfer_status Transfer status Read-only
Show a transfer's progress: files and bytes done, rate, what failed or was skipped.
Read-only; optionally waits up to wait_s for the transfer to finish.
| Parameter | Type | Required | Description |
|---|---|---|---|
transfer_id | string | yes | from transfer_start |
wait_s | integer (minimum 0, maximum 60) | no | wait this long for it to finish (default 0) |
transfer_cancel Cancel transfer Destructive
Stop a transfer. Files already finished stay; the one in progress does not appear.
| Parameter | Type | Required | Description |
|---|---|---|---|
transfer_id | string | yes | from transfer_start |
Jobs, logs, tunnels and nodes
job_start Start background job Destructive
Start a detached job on the node and return a job_id immediately.
The job outlives the SSH connection, the gateway restart and this conversation. stdout/stderr land in ~/.letkite/jobs/<job_id>/ on the node. Use this for builds, backups, bulk transfers, benchmarks. Side effects are whatever the command does; needs fleet.exec, and the command rules and approvals of exec apply.
| Parameter | Type | Required | Description |
|---|---|---|---|
host | string | yes | alias or node_id from list_hosts |
command | string | yes | command to run in the background |
label | string | no | human-readable label |
cwd | string (optional) | no | working directory |
env | object of string (optional) | no | extra environment |
confirm | boolean | no | confirm a high-risk command (default false) |
shell | string (optional) | no | agent nodes only: sh, bash, zsh, pwsh, powershell or cmd; the node's default when omitted (host_facts lists them) |
job_status Job status Read-only
Show a job's state: running / finished / aborted, plus exit code and output sizes.
Omit job_id to list every job on the host. Read-only; needs fleet.read.
| Parameter | Type | Required | Description |
|---|---|---|---|
host | string | yes | alias or node_id from list_hosts |
job_id | string (optional) | no | omit to list all jobs on the host |
job_output Read job output Read-only
Read a job's stdout or stderr. Returns next_offset for a gap-free incremental follow-up.
Read-only; needs fleet.read; at most 32 KB per call by default.
| Parameter | Type | Required | Description |
|---|---|---|---|
host | string | yes | alias or node_id from list_hosts |
job_id | string | yes | id from job_start |
stream | string | no | stdout or stderr (default "stdout") |
offset | integer (minimum 0) | no | byte offset; pass back next_offset for incremental reads (default 0) |
max_bytes | integer (minimum 1) | no | max bytes to return (default 64000) |
tail | boolean | no | ignore offset, return the tail (default false) |
job_kill Kill job Destructive
Send a signal (TERM by default) to the job's whole process group.
Usually ends the job and everything it started. Needs fleet.exec.
| Parameter | Type | Required | Description |
|---|---|---|---|
host | string | yes | alias or node_id from list_hosts |
job_id | string | yes | job to terminate |
signal | string | no | TERM / KILL / INT / HUP (default "TERM") |
job_purge Purge job Destructive
Delete a finished job's directory and logs. Running jobs are left alone.
Its output cannot be read afterwards. Needs fleet.write.
| Parameter | Type | Required | Description |
|---|---|---|---|
host | string | yes | alias or node_id from list_hosts |
job_id | string | yes | finished job to purge |
log_open Open log subscription Opens or closes a session
Start collecting a log on the gateway; read it later with log_read.
Subscribe first, trigger something with exec, then read what appeared. That ordering is not possible with exec alone. On a Windows agent node a channel gives one line per event: time, level, provider, id and message. Starts a tail (journalctl, logread, an event log reader) on the node and changes nothing else; needs fleet.read. Close it with log_close.
| Parameter | Type | Required | Description |
|---|---|---|---|
host | string | yes | alias or node_id from list_hosts |
path | string (optional) | no | log file path (or unit, or channel) |
unit | string (optional) | no | systemd unit (Linux) |
channel | string (optional) | no | Windows event log on agent nodes: System, Application, Security, or a channel such as Microsoft-Windows-PowerShell/Operational |
syslog | boolean | no | the system log of an agent node without journald: OpenWrt routers (logread) (default false) |
grep | string (optional) | no | line filter, ERE |
initial_lines | integer (minimum 0, maximum 500) | no | initial history lines (default 50) |
log_read Read log lines Read-only
Read new log lines. dropped_lines > 0 means the ring buffer overflowed.
Read-only; needs fleet.read; at most 2000 lines per call.
| Parameter | Type | Required | Description |
|---|---|---|---|
sub_id | string | yes | id from log_open |
since_seq | integer (minimum 0) | no | next_seq from the previous call, 0 to start (default 0) |
limit | integer (minimum 1, maximum 2000) | no | max lines (default 300) |
log_close Close log subscription Opens or closes a session
Close a subscription and kill the remote tail/journalctl.
| Parameter | Type | Required | Description |
|---|---|---|---|
sub_id | string | yes | subscription to close |
tunnel_open Open tunnel Opens or closes a session
Forward a node-local port to the gateway.
Pair with tunnel_http to reach admin interfaces bound to 127.0.0.1 on the node (Grafana, Prometheus, pprof, database HTTP gateways), or a device on the node's network. On agent nodes the node's ceiling.toml (tunnel_targets) and this connection's policy decide which addresses and ports are reachable; a refusal says so. The gateway listens on its own loopback only and closes the tunnel after 1 hour; needs fleet.admin and may need a person's approval.
| Parameter | Type | Required | Description |
|---|---|---|---|
host | string | yes | alias or node_id from list_hosts |
remote_port | integer (minimum 1, maximum 65535) | yes | remote port |
remote_host | string | no | target address as seen from the node (default "127.0.0.1") |
tunnel_http HTTP through tunnel Destructive
Send one HTTP request through an open tunnel; returns status, headers and body.
Any method goes: a POST, PUT or DELETE changes whatever the service behind the tunnel does with it. Needs fleet.admin; the body read back is cut at 32 KB by default.
| Parameter | Type | Required | Description |
|---|---|---|---|
tunnel_id | string | yes | id from tunnel_open |
path | string | no | request path (default "/") |
method | string | no | HTTP method (default "GET") |
headers | object of string (optional) | no | extra headers |
body | string (optional) | no | request body |
timeout | integer (minimum 1, maximum 120) | no | (default 20) |
tunnel_close Close tunnel Opens or closes a session
Close a tunnel; requests through it stop working. Needs fleet.admin.
| Parameter | Type | Required | Description |
|---|---|---|---|
tunnel_id | string | yes | tunnel to close |
wake_node Wake node Destructive
Wake a sleeping agent node with Wake-on-LAN, through another node of the account.
The other node must be online on the same network (same subnet, same public address) and the sleeping machine's network card set to wake on a magic packet. Powers the machine on; needs fleet.exec on it and may need a person's approval.
| Parameter | Type | Required | Description |
|---|---|---|---|
host | string | yes | a sleeping agent node (list_hosts says asleep or offline) |
wait | integer (minimum 0, maximum 180) | no | seconds to wait for it to connect (default 60) |
wake_device Wake LAN device Destructive
Wake a machine with no agent (a NAS, a PC) by Wake-on-LAN.
via sends the magic packet to the broadcast address of one of its own networks. Nothing confirms the machine woke: check it after a minute, e.g. exec ping on via. Its card must be set to wake on a magic packet. Needs fleet.exec on via and may need a person's approval.
| Parameter | Type | Required | Description |
|---|---|---|---|
via | string | yes | an online agent node on the device's LAN, e.g. the router |
mac | string | yes | the device's hardware address, aa:bb:cc:dd:ee:ff |
network | string (optional) | no | which of via's networks the device is on (192.168.1.0/24, or an address in it); needed when via is on more than one |
approval_wait Wait for approval Read-only
Wait for a person to approve or turn down a call that needs approval.
Approved: call the same tool again with exactly the same arguments; the approval is for that call, once. Turned down or expired: do not retry, ask the user instead. Read-only: it only reports the decision.
| Parameter | Type | Required | Description |
|---|---|---|---|
approval_id | string | yes | the id a call said it is waiting for |
wait_s | integer (minimum 0, maximum 60) | no | wait this long at most for a decision (default 40) |
audit_tail Audit log tail Read-only
Tail the gateway audit log: who ran what, where, when (newest last).
Read-only; needs fleet.admin; at most 500 records per call. The gateway's own records are all there; the sign-in service's may arrive up to 100 ms late.
| Parameter | Type | Required | Description |
|---|---|---|---|
limit | integer (minimum 1, maximum 500) | no | how many records (default 50) |
event | string (optional) | no | only these events: "tool", "agent" (agent.*), "console" ... |
host | string (optional) | no | only records about this host |
Schedules
schedule_create Create schedule Destructive
Run a command on a node on a schedule, e.g. a backup every night.
Every run starts the command as a detached job, with the same effects as job_start; needs fleet.exec and a plan that includes schedules. Runs under this connection: its policy, command rules and approvals apply at every run (a command that needs a person's approval asks at each run and is skipped if nobody approves). Revoking the connection stops it. Failed and missed runs are emailed to the user. Tell the user what you scheduled and when it next runs.
| Parameter | Type | Required | Description |
|---|---|---|---|
host | string | yes | alias or node_id from list_hosts |
name | string | yes | what it is, e.g. nightly backup |
cron | string | yes | five fields "minute hour day-of-month month day-of-week", e.g. "0 3 * * *" (03:00 every day), "*/15 9-17 * * 1-5", or @daily / @hourly |
command | string | yes | the command; it runs as a detached job |
tz | string | no | IANA time zone of the times, e.g. Asia/Singapore (default "UTC") |
shell | string (optional) | no | agent nodes only: sh, bash, zsh, pwsh, powershell or cmd; the node's default when omitted (host_facts lists them) |
timeout_s | integer (minimum 10, maximum 86400) | no | stop the run after this long (default 3600) |
wake | boolean | no | wake the machine first when it sleeps (Wake-on-LAN through a node on its network) (default true) |
catch_up | boolean | no | a run missed while the gateway was down runs late instead of being skipped (default false) |
confirm | boolean | no | confirm a high-risk command (default false) |
schedule_list List schedules Read-only
List the schedules this connection made, with their next and last run.
schedule_delete Delete schedule Destructive
Remove a schedule this connection made; no further runs, a run in progress finishes.
| Parameter | Type | Required | Description |
|---|---|---|---|
schedule_id | string | yes | from schedule_create or schedule_list |
schedule_runs Schedule run history Read-only
List a schedule's recent runs: when, how (woken?), exit code, the end of the output.
Also says why a run failed, was missed or skipped. Read-only.
| Parameter | Type | Required | Description |
|---|---|---|---|
schedule_id | string | yes | from schedule_create or schedule_list |
limit | integer (minimum 1, maximum 50) | no | most recent first (default 5) |
Web shares
Terminals
terminal_open Open terminal Destructive
Open an interactive terminal (a shell on a pseudo-terminal) on a node.
For programs that need one: prompts that ask, menus, sign-ins (gh auth login), REPLs, top, less. Prefer exec or shell_run for plain commands. Give command= to start one right away. Type with terminal_send, close with terminal_close. Starts a shell, and with command= runs that command at once (command rules and approvals apply as for exec); needs fleet.exec; at most 8 terminals per connection; refused when the command rules are an allowlist.
Each answer has the output since the last call and, when the program looks like it asks something, waiting_for: {kind: choice | confirm | password | device_code | text, prompt, ...} with how to answer.
| Parameter | Type | Required | Description |
|---|---|---|---|
host | string | yes | alias or node_id: an agent node (Linux, macOS, Windows) or an SSH node |
cols | integer (minimum 20, maximum 500) | no | width (default 120) |
rows | integer (minimum 5, maximum 200) | no | height (default 40) |
shell | string (optional) | no | sh, bash or zsh; pwsh, powershell or cmd on Windows; the node's default when omitted (bash over SSH, PowerShell on Windows) |
cwd | string (optional) | no | working directory |
command | string (optional) | no | typed at the prompt once it shows, as terminal_send would (enter included) |
until | string (optional) | no | wait until this shows up in the output (any case), or regex:<expression>; the call returns once it does, when the terminal ends, when the program stops to ask something else, or after wait_ms (up to 10 minutes); with command |
wait_ms | integer (minimum 0, maximum 600000) | no | how long to wait for the prompt (for the command's output with command) (default 3000) |
confirm | boolean | no | confirm a high-risk command (default false) |
terminal_send Type into terminal Destructive
Type into a terminal and return what it printed since the last call.
Returns once the output stops with the cursor after a prompt (or a menu) on screen, or with until once that text shows up. waiting_for says what the program asks, if it asks. Keystrokes act as typed (enter runs a command, ctrl+c interrupts); typed text passes the command rules and approvals; needs fleet.exec.
| Parameter | Type | Required | Description |
|---|---|---|---|
terminal_id | string | yes | from terminal_open |
text | string (optional) | no | typed as is; end a command with keys=["enter"] or \r |
keys | array of string (optional) | no | pressed after the text, in order: enter, tab, escape, backspace, up, down, left, right, home, end, pageup, pagedown, delete, f1-f12, ctrl+c, ctrl+d, alt+x |
until | string (optional) | no | wait until this shows up in the output (any case), or regex:<expression>; the call returns once it does, when the terminal ends, when the program stops to ask something else, or after wait_ms (up to 10 minutes) |
wait_ms | integer (minimum 0, maximum 600000) | no | wait this long at most: for the output to stop with a prompt on screen, or for until (default 3000) |
confirm | boolean | no | confirm a high-risk command (default false) |
terminal_read Read terminal output Read-only
Show what a terminal printed since the last call, without typing.
With until, wait for it: a sign-in finishing, a build printing "done". Read-only; needs fleet.read.
| Parameter | Type | Required | Description |
|---|---|---|---|
terminal_id | string | yes | from terminal_open |
until | string (optional) | no | wait until this shows up in the output (any case), or regex:<expression>; the call returns once it does, when the terminal ends, when the program stops to ask something else, or after wait_ms (up to 10 minutes) |
wait_ms | integer (minimum 0, maximum 600000) | no | wait this long at most for output (for until) (default 0) |
terminal_ask Ask person to type Destructive
Hand the program's next answer to the person who connected you.
A password, a passphrase, a one-time code, anything that should not pass through the conversation. They get a notification (phone, email) and type it in the LetKite console; it goes into the terminal followed by enter. You get what the program printed after it and how many characters were typed, never the text (masked if the program shows it). Needs fleet.exec.
Waits for them up to wait_ms, sending progress meanwhile; if they have not answered by then, call terminal_ask again to keep waiting for the same request (it stays open 15 minutes). Tell the user in the conversation that the console is waiting for them.
| Parameter | Type | Required | Description |
|---|---|---|---|
terminal_id | string | yes | from terminal_open |
prompt | string (maxLength 300) (optional) | no | what to tell the person, when the program's own prompt does not say it |
until | string (optional) | no | wait until this shows up in the output (any case), or regex:<expression>; the call returns once it does, when the terminal ends, when the program stops to ask something else, or after wait_ms (up to 10 minutes); after the answer |
wait_ms | integer (minimum 1000, maximum 600000) | no | how long to wait for the person (then for the output) (default 300000) |
terminal_resize Resize terminal Opens or closes a session
Change a terminal's size; full-screen programs redraw.
| Parameter | Type | Required | Description |
|---|---|---|---|
terminal_id | string | yes | from terminal_open |
cols | integer (minimum 20, maximum 500) | yes | width |
rows | integer (minimum 5, maximum 200) | yes | height |
terminal_close Close terminal Destructive
Close a terminal; its shell and what runs in it end. Needs fleet.exec.
| Parameter | Type | Required | Description |
|---|---|---|---|
terminal_id | string | yes | from terminal_open |
Screen
gui_observe Observe screen Read-only
Listed only when the connection's policy turns the screen tools on.
Look at a window on an agent node (Windows), or the whole screen: who and what is on it.
The tree lists elements with short ids (e3) to use in gui_act; prefer it to images, which cost far more context. The first line says whether the desktop is active, locked or taken over at the machine. Read-only: nothing on the desktop changes; needs the connection's gui level observe or act.
| Parameter | Type | Required | Description |
|---|---|---|---|
host | string | yes | alias or node_id of an agent node (list_hosts) |
window | string (optional) | no | window id from a previous gui_observe (w1); default: the focused window |
app | string (optional) | no | or the app whose window to use, as the window list names it |
screen | boolean | no | or the whole screen, every display: a picture only, and only for a connection that may see every app; a point in it works in gui_act on the window there (default false) |
mode | string | no | tree: the accessibility tree, cheapest (default); text: OCR words with positions, for canvases and remote desktops; image: a screenshot; marks: both (default "tree") |
region | array of integer (optional) | no | [x, y, width, height] in screen pixels: only this part |
tree_root | string (optional) | no | only this element's subtree, e.g. the next page of a long list |
child_offset | integer (minimum 0) | no | with tree_root: from this child on (default 0) |
max_nodes | integer (minimum 10, maximum 2000) (optional) | no | elements at most |
include_text | boolean | no | also static text elements (default false) |
last_image_id | string (optional) | no | image id you already have: if nothing changed, no new image is sent |
max_long_edge | integer (minimum 200, maximum 2576) (optional) | no | image size limit, pixels |
gui_zoom Zoom into screen Read-only
Listed only when the connection's policy turns the screen tools on.
Capture part of a window (or of the screen) at its own resolution, to read small text.
Read-only; same permission as gui_observe.
| Parameter | Type | Required | Description |
|---|---|---|---|
host | string | yes | alias or node_id of an agent node (list_hosts) |
region | array of integer | yes | [x, y, width, height] in screen pixels |
window | string (optional) | no | window id from a previous gui_observe (w1); default: the focused window |
app | string (optional) | no | or the app whose window to use, as the window list names it |
screen | boolean | no | or the whole screen, every display: a picture only, and only for a connection that may see every app; a point in it works in gui_act on the window there (default false) |
gui_act Act on screen Destructive
Listed only when the connection's policy turns the screen tools on.
Click, type and press keys in a window on an agent node, by element ids from gui_observe.
Points in an image gui_observe sent work too. This acts as a person at the machine would: whatever a click or keystroke does (send, delete, close) happens. Needs the connection's gui level act and may need a person's approval.
Batch the steps of one task; waiting happens on the node ({"wait": ..}), so there is no need to observe in between. Returns what changed.
| Parameter | Type | Required | Description |
|---|---|---|---|
host | string | yes | alias or node_id of an agent node (list_hosts) |
steps | array of object | yes | run in order on the node, stopping at the first that fails: {"click": "e3"} (or "double_click", "right_click"; "button", "count", "modifiers"), {"click": {"image": "i2", "x": 40, "y": 12}}, {"type": "text", "into": "e2", "replace": true}, {"key": "ctrl+s", "repeat": 1}, {"scroll": "e4", "dy": 3} (or "until_visible": "e40"), {"drag": "e10", "to": "e20"}, {"set_value": "e2", "value": "x"}, {"focus": "w2"}, {"launch": "app", "args": []}, {"close": "w2"} (or true: the target window; as its close button does), {"wait": {"appears": "e7"}} (or {"role": "dialog", "name": "Save"}; "disappears", "title": "regex", "stable_ms": 500; "timeout_ms") |
window | string (optional) | no | window id from a previous gui_observe (w1); default: the focused window |
app | string (optional) | no | or the app whose window to use, as the window list names it |
observe | string | no | what to return afterwards: delta (what changed, default), tree, image or none (default "delta") |
base_snapshot | string (optional) | no | the delta is against this snapshot; default: the latest |
timeout | integer (minimum 1, maximum 300) | no | seconds for all steps (default 60) |