Skip to main content
Glama

mobile_terminate_app

Stop and terminate apps on mobile devices by specifying device identifier and package name. Use this tool to close applications during mobile automation testing or device management.

Instructions

Stop and terminate an app on mobile device

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
deviceYesThe device identifier to use. Use mobile_list_available_devices to find which devices are available to you.
packageNameYesThe package name of the app to terminate

Implementation Reference

  • MCP tool registration, schema, and handler for mobile_terminate_app. Delegates to the selected Robot instance's terminateApp method.
    tool( "mobile_terminate_app", "Stop and terminate an app on mobile device", { packageName: z.string().describe("The package name of the app to terminate"), }, async ({ packageName }) => { requireRobot(); await robot!.terminateApp(packageName); return `Terminated app ${packageName}`; } );
  • AndroidRobot implementation of terminateApp using ADB command to force-stop the app.
    public async terminateApp(packageName: string): Promise<void> { this.adb("shell", "am", "force-stop", packageName); }
  • IosRobot implementation of terminateApp using go-ios 'kill' command after ensuring tunnel.
    public async terminateApp(packageName: string): Promise<void> { await this.assertTunnelRunning(); await this.ios("kill", packageName); }
  • Simctl (iOS Simulator) implementation of terminateApp using xcrun simctl terminate.
    public async terminateApp(packageName: string) { this.simctl("terminate", this.simulatorUuid, packageName); }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/EmpathySlainLovers/MCP'

If you have feedback or need assistance with the MCP directory API, please join our Discord server