Skip to main content
Glama

restart-app

Terminate and relaunch an app by bundle ID or package name to reset its in-memory state without a full reinstall. Refreshes devtools injection and supports iOS, Android, and tvOS.

Instructions

Terminate then relaunch an app by bundle id / package name. Use when you need a clean in-memory state without a full reinstall. Also refreshes the native-devtools injection before the relaunch (the iOS slice on iOS, the tvOS slice on Apple TV); on tvOS, interaction is focus-driven — use the tv-* tools rather than coordinate taps. Returns { restarted, bundleId }. Fails if the app is not installed.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
udidYesTarget device id from `list-devices` (iOS UDID or Android serial).
activityNoAndroid-only: relaunch a non-launcher Activity (e.g. `.SettingsActivity` or `com.example/com.example.SettingsActivity`). If omitted, the app's default launcher activity is used. Ignored on iOS.
bundleIdYesApp identifier. iOS: bundle id. Android: package name.

Schema Changelog

Changes observed during successful MCP inspections.

  1. 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._-]*$"
  2. First observedv0.15.0

TDQS

A4.5/5.0
Behavior5/5

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

With no annotations present, the description carries the full behavioral burden and meets it: it discloses the terminate-then-relaunch side effect, the native-devtools injection refresh per platform, the return shape, and the not-installed failure mode. 'Without a full reinstall' also implies app data persists, which is useful side-effect context. No annotation contradiction.

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?

The description is compact and front-loaded: main action first, then use-case, platform caveat, then return/failure. Every sentence carries distinct information and there is no filler.

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

Completeness5/5

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

Given three parameters, no annotations, and no output schema, the description covers the essential call contract: what it does, when to use it, what it returns, and when it fails. The tvOS focus-driven note addresses a platform-specific trap. The only minor omission is explicit side effects on app data, but 'without a full reinstall' covers this adequately.

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

Parameters3/5

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

Schema description coverage is 100%, so the baseline is 3. The description reinforces that bundleId is a bundle id/package name, but adds no extra parameter semantics beyond the schema. Activity and udid are already well documented in the input 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?

Opens with a concrete action, 'Terminate then relaunch an app,' and identifies the target by bundle id/package name. The phrase 'without a full reinstall' explicitly separates it from reinstall-app, and 'clean in-memory state' signals the distinction from a plain launch-app. This is specific enough for an agent to know what the tool does.

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?

Gives an explicit trigger: use when a clean in-memory state is needed without reinstalling. It also adds platform-specific guidance for tvOS, telling the agent to prefer tv-* tools over coordinate taps. It does not explicitly name launch-app as the alternative for simple launches, so it stops short of full when-not coverage.

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