Reference
apps
Install and lifecycle of apps on a session's device. Index · shared schemas · errors.
| Procedure | Summary | REST | MCP tool | Stability |
|---|---|---|---|---|
apps.install | Install, or replace, an app | POST | apps_install | stable |
apps.uninstall | Uninstall an app | POST | — | stable |
apps.launch | Launch an app. If it is already running, ifRunning decides between relaunch (the default) and activate. devServerUrl points an Expo or React Native debug build at its bundler through the Expo dev client link, which also keeps expo-dev-menu off the app (no menu or first-run sheet at launch, no floating button) and stores that in the app preferences. | POST | apps_launch | stable |
apps.terminate | Terminate an app | POST | apps_terminate | stable |
apps.list | List installed apps and their run state | GET | apps_list | stable |
apps.clearData | Terminate the app and wipe its data (pm clear on Android; on iOS, empty the data container) | POST | apps_clearData | stable |
apps.openUrl | Open a URL or deep link (the scheme is pre-approved on iOS) | POST | apps_openUrl | stable |
apps.setPermissions | Grant, revoke or reset app permissions | POST | — | stable |
apps.install
Install, or replace, an app
| REST | POST /v1/apps/install (input as a JSON body) |
| RPC | /rpc/v2/apps/install |
| MCP | tool apps_install; hints: idempotent |
| Auth | apps:install |
| Tenancy | project |
| Requires | install.from contains the input's format |
| Troupe Cloud | relayed through the host agent to the device host’s runtime |
| Stability | stable, since 1.0 |
Input:
{ sessionId: SessionId; source: AppSource; format?: AppFormat }Output:
InstalledAppErrors: D, APP_INSTALL_FAILED, TIMEOUT.
Named types: AppFormat, AppSource, InstalledApp, SessionId.
apps.uninstall
Uninstall an app
| REST | POST /v1/apps/uninstall (input as a JSON body) |
| RPC | /rpc/v2/apps/uninstall |
| MCP | not a tool (low value or high risk for agents); hints: idempotent, destructive |
| Auth | apps:install |
| Tenancy | project |
| Troupe Cloud | relayed through the host agent to the device host’s runtime |
| Stability | stable, since 1.0 |
Input:
{ sessionId: SessionId; bundleId: BundleId }Output:
{ wasInstalled: boolean }Errors: D.
Named types: BundleId, SessionId.
apps.launch
Launch an app. If it is already running, ifRunning decides between relaunch (the default) and activate. devServerUrl points an Expo or React Native debug build at its bundler through the Expo dev client link, which also keeps expo-dev-menu off the app (no menu or first-run sheet at launch, no floating button) and stores that in the app preferences.
| REST | POST /v1/apps/launch (input as a JSON body) |
| RPC | /rpc/v2/apps/launch |
| MCP | tool apps_launch; hints: none |
| Auth | devices:drive |
| Tenancy | project |
| Troupe Cloud | relayed through the host agent to the device host’s runtime |
| Stability | stable, since 1.0 |
Input:
{
sessionId: SessionId
bundleId: BundleId
args?: string[] // ≤ 64 items; each ≤ 4096 chars
env?: Record<string, string>
url?: string // ≤ 8192 chars; /^[A-Za-z][A-Za-z0-9+.-]*:\S+$/
devServerUrl?: string // ≤ 2048 chars; url
ifRunning?: 'relaunch' | 'activate' // default 'relaunch'
timeoutMs?: TimeoutMs // default 30000
}Output:
{ bundleId: string; state: AppStateOut; pid?: integer; launchedAt: string }Errors: D, APP_NOT_INSTALLED, APP_LAUNCH_FAILED, APP_CRASHED, TIMEOUT.
Named types: AppStateOut, BundleId, SessionId, TimeoutMs.
apps.terminate
Terminate an app
| REST | POST /v1/apps/terminate (input as a JSON body) |
| RPC | /rpc/v2/apps/terminate |
| MCP | tool apps_terminate; hints: idempotent |
| Auth | devices:drive |
| Tenancy | project |
| Troupe Cloud | relayed through the host agent to the device host’s runtime |
| Stability | stable, since 1.0 |
Input:
{ sessionId: SessionId; bundleId: BundleId }Output:
{ wasRunning: boolean }Errors: D, APP_NOT_INSTALLED.
Named types: BundleId, SessionId.
apps.list
List installed apps and their run state
| REST | GET /v1/apps/list (input as query parameters) |
| RPC | /rpc/v2/apps/list |
| MCP | tool apps_list; hints: read-only, idempotent |
| Auth | devices:read |
| Tenancy | project |
| Troupe Cloud | relayed through the host agent to the device host’s runtime |
| Stability | stable, since 1.0 |
Input:
{
sessionId: SessionId
includeSystem?: boolean // default false
}Output:
{ apps: AppInfo[] }Errors: S.
Named types: AppInfo, SessionId.
apps.clearData
Terminate the app and wipe its data (pm clear on Android; on iOS, empty the data container)
| REST | POST /v1/apps/clear-data (input as a JSON body) |
| RPC | /rpc/v2/apps/clearData |
| MCP | tool apps_clearData; hints: idempotent, destructive |
| Auth | apps:install |
| Tenancy | project |
| Requires | apps.clearData |
| Troupe Cloud | relayed through the host agent to the device host’s runtime |
| Stability | stable, since 1.0 |
Input:
{ sessionId: SessionId; bundleId: BundleId }Output:
{}Errors: D, APP_NOT_INSTALLED, APP_INSTALL_FAILED.
Named types: BundleId, SessionId.
apps.openUrl
Open a URL or deep link (the scheme is pre-approved on iOS)
| REST | POST /v1/apps/open-url (input as a JSON body) |
| RPC | /rpc/v2/apps/openUrl |
| MCP | tool apps_openUrl; hints: none |
| Auth | devices:drive |
| Tenancy | project |
| Requires | apps.openUrl |
| Troupe Cloud | relayed through the host agent to the device host’s runtime |
| Stability | stable, since 1.0 |
Input:
{
sessionId: SessionId
url: string // ≤ 8192 chars; /^[A-Za-z][A-Za-z0-9+.-]*:\S+$/
bundleId?: BundleId
}Output:
{}Errors: D, APP_NOT_INSTALLED, APP_CRASHED, TIMEOUT.
Named types: BundleId, SessionId.
apps.setPermissions
Grant, revoke or reset app permissions
| REST | POST /v1/apps/set-permissions (input as a JSON body) |
| RPC | /rpc/v2/apps/setPermissions |
| MCP | not a tool (low value or high risk for agents); hints: idempotent |
| Auth | apps:install |
| Tenancy | project |
| Requires | apps.permissions |
| Troupe Cloud | relayed through the host agent to the device host’s runtime |
| Stability | stable, since 1.0 |
Input:
{
sessionId: SessionId
bundleId: BundleId
grant?: Permission[] // ≤ 16 items
revoke?: Permission[] // ≤ 16 items
reset?: Permission[] // ≤ 16 items
}Output:
{}Errors: D, APP_NOT_INSTALLED.
Named types: BundleId, Permission, SessionId.