Revyl Documentation

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 under device_session and its action.
  • core: the device tools, start_dev_loop, manage_tests, manage_builds, manage_persistent_computers (Persistent computers), and the agent run tools. A manage_ tool's action picks the operation and params takes that flat tool's inputs; for example, manage_tests with action run takes run_test's inputs in params.
  • full: core plus manage_workflows and 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_checkout set to false sends no files, so the run reads Git at the head of its branch. Set to true, it sends the checkout's files in a project without the setting.
  • Results add test_definition_summary, the text revyl test run prints after Definition:, and the fields What a run shows lists, with test_definition_warnings for problems with the files the call sent.
  • update_test changes only the saved copy a run falls back to, and its notice says 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_selectionChoiceRuns
inherit (default)AutomaticThe branch's default build: its pinned build, or else its newest
latestLatest buildThe branch's newest build, even when it's pinned
latest_all_branchesAll branches · Latest buildThe newest build on any of the app's branches; takes no branch
pinnedExact buildThe 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_dir or REVYL_PROJECT_DIR first 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, or default_branch). auto_git_branch_enabled: false with default_branch means automatic detection was off. With detection enabled, git_branch_name names the Git branch consulted; combined with default_branch, it means that branch couldn't be used. git_branch_name is 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.

ToolBranch and build inputs
start_device_session, install_appapp_id, branch_name, build_selection, or exact build_version_id, plus project_dir.
start_dev_loopbranch_name, build_selection (not latest_all_branches), or exact build_version_id. The dev loop keeps its branch for rebuilds.
run_testbranch_id or branch_name, build_selection, or exact build_version_id. Without them, the test's saved choice.
create_test, update_testbranch_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_buildbranch_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_buildsWith app_id, builds on every branch in versions; branch_id or branch_name narrows to one. Without app_id, app summaries in builds.
run_workflowbranch_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_appios_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

ToolDescription
start_device_sessionStart a Web, iOS, or Android session; returns its session_id
stop_device_sessionStop a device session
get_session_infoGet session details including viewer URL, device model, and OS version
list_device_sessionsList all active sessions with their session_id and index
switch_device_sessionSwitch 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_id selects 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_info omits session_index.
    • Phone screenshots return no screen_token; Web screenshots retain their local observation token.
    • On phones, interact can't ground a drag between two targets; describe the drag with strategy="instruction" instead.
  • interact keeps 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_index names 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

ToolDescription
device_tapTap an element by target or coordinates
device_double_tapDouble-tap an element
device_long_pressLong press with configurable duration
device_typeType text into a field
device_swipeSwipe in a direction from a target or point
device_scrollWeb: scroll by a bounded pixel amount, optionally at a target or point
device_selectWeb: choose an enabled native select option by its exact label
device_dragDrag from one point to another
device_pinchPinch/zoom gesture
device_clear_textClear text in a field

Device Controls

ToolDescription
device_waitWait for a fixed duration
device_backAndroid back button
device_keyPress a named key or keyboard shortcut (physical iPhones: Enter/Backspace only)
device_shakeTrigger shake gesture
device_go_homeReturn to home screen
device_kill_appKill the current app
device_open_appOpen a system app by name
device_navigateOpen a URL or deep link
device_set_locationSet GPS coordinates
device_set_fold_stateFold or unfold a running multi-display iOS device
device_set_orientationRotate a running iOS or Android device
device_download_fileDownload 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

ToolDescription
device_record_startStart an on-demand recording of a running iOS or Android session
device_record_stopStop 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

ToolDescription
device_instructionExecute one instruction step (natural-language action)
device_validationExecute one validation step (assertion)
device_extractExecute one extract step (data extraction)
device_code_executionExecute one code execution step by script ID

Vision

ToolDescription
screenshotCapture a screenshot of the current screen

App Management

ToolDescription
install_appInstall 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_appUninstall an app and delete its data; omit bundle_id for the session app
device_set_permissionsAllow, deny, or reset an app's OS permissions before it launches, so its permission prompts don't appear
launch_appLaunch 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

ToolDescription
device_doctorRun diagnostics on auth, session, worker, and device health, and report environment info
auth_statusCheck authentication status and user info
get_billing_statusRead plan, card, free minutes, devices at once, usage, credit, auto-recharge, any monthly limit, and rates

Test Management

ToolDescription
run_testRun a test by name or ID
create_testCreate a new test from YAML content
update_testUpdate an existing test's YAML content
delete_testDelete a test by name or ID
list_testsList tests from .revyl/config.yaml
list_remote_testsList all tests in the organization
get_test_statusGet the status of a running or completed test
cancel_testCancel a running test by task ID
get_schemaGet the CLI command and YAML test schema

Workflow Management

ToolDescription
run_workflowRun a workflow by name or ID
create_workflowCreate a new workflow
delete_workflowDelete a workflow by name or ID
list_workflowsList all workflows in the organization
cancel_workflowCancel a running workflow by task ID
open_workflow_editorGet the URL to the workflow browser editor
add_tests_to_workflowAdd tests to a workflow
remove_tests_from_workflowRemove tests from a workflow
get_workflow_settingsGet workflow location and app overrides
set_workflow_locationSet GPS location override for a workflow
clear_workflow_locationRemove GPS location override
set_workflow_appSet app overrides per platform
clear_workflow_appRemove app overrides

Module Management

ToolDescription
list_modulesList reusable test modules
get_moduleGet module details and blocks
create_moduleCreate a module from blocks
delete_moduleDelete a module (fails if in use)
insert_module_blockGet a module_import YAML snippet for a module

Tag Management

ToolDescription
list_tagsList all tags with test counts
create_tagCreate a tag (upsert)
delete_tagDelete a tag from all tests
get_test_tagsGet tags for a specific test
set_test_tagsReplace all tags on a test
add_remove_test_tagsAdd/remove tags without replacing

Variables and Environment

ToolDescription
list_variablesList test variables ({{name}} syntax in steps)
set_variableAdd or update a test variable
delete_variableDelete a test variable
delete_all_variablesDelete all test variables

Build Management

ToolDescription
list_buildsList app summaries; with app_id, list builds across all branches, or on branch_id or branch_name
upload_buildUpload a build file to an app
create_appCreate a new app for build uploads
delete_appDelete an app and all its build versions

Script Management

ToolDescription
list_scriptsList code execution scripts
get_scriptGet script details and source code
create_scriptCreate a new script

Dev Loop

ToolDescription
start_dev_loopStart an Expo hot-reload dev loop
stop_dev_loopStop 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.

ToolDescription
run_agentStart 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_runsWait 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_runRead one run by agent_run_id
list_agent_runsList 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_runStop a run, every subagent under it, and everything those runs started that is still active
list_agent_resourcesList 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_templatesList 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_at is set. agent_run_status says how it ended, final_message holds the agent's answer and agent_run_output its structured output.
  • Without idempotency_key, every run_agent call starts a new run. When a call fails with a network error, 429 or 5xx, its error names the idempotency_key it used: call run_agent again 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_code and detail, the codes listed in Errors.

On this page