Control service tools
malac-control serves two tool sets over MCP. malac adds them without a server prefix. Tools marked read-only are Safe and never need approval; the others are Execute tools and follow your permission mode.
Each set can be turned off in ~/.malac/control.toml with computer.enabled = false or browser.enabled = false.
Computer
Section titled “Computer”Desktop control: screenshots, mouse and keyboard. Take a computer_screenshot first: every x/y argument is a pixel position in the most recent screenshot of that display.
| Tool | Read-only | What it does |
|---|---|---|
computer_screenshot |
yes | Capture a display |
computer_click |
Click at a point of the latest screenshot | |
computer_move |
Move the mouse pointer to a point | |
computer_drag |
Press the left button at from, move to to and release |
|
computer_scroll |
Turn the mouse wheel, after moving to (x, y) when given |
|
computer_type |
Type text into the focused element | |
computer_key |
Press a key or combination | |
computer_cursor_position |
yes | Report the pointer position in screenshot pixels |
computer_displays |
yes | List displays with index, logical bounds and scale factor |
computer_open_app |
Open an application by name or path | |
computer_wait |
yes | Wait before the next action |
computer_permissions |
yes | Report the macOS Screen Recording and Accessibility state and the app holding them; with request, show the system prompts |
Arguments
Section titled “Arguments”| Tool | Arguments |
|---|---|
computer_screenshot |
display, format (jpeg (default) or png) |
computer_click |
x, y (required), button (left (default), right, middle), count (1 to 3; 2 is a double click), display |
computer_move |
x, y (required), display |
computer_drag |
from, to (required, each {x, y}), display |
computer_scroll |
x, y, dx, dy (wheel notches; positive dy scrolls down, positive dx scrolls right), display |
computer_type |
text (required) |
computer_key |
key (required), such as enter, escape, f5, ctrl+c or cmd+shift+t. cmd, super, meta and win are the same modifier. |
computer_open_app |
name (required), such as Safari on macOS or firefox on Linux |
computer_wait |
seconds (required, 0 to 30) |
computer_permissions |
request (ask macOS for missing permissions and open System Settings) |
display is an index from computer_displays. It defaults to the display of the latest screenshot, else the primary display. Screenshots wider than computer.max_screenshot_width (default 1366) are scaled down.
On macOS these tools need the Screen Recording and Accessibility permissions; computer_permissions checks them. See macOS permissions.
Browser
Section titled “Browser”Chromium-based browser automation over the DevTools protocol. Load a page with browser_navigate, then read it with browser_snapshot: it tags interactive elements with refs such as [12], which browser_click and browser_type accept as ref.
Every browser tool takes an optional profile (default default); most also take an optional tab, a tab id or unique prefix from browser_tabs, defaulting to the tab used last.
| Tool | Read-only | What it does |
|---|---|---|
browser_profiles |
yes | List profiles, whether each is running, and the system profiles that can be cloned |
browser_open |
Launch the profile’s browser (or attach, for a cdp_url profile), optionally load a URL, list the tabs |
|
browser_tabs |
yes | List the open tabs of a running profile; the current tab is marked * |
browser_new_tab |
Open a new tab, optionally loading a URL, and make it current | |
browser_navigate |
Load a URL in a tab and wait for it; launches the browser if needed | |
browser_back |
Go back one page in a tab’s history | |
browser_snapshot |
yes | Outline the page as text: title, URL, headings, visible text and interactive elements with refs |
browser_click |
Click an element or a viewport point with real mouse events | |
browser_type |
Type into an element or the focused element; on a <select>, pick the matching option |
|
browser_press |
Press a key or combination in a tab | |
browser_scroll |
Scroll with the mouse wheel, or scroll an element into view | |
browser_screenshot |
yes | Capture the viewport, or the whole page, as a JPEG in CSS pixels |
browser_eval |
Evaluate JavaScript in the page like the DevTools console, awaiting promises | |
browser_wait |
yes | Wait for text or a selector to appear, or for a number of milliseconds |
browser_close_tab |
Close a tab | |
browser_close |
Close the profile’s browser; attached browsers are only disconnected |
Targets
Section titled “Targets”browser_click, browser_type and browser_scroll aim at one of:
ref: an element ref frombrowser_snapshot, such as12(also accepted as"12"or"[12]"),selector: a CSS selector,xandy: a viewport point in CSS pixels, as inbrowser_screenshot.
Pass only one of them.
Arguments
Section titled “Arguments”| Tool | Arguments |
|---|---|
browser_open |
profile, url |
browser_tabs |
profile |
browser_new_tab |
profile, url |
browser_navigate |
url (required), profile, tab |
browser_click |
target, button (left, right, middle), count (1 to 3), profile, tab |
browser_type |
text (required), target, clear (replace the current content), submit (press Enter afterwards), profile, tab |
browser_press |
key (required), such as Enter, Escape, ArrowDown, Tab or ctrl+a, profile, tab |
browser_scroll |
target, dx, dy (CSS pixels), profile, tab. With only a ref or selector, scrolls it into view; without arguments, scrolls down most of a viewport. |
browser_screenshot |
full_page, profile, tab |
browser_eval |
expression (required), profile, tab |
browser_wait |
text, selector, ms, timeout (seconds for text or selector, default 10, at most 60), profile, tab |
browser_back, browser_snapshot, browser_close_tab |
profile, tab |
browser_profiles |
none |
browser_close |
profile |
Permission rules
Section titled “Permission rules”Rules match these tools by name:
[permissions]allow = ["browser_*"] # let the agent drive browsers freelydeny = ["browser_eval", "computer_*"] # but no JavaScript and no desktopmalac is created by lobirus and released under the MIT license. About malac