> ## Documentation Index
> Fetch the complete documentation index at: https://docs.revyl.com/llms.txt
> Use this file to discover all available pages before exploring further.

# MCP Tools Reference

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.

### Device Session

| Tool                    | Description                                   |
| ----------------------- | --------------------------------------------- |
| `start_device_session`  | Start a cloud device session (iOS or Android) |
| `stop_device_session`   | Stop a device session                         |
| `get_session_info`      | Get session details including viewer URL      |
| `list_device_sessions`  | List all active sessions                      |
| `switch_device_session` | Switch the active session by index            |

### 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_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 key (ENTER, BACKSPACE)    |
| `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_download_file` | Download a file to device storage |

### 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 an app from a URL            |
| `launch_app`  | Launch an installed app by bundle ID |

### Diagnostics

| Tool            | Description                                                    |
| --------------- | -------------------------------------------------------------- |
| `device_doctor` | Run diagnostics on auth, session, device, and grounding health |
| `auth_status`   | Check authentication status and user info                      |

### 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                                  |
| `list_env_vars`        | List environment variables (encrypted, injected at launch) |
| `set_env_var`          | Add or update an env var                                   |
| `delete_env_var`       | Delete an env var                                          |
| `clear_env_vars`       | Delete all env vars                                        |

### Build Management

| Tool           | Description                              |
| -------------- | ---------------------------------------- |
| `list_builds`  | List available build versions            |
| `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          |
