Tools Reference

Contents

Tools Reference#

All tools share the same interface: await tool.execute(ctx, params) -> ToolResult.

Tool priority rule: scripts / APIs when no visual interaction is needed → ui → screenshot(marks=True) → mouse with image dimensions.

Tool

Kind

Description

script

acts

Run a script or API call when the task needs no GUI

ui

acts

Accessibility-based UI interaction — click by name, type, read values

screenshot

read-only

Screen capture with optional Set-of-Marks overlay

mouse

acts

Pixel-level mouse control with HiDPI coordinate translation

keyboard

acts

Type text, press keys, send hotkeys

app

acts

Open, close, focus, and list applications

clipboard

changes state

Read and write clipboard text

ocr

read-only

Extract text from any screen region

browser

acts

Drive a web browser through its automation interface

audit

acts (replay)

Read the session audit log, replay a session

learn

acts

Record and replay desktop workflows

schedule

acts

Run a task or learned workflow on a timer (see Scheduler)

memory

read-only

Screen memory — search a local, OCR’d history of what was on screen

memory_manage

acts

Pause / resume capture, deny list, config, delete history

fleet

acts

Run a task across several paired machines

Kind mirrors the MCP annotations each tool declares: read-only tools set readOnlyHint: true; acts tools set destructiveHint: true because they change the desktop or stored data; clipboard changes state but is marked non-destructive. Every tool also has a human-readable title. MCP clients use these hints to decide what to confirm with you. The peer admin tools (opendesk_*) are listed in MCP.


ToolResult#

All tools return:

@dataclass
class ToolResult:
    title: str           # short human-readable label
    output: str          # text returned to the LLM
    error: bool          # True if the action failed
    attachments: list[Attachment]  # binary files (screenshots, etc.)
    metadata: dict       # extra data for programmatic consumers

Attachment:

@dataclass
class Attachment:
    filename: str
    content: bytes
    media_type: str      # e.g. "image/png"

    def to_base64(self) -> str: ...

Start with the primary interaction tool: ui →