Troupeby AliveDocsSign in

Reference

apps

Install and lifecycle of apps on a session's device. Index · shared schemas · errors.

ProcedureSummaryRESTMCP toolStability
apps.installInstall, or replace, an appPOSTapps_installstable
apps.uninstallUninstall an appPOST—stable
apps.launchLaunch 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.POSTapps_launchstable
apps.terminateTerminate an appPOSTapps_terminatestable
apps.listList installed apps and their run stateGETapps_liststable
apps.clearDataTerminate the app and wipe its data (pm clear on Android; on iOS, empty the data container)POSTapps_clearDatastable
apps.openUrlOpen a URL or deep link (the scheme is pre-approved on iOS)POSTapps_openUrlstable
apps.setPermissionsGrant, revoke or reset app permissionsPOST—stable

apps.install

Install, or replace, an app

RESTPOST /v1/apps/install (input as a JSON body)
RPC/rpc/v2/apps/install
MCPtool apps_install; hints: idempotent
Authapps:install
Tenancyproject
Requiresinstall.from contains the input's format
Troupe Cloudrelayed through the host agent to the device host’s runtime
Stabilitystable, since 1.0

Input:

TypeScript
{ sessionId: SessionId; source: AppSource; format?: AppFormat }

Output:

TypeScript
InstalledApp

Errors: D, APP_INSTALL_FAILED, TIMEOUT.

Named types: AppFormat, AppSource, InstalledApp, SessionId.

apps.uninstall

Uninstall an app

RESTPOST /v1/apps/uninstall (input as a JSON body)
RPC/rpc/v2/apps/uninstall
MCPnot a tool (low value or high risk for agents); hints: idempotent, destructive
Authapps:install
Tenancyproject
Troupe Cloudrelayed through the host agent to the device host’s runtime
Stabilitystable, since 1.0

Input:

TypeScript
{ sessionId: SessionId; bundleId: BundleId }

Output:

TypeScript
{ 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.

RESTPOST /v1/apps/launch (input as a JSON body)
RPC/rpc/v2/apps/launch
MCPtool apps_launch; hints: none
Authdevices:drive
Tenancyproject
Troupe Cloudrelayed through the host agent to the device host’s runtime
Stabilitystable, since 1.0

Input:

TypeScript
{
  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:

TypeScript
{ 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

RESTPOST /v1/apps/terminate (input as a JSON body)
RPC/rpc/v2/apps/terminate
MCPtool apps_terminate; hints: idempotent
Authdevices:drive
Tenancyproject
Troupe Cloudrelayed through the host agent to the device host’s runtime
Stabilitystable, since 1.0

Input:

TypeScript
{ sessionId: SessionId; bundleId: BundleId }

Output:

TypeScript
{ wasRunning: boolean }

Errors: D, APP_NOT_INSTALLED.

Named types: BundleId, SessionId.

apps.list

List installed apps and their run state

RESTGET /v1/apps/list (input as query parameters)
RPC/rpc/v2/apps/list
MCPtool apps_list; hints: read-only, idempotent
Authdevices:read
Tenancyproject
Troupe Cloudrelayed through the host agent to the device host’s runtime
Stabilitystable, since 1.0

Input:

TypeScript
{
  sessionId: SessionId
  includeSystem?: boolean  // default false
}

Output:

TypeScript
{ 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)

RESTPOST /v1/apps/clear-data (input as a JSON body)
RPC/rpc/v2/apps/clearData
MCPtool apps_clearData; hints: idempotent, destructive
Authapps:install
Tenancyproject
Requiresapps.clearData
Troupe Cloudrelayed through the host agent to the device host’s runtime
Stabilitystable, since 1.0

Input:

TypeScript
{ sessionId: SessionId; bundleId: BundleId }

Output:

TypeScript
{}

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)

RESTPOST /v1/apps/open-url (input as a JSON body)
RPC/rpc/v2/apps/openUrl
MCPtool apps_openUrl; hints: none
Authdevices:drive
Tenancyproject
Requiresapps.openUrl
Troupe Cloudrelayed through the host agent to the device host’s runtime
Stabilitystable, since 1.0

Input:

TypeScript
{
  sessionId: SessionId
  url: string  // ≤ 8192 chars; /^[A-Za-z][A-Za-z0-9+.-]*:\S+$/
  bundleId?: BundleId
}

Output:

TypeScript
{}

Errors: D, APP_NOT_INSTALLED, APP_CRASHED, TIMEOUT.

Named types: BundleId, SessionId.

apps.setPermissions

Grant, revoke or reset app permissions

RESTPOST /v1/apps/set-permissions (input as a JSON body)
RPC/rpc/v2/apps/setPermissions
MCPnot a tool (low value or high risk for agents); hints: idempotent
Authapps:install
Tenancyproject
Requiresapps.permissions
Troupe Cloudrelayed through the host agent to the device host’s runtime
Stabilitystable, since 1.0

Input:

TypeScript
{
  sessionId: SessionId
  bundleId: BundleId
  grant?: Permission[]  // ≤ 16 items
  revoke?: Permission[]  // ≤ 16 items
  reset?: Permission[]  // ≤ 16 items
}

Output:

TypeScript
{}

Errors: D, APP_NOT_INSTALLED.

Named types: BundleId, Permission, SessionId.

esc

    Type to search every page, the protocol reference and the cloud API.