Skip to content

Tool Reference

Claude edited this page Jun 30, 2026 · 1 revision

Tool Reference

All 53 tools. Every tool returns a JSON string: {"ok": true, ...} on success or {"ok": false, "error": "..."} on failure. * marks required parameters. Platform: X = cross-platform, W = Windows-only, L = Linux-only.

On Windows hwnd is an HWND; on Linux it is an X11 window id.

Contents


Mouse & keyboard (X)

get_screen_size

No params → {ok, width, height}.

get_cursor_position

No params → {ok, x, y}.

mouse_move

*x, *y (screen px); duration 0–10 (default 0). → {ok, x, y}.

mouse_click

x, y (screen px foreground; client coords in background mode; omit to click at cursor), button left|right|middle, clicks 1–5 (2 = double), interval, hwnd/window_title (background target), display (Linux). Background click needs explicit x/y. → {ok, ...} (background adds mode:"background").

mouse_drag

start_x/start_y (omit = current), *end_x, *end_y, button, duration (default 0.25). → {ok, end_x, end_y, button}.

mouse_scroll

*amount (+up/−down), x, y. → {ok, scrolled}.

type_text

*text, interval 0–2, hwnd/window_title (background WM_CHAR / XSendEvent), display (Linux). → {ok, typed_chars}. For edit controls prefer win_set_control_text.

press_keys

*keys list 1–6 (pyautogui names). One = single key; many = combo. e.g. ["ctrl","c"], ["alt","tab"], ["f5"]. → {ok, keys}.


Shell (X)

run_command (destructive)

*command, shell (default true), cwd, timeout 1–3600 (default 60). → {ok, returncode, stdout, stderr, timed_out}.


Window management (X)

list_windows

title_filter, include_empty_titles (default false). → {ok, count, windows:[{title, handle, left, top, width, height, is_minimized, is_maximized, is_active}]}.

get_active_window

No params → {ok, window|null}.

move_window

*x, *y, title/handle, display (Linux). → {ok, window}.

resize_window

*width, *height, title/handle, display (Linux). → {ok, window}.

window_action (destructive on close)

*action focus|minimize|maximize|restore|close, title/handle, display. Linux maximize needs wmctrl. → {ok, action, window}.

show_window

hwnd/window_title, display. Restores + shows + foregrounds (use before a login). → {ok, hwnd, visible:true}.

hide_window

hwnd/window_title, minimize (default false), display. → {ok, hwnd, visible:false}.


Background / unfocused targeting

See Background Targeting for the full workflow.

list_child_windows

hwnd/window_title, display. → {ok, parent_hwnd, count, children:[{handle, class, text, left, top, width, height, visible}]} (coords relative to the parent).

win_set_control_text

*text, hwnd (the control, preferred)/window_title, display. Windows: WM_SETTEXT (most reliable); Linux: select-all + delete + type. → {ok, target_hwnd, text_len}.

win_send_keys

*keys list 1–6, hwnd/window_title, display. Posts keys without focus; modifier combos unreliable via messages. → {ok, window_hwnd, keys}.


Processes (X)

list_processes

name_filter, sort_by memory|cpu|name|pid (default memory), limit 1–1000 (default 50). → {ok, count, processes:[{pid, name, username, memory_mb, cpu_percent}]}.

kill_process (destructive)

pid or name (kills ALL by exact name), force (default false). → {ok, killed, count}.


Screenshots & images

screenshot

monitor (0=all, 1=primary, …), region [left,top,width,height], output_path, hwnd/window_title (single-window capture — PrintWindow on Windows, ImageMagick on Linux), client_only (default false), display (Linux). → {ok, path, width, height}.

crop_image

*input_path, *left, *top, *width, *height, output_path. → {ok, path, width, height}.


Screen recording (X)

start_screen_recording

fps 1–60 (default 15), monitor (default 1), region, output_path. One at a time. → {ok, path, fps, recording:true}.

stop_screen_recording

No params → {ok, path, frames, duration_seconds}.

recording_status

No params → {ok, recording, path, frames, elapsed_seconds}.


Headless desktop — Windows (W)

See Headless GUI.

create_headless_desktop

name (default "LowLevelCUHeadless"). → {ok, name, handle, full}.

launch_on_headless_desktop (destructive)

name, *command. → {ok, desktop, pid, command}.

list_headless_windows

name. → {ok, name, count, windows}.

close_headless_desktop (destructive)

name. → {ok, name, closed}.

show_headless_desktop

name — switch the live screen to this off-screen desktop (for a login).

hide_headless_desktop

name — switch back to the normal desktop.


Virtual display — Linux (L)

See Linux Support.

linux_status

No params → {ok, display, session_type, xdotool, wmctrl, xvfb, imagemagick_import, scrot}.

create_virtual_display

display (default 99), width (1280), height (800), depth (24). Starts Xvfb.

launch_on_virtual_display (destructive)

display, *command. → {ok, display, pid, command}.

list_virtual_display_windows

display. → {ok, display, count, windows}.

screenshot_virtual_display

display, output_path. → {ok, path, width, height, display}.

stop_virtual_display (destructive)

display. Terminates apps + Xvfb.

Pass display to mouse_click/type_text/screenshot/win_send_keys to drive windows on a virtual display.


AutoHotkey (W)

See AutoHotkey.

ahk_status

No params → {ok, installed, path?, version?, hint?}.

run_ahk (destructive)

*code (must call ExitApp), args, timeout (default 60), exe_path. Output via FileAppend ..., "*". → {ok, returncode, stdout, stderr, exe}.

ahk_control_send

*text, *window ("ahk_id <hwnd>", "ahk_exe app.exe", or title), control (blank = focused), as_keys, timeout. → AHK result.


Ephemeral WSL (W)

See WSL.

wsl_status

No params → {ok, available, version?, reason?}.

wsl_list_distros

No params → {ok, count, distros:[{name, state, version, default}]}.

wsl_create_temp

name (auto), rootfs_url (default latest Alpine minirootfs), clone_from, base_tar, timeout (default 1800). → {ok, name, install_dir, source, version}.

wsl_run (destructive)

*distro, *command, user, cwd, timeout. → {ok, distro, returncode, stdout, stderr}.

wsl_list_temp

No params → {ok, count, distros}.

wsl_destroy (destructive — irreversible)

*name, remove_files (default true). → {ok, name, destroyed:true}.

wsl_destroy_all_temp (destructive)

No params → {ok, destroyed, count}.


Run-as-admin & boot (W)

See Run as Admin and Boot Startup.

is_admin

No params → {ok, is_admin, platform}.

run_command_as_admin (destructive)

*command, timeout (default 120). UAC prompt if not elevated. → {ok, returncode, output, elevated_prompt}.

install_startup (destructive)

run_as_admin (default true), http (default true), host (127.0.0.1), port (8765). → {ok, task_name, run_as_admin, mode, endpoint, output}.

uninstall_startup (destructive)

No params → {ok, task_name, output}.

startup_status

No params → {ok, installed, details, task_name}.

Clone this wiki locally