MCP
MCP tools
The tools the Revyl MCP server exposes, by tool profile and category.
The Revyl MCP server exposes tools across the following categories. Device action tools use grounded targeting by default -- describe the element in natural language (target="Sign In button") and coordinates are resolved automatically. You can also pass raw x, y as an override.
Tool profiles
The tools below are the flat set that revyl mcp serve registers with no
--tool-profile. Tool profiles expose fewer, grouped tools:
dev(recommended in MCP setup): focused setup, dev-loop, and device tools, with sessions underdevice_sessionand itsaction.core: the device tools,start_dev_loop,manage_tests,manage_builds,manage_persistent_computers(Persistent computers), and the agent run tools. Amanage_tool'sactionpicks the operation andparamstakes that flat tool's inputs; for example,manage_testswith actionruntakesrun_test's inputs inparams.full:coreplusmanage_workflowsand the module, script, tag, file, and variable tools.
Test files from Git
In a project whose .revyl/config.yaml sets
run_test_definitions_from_git: true, run_test and run_workflow send the
checkout's test, module and script files, uncommitted changes included, the way
revyl test run does. The checkout is project_dir, else REVYL_PROJECT_DIR,
else the directory the MCP server runs in.
Test definitions from Git
explains which files each kind of run uses.
from_checkoutset tofalsesends no files, so the run reads Git at the head of its branch. Set totrue, it sends the checkout's files in a project without the setting.- Results add
test_definition_summary, the textrevyl test runprints afterDefinition:, and the fields What a run shows lists, withtest_definition_warningsfor problems with the files the call sent. update_testchanges only the saved copy a run falls back to, and itsnoticesays so.
Session profiles
start_device_session and start_dev_loop take session_profile: the name of
a session profile in the project's
.revyl/config.yaml to run before the session starts, or none to start
without the project's default. Without it, the default profile runs. Both
return the profile the session started with as session_profile. On an iOS or
Android start_device_session, app_link replaces the profile's deep link.
In dev, device_session with action start runs the default profile and
takes no session_profile. To pick another profile there, use
start_dev_loop for iOS and Android; for web, use start_device_session,
which the core and full tool profiles and the flat set register.
Branch and build inputs
MCP inputs name the build choice with build_selection. See
How a run picks its build for the
model.
build_selection | Choice | Runs |
|---|---|---|
inherit (default) | Automatic | The branch's default build: its pinned build, or else its newest |
latest | Latest build | The branch's newest build, even when it's pinned |
latest_all_branches | All branches · Latest build | The newest build on any of the app's branches; takes no branch |
pinned | Exact build | The build ID you pass |
- A choice passed to one call overrides the saved one for that call only. It never saves a default or pins a branch.
- On Default branch, with no branch passed or saved, tools try the Git
branch of
project_dirorREVYL_PROJECT_DIRfirst when the app's automatic Git branch detection is enabled, then the app's default branch. With detection off, they use the app default directly; see MCP setup. Only the Git branch falls back; a branch you name or save, or a pinned or exact build that's no longer available, fails. - Run and session results name what ran:
branch_name,build_id,build_version,branch_source(git_branch,explicit_branch, ordefault_branch).auto_git_branch_enabled: falsewithdefault_branchmeans automatic detection was off. With detection enabled,git_branch_namenames the Git branch consulted; combined withdefault_branch, it means that branch couldn't be used.git_branch_nameis absent when the call didn't consult a Git branch.
In core and full, the test, build, and workflow tools below are actions of
manage_tests, manage_builds, and manage_workflows, such as run_test as
manage_tests action run. In dev, device_session with action start takes
start_device_session's branch and build inputs.
| Tool | Branch and build inputs |
|---|---|
start_device_session, install_app | app_id, branch_name, build_selection, or exact build_version_id, plus project_dir. |
start_dev_loop | branch_name, build_selection (not latest_all_branches), or exact build_version_id. The dev loop keeps its branch for rebuilds. |
run_test | branch_id or branch_name, build_selection, or exact build_version_id. Without them, the test's saved choice. |
create_test, update_test | branch_id or branch_name, build_selection, pinned_build_id. Without them, the YAML's test.build; with neither, create saves Default branch and update keeps the saved choice. inherit with no IDs saves Default branch. |
upload_build | branch_id, or branch_name (created if missing). Without one, the Git branch of project_dir or REVYL_PROJECT_DIR when available and the app's automatic Git branch detection is enabled (created if missing), otherwise the app's default branch. Never pins. Results include branch_id, branch_name, and version_id. |
list_builds | With app_id, builds on every branch in versions; branch_id or branch_name narrows to one. Without app_id, app summaries in builds. |
run_workflow | branch_name and build_selection (inherit, latest, or latest_all_branches) for every app in the run, or exact ios_build_id / android_build_id with the matching app. |
set_workflow_app | ios_app_id with ios_branch_id or ios_branch_name, ios_build_selection, and ios_pinned_build_id; the same android_* fields. inherit with no IDs saves Default branch for that platform. |
start_dev_loop takes the named build profile as build_profile. Its old
name, profile, still works and adds a warning to the result.
If you pass a branch and an exact build, the build must belong to that branch. MCP tools can't rename or pin branches or set the default branch; use the CLI or the dashboard (Manage branches).
Device Session
| Tool | Description |
|---|---|
start_device_session | Start a Web, iOS, or Android session; returns its session_id |
stop_device_session | Stop a device session |
get_session_info | Get session details including viewer URL, device model, and OS version |
list_device_sessions | List all active sessions with their session_id and index |
switch_device_session | Switch the active session by index |
Targeting a Session
Create a Web app with create_app(name="My Web App", platform="web").
Then start_device_session(platform="web", app_id="YOUR_WEB_APP_ID")
selects the app's latest build. Pass build_version_id to select a specific
URL or managed bundle build, or url="https://example.com/" to create or reuse a URL build before starting.
Web always requires app_id; session start takes no project input. Managed
bundles run in an isolated app container beside Chrome. viewport accepts width, height, and
device_scale_factor. Use device_type(text_env="PASSWORD_ENV_NAME", ...) for
private password input without putting its value in tool arguments, output, or
session reports.
Every tool that acts on a device session accepts an optional session_id next to session_index. Pass the session_id that start_device_session or list_device_sessions returned whenever more than one session may be live, for example when several agents share one MCP server:
session_idselects exactly that session and never falls back to the active one. It also works for a session this server did not start or list. Such a session has no local index, so:get_session_infoomitssession_index.- Phone screenshots return no
screen_token; Web screenshots retain their local observation token. - On phones,
interactcan't ground a drag between two targets; describe the drag withstrategy="instruction"instead.
interactkeeps every step on the session it started with. If that session ends partway through, the call fails instead of moving to another device.- If you pass both and
session_indexnames a different session, the call fails with an error that names both targets. - With neither, tools use the active session, as before.
get_session_report(session_id=...)also works after the session has ended.
Device Actions
| Tool | Description |
|---|---|
device_tap | Tap an element by target or coordinates |
device_double_tap | Double-tap an element |
device_long_press | Long press with configurable duration |
device_type | Type text into a field |
device_swipe | Swipe in a direction from a target or point |
device_scroll | Web: scroll by a bounded pixel amount, optionally at a target or point |
device_select | Web: choose an enabled native select option by its exact label |
device_drag | Drag from one point to another |
device_pinch | Pinch/zoom gesture |
device_clear_text | Clear text in a field |
Device Controls
| Tool | Description |
|---|---|
device_wait | Wait for a fixed duration |
device_back | Android back button |
device_key | Press a named key or keyboard shortcut (physical iPhones: Enter/Backspace only) |
device_shake | Trigger shake gesture |
device_go_home | Return to home screen |
device_kill_app | Kill the current app |
device_open_app | Open a system app by name |
device_navigate | Open a URL or deep link |
device_set_location | Set GPS coordinates |
device_set_fold_state | Fold or unfold a running multi-display iOS device |
device_set_orientation | Rotate a running iOS or Android device |
device_download_file | Download a file to device storage |
device_set_fold_state(fold_state="folded", session_id="YOUR_SESSION_ID")
accepts exactly folded or unfolded. It is available in the local core and
full profiles and requires a multi-display iOS device (currently iPhone Duo).
It accepts session_index or the active session when no selector is supplied;
An explicit session_id never falls back to another session. If both selectors
are supplied, they must identify the same session.
No YAML test is created or saved. The result reports success: true and
fold_state only after worker confirmation, with a screenshot next step.
Unsupported devices and worker failures return success: false with an error.
Requests use the standard 30-second timeout and are never automatically retried.
If completion is unconfirmed, inspect the same session before another fold action.
device_set_orientation(orientation="landscape", session_id="YOUR_SESSION_ID")
rotates a running iOS or Android device without restarting the session. iOS
takes portrait or landscape; an Android device that supports exact rotation
also takes landscape_left, landscape_right, or upside_down. It is
available in the local core and full profiles and selects the session like
device_set_fold_state. start_device_session takes orientation for the
first orientation and, on an iPhone Duo, fold_state to start folded or
unfolded before the app launches.
Screen Recording
| Tool | Description |
|---|---|
device_record_start | Start an on-demand recording of a running iOS or Android session |
device_record_stop | Stop it and save just that span as an MP4 on this machine |
device_record_start(session_id="YOUR_SESSION_ID") returns a recording_id.
device_record_stop() saves the MP4 under .revyl/mcp/recordings in the
working directory, or at output_path, and returns path, size_bytes,
duration_seconds and limit_reached. Without recording_id it stops the
recording last started from the same directory on that session. The session
keeps running, so start and stop can repeat, one recording at a time. A
recording stops on its own after 180 seconds or about 160 MiB (the busiest iOS
screens reach the size limit after about a minute), and stopping the session discards one
that was not stopped. The full-session recording is unchanged. Both tools are
in the local core and full profiles, are never retried automatically, and
return success: false with an error on Web sessions, physical iPhones and
device workers that predate on-demand recording.
For keyboard checks, use device_key(key="Escape"), device_key(key="Tab"),
device_key(key="Enter"), or a chord such as device_key(key="Shift+Tab") or
device_key(key="Meta+K"). Named keys are Enter (Return), Backspace, Tab,
Escape (Esc), Delete, Space, ArrowUp/Down/Left/Right, Home, End, PageUp, and
PageDown. Chords accept distinct Ctrl, Alt, Meta, or Shift modifiers and one
named key or ASCII letter/digit. Bare letters/digits and function keys are
rejected. iOS simulators and Android emulators take the same keys and chords as
a hardware keyboard (Meta is Command and Alt is Option on iOS); a bare Delete
there keeps its Backspace alias. Physical iPhones accept only Enter and Backspace.
device_scroll(direction="down", amount=600) scrolls toward later content;
directions are up/down/left/right and amount is 1–16384 pixels (default 600).
Optionally pass target or paired x/y; with neither it uses the viewport
center. Web device_swipe uses these page directions, while native iOS and
Android swipes retain finger-motion directions. device_select(option_label="Canada", target="Country") matches one enabled native HTML select option by its exact
label, not value attribute; desktop Web opens Chromium's in-page picker so the
option tap does not reach the page underneath.
Custom dropdowns need normal taps or keys. Both tools refuse phone sessions
without sending an action. All three tools accept session_id/session_index;
scroll and select also accept an optional screenshot screen_token.
Live Steps
| Tool | Description |
|---|---|
device_instruction | Execute one instruction step (natural-language action) |
device_validation | Execute one validation step (assertion) |
device_extract | Execute one extract step (data extraction) |
device_code_execution | Execute one code execution step by script ID |
Vision
| Tool | Description |
|---|---|
screenshot | Capture a screenshot of the current screen |
App Management
| Tool | Description |
|---|---|
install_app | Install a selected app/branch build, an exact build, or a URL artifact; clean: true uninstalls the app first so it starts with fresh data |
device_uninstall_app | Uninstall an app and delete its data; omit bundle_id for the session app |
device_set_permissions | Allow, deny, or reset an app's OS permissions before it launches, so its permission prompts don't appear |
launch_app | Launch an app; omit bundle_id to launch the app the session installed. launch_env (an object of string values) and, on iOS, launch_arguments (a list of tokens) restart the app with non-secret launch values for that launch only; the next call without them goes back to the session's values |
Diagnostics
| Tool | Description |
|---|---|
device_doctor | Run diagnostics on auth, session, worker, and device health, and report environment info |
auth_status | Check authentication status and user info |
get_billing_status | Read plan, card, free minutes, devices at once, usage, credit, auto-recharge, any monthly limit, and rates |
Test Management
| Tool | Description |
|---|---|
run_test | Run a test by name or ID |
create_test | Create a new test from YAML content |
update_test | Update an existing test's YAML content |
delete_test | Delete a test by name or ID |
list_tests | List tests from .revyl/config.yaml |
list_remote_tests | List all tests in the organization |
get_test_status | Get the status of a running or completed test |
cancel_test | Cancel a running test by task ID |
get_schema | Get the CLI command and YAML test schema |
Workflow Management
| Tool | Description |
|---|---|
run_workflow | Run a workflow by name or ID |
create_workflow | Create a new workflow |
delete_workflow | Delete a workflow by name or ID |
list_workflows | List all workflows in the organization |
cancel_workflow | Cancel a running workflow by task ID |
open_workflow_editor | Get the URL to the workflow browser editor |
add_tests_to_workflow | Add tests to a workflow |
remove_tests_from_workflow | Remove tests from a workflow |
get_workflow_settings | Get workflow location and app overrides |
set_workflow_location | Set GPS location override for a workflow |
clear_workflow_location | Remove GPS location override |
set_workflow_app | Set app overrides per platform |
clear_workflow_app | Remove app overrides |
Module Management
| Tool | Description |
|---|---|
list_modules | List reusable test modules |
get_module | Get module details and blocks |
create_module | Create a module from blocks |
delete_module | Delete a module (fails if in use) |
insert_module_block | Get a module_import YAML snippet for a module |
Tag Management
| Tool | Description |
|---|---|
list_tags | List all tags with test counts |
create_tag | Create a tag (upsert) |
delete_tag | Delete a tag from all tests |
get_test_tags | Get tags for a specific test |
set_test_tags | Replace all tags on a test |
add_remove_test_tags | Add/remove tags without replacing |
Variables and Environment
| Tool | Description |
|---|---|
list_variables | List test variables ({{name}} syntax in steps) |
set_variable | Add or update a test variable |
delete_variable | Delete a test variable |
delete_all_variables | Delete all test variables |
Build Management
| Tool | Description |
|---|---|
list_builds | List app summaries; with app_id, list builds across all branches, or on branch_id or branch_name |
upload_build | Upload a build file to an app |
create_app | Create a new app for build uploads |
delete_app | Delete an app and all its build versions |
Script Management
| Tool | Description |
|---|---|
list_scripts | List code execution scripts |
get_script | Get script details and source code |
create_script | Create a new script |
Dev Loop
| Tool | Description |
|---|---|
start_dev_loop | Start an Expo hot-reload dev loop |
stop_dev_loop | Stop the active dev loop |
Agent runs
These tools hand work to Revyl's agent and follow it. They're in the flat set
and the core and full profiles, not in dev. Each run is an agent run as
the Agent runs reference describes, and each tool
returns the same run object and lists that revyl agent --json prints.
| Tool | Description |
|---|---|
run_agent | Start a turn of Revyl's agent and return the run as soon as Revyl accepts it, without waiting. With agent_conversation_id it adds a follow-up turn; without one it starts a new conversation. Takes prompt, agent_template_name, agent_template_inputs, repository_url, repository_branch, repository_commit_sha, max_duration_seconds and idempotency_key, as revyl agent run does |
wait_for_agent_runs | Wait for every run in agent_run_ids to finish, for at most wait_timeout_seconds (0 to 55, default 30; 0 checks once), then return { wait_timed_out, agent_runs }. wait_timed_out: true means runs are still going and nothing was stopped: call it again |
get_agent_run | Read one run by agent_run_id |
list_agent_runs | List runs newest first, filtered by agent_conversation_id, root_agent_run_id, parent_agent_run_id, agent_run_statuses or agent_template_name; limit (1 to 100, default 25) and cursor page through them |
stop_agent_run | Stop a run, every subagent under it, and everything those runs started that is still active |
list_agent_resources | List what a run and its subagents created (agent_run_id), or every turn of a conversation (agent_conversation_id); filter with resource_types, is_resource_active and only_this_run, and page with limit and cursor |
list_agent_templates | List the agent templates run_agent can start. No template is available today, so it returns an empty list and every run uses Revyl's base agent |
- A run has finished exactly when its
finished_atis set.agent_run_statussays how it ended,final_messageholds the agent's answer andagent_run_outputits structured output. - Without
idempotency_key, everyrun_agentcall starts a new run. When a call fails with a network error, 429 or 5xx, its error names theidempotency_keyit used: callrun_agentagain with the same arguments and that key to get the run Revyl may have accepted, without starting a second one. - A refused call returns a tool error with the API's
code,error,status_codeanddetail, the codes listed in Errors.