Skip to main content
Glama

reinstall-app

Installs an app on a device by first uninstalling any existing version, clearing app data and runtime permissions. Use after rebuilding or to start from a clean app state.

Instructions

Install or reinstall an app on the device. The previous installation (if any) is uninstalled first so app data and runtime permissions are cleared. Use for a full reinstall after rebuilding, or to start from a clean app state. Returns { reinstalled, bundleId }. Fails if appPath does not exist or is not the platform's package, or bundleId does not match it (not checked on Vega or a remote simulator); these checks run before anything is uninstalled. On Android it also fails, without installing, when bundleId is still on the device after the uninstall or that check fails (the app may then be gone), and on a local iOS simulator when the uninstall does not finish within 30s.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "udid": "<udid>",
      "bundleId": "<bundleId>",
      "appPath": "<appPath>"
    },
    "name": "reinstall-app"
  }
}

Input Schema

NameRequiredDescriptionDefault
udidYesTarget device id from `list-devices` (iOS UDID or Android serial).
appPathYesPath to the app bundle. iOS: `.app` directory (e.g. ./build/.../MyApp.app). Android: `.apk` file (e.g. android/app/build/outputs/apk/debug/app-debug.apk). Vega: `.vpkg` file. Relative paths are resolved from the current working directory.
bundleIdYesApp identifier, used to uninstall the previous installation. iOS: bundle id. Android: package name. Vega: interactive component app id (e.g. com.example.app.main).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / bundleId / description
      Previous value: -"App identifier that matches the bundle at `appPath`. iOS: bundle id (used to uninstall first). Android: package name (used to uninstall first; the install itself identifies the app from the APK). Vega: interactive component app id (e.g. com.example.app.main), used to uninstall first."New value: +"App identifier, used to uninstall the previous installation. iOS: bundle id. Android: package name. Vega: interactive component app id (e.g. com.example.app.main)."
  2. Changed1 schema field changedv0.25.1
    • changedInput schema / properties / bundleId / pattern
      Previous value: -"^[A-Za-z_][A-Za-z0-9._-]*$"New value: +"^[A-Za-z0-9_][A-Za-z0-9._-]*$"
  3. First observedv0.15.0

TDQS

A4.6/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden and does so: it discloses the destructive uninstall-first step, that app data and runtime permissions are cleared, the exact return shape { reinstalled, bundleId }, validation ordering (checks run before anything is uninstalled), and platform-specific failure modes on Android and local iOS simulators.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded purpose, then destructive behavior, then when-to-use, then return value, then failure conditions — a logical ordering with no redundant sentences.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

No output schema exists, yet the return fields are documented and the failure conditions are enumerated, which is more than enough for a three-parameter install tool. Minor gap: no explicit note on install timeouts or whether the app is left installed on non-Android failure paths.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is already 100%, so the baseline is 3; the description adds real meaning by stating appPath must exist and be the platform's package, that bundleId must match appPath, and that this cross-check is skipped on Vega or a remote simulator — constraints not expressible in the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

'Install or reinstall an app on the device' gives a specific verb+resource, and the follow-up sentence clarifies that the previous installation is uninstalled first — a distinction that separates it from launch-app/restart-app without needing to name them.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

'Use for a full reinstall after rebuilding, or to start from a clean app state' states clearly when to reach for this tool. It stops short of naming the alternative to pick when the agent does not want data cleared (e.g., plain restart), but the context is unambiguous.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.