Skip to main content
Glama
mobile-next

Mobile Next MCP Server

Official
by mobile-next

mobile_terminate_app

Stop and terminate a running app on a mobile device by specifying the app's package name, enabling efficient app management and automation tasks.

Instructions

Stop and terminate an app on mobile device

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
packageNameYesThe package name of the app to terminate

Implementation Reference

  • Primary handler and registration for the MCP 'mobile_terminate_app' tool. Defines the input schema (device ID and packageName), retrieves the platform-specific Robot instance via getRobotFromDevice, and calls terminateApp on it.
    tool( "mobile_terminate_app", "Stop and terminate an app on mobile device", { device: z.string().describe("The device identifier to use. Use mobile_list_available_devices to find which devices are available to you."), packageName: z.string().describe("The package name of the app to terminate"), }, async ({ device, packageName }) => { const robot = getRobotFromDevice(device); await robot.terminateApp(packageName); return `Terminated app ${packageName}`; } );
  • AndroidRobot implementation of terminateApp: executes ADB shell command to force-stop the app.
    public async terminateApp(packageName: string): Promise<void> { this.adb("shell", "am", "force-stop", packageName); }
  • IosRobot implementation of terminateApp: ensures tunnel is running and uses go-ios 'kill' command.
    public async terminateApp(packageName: string): Promise<void> { await this.assertTunnelRunning(); await this.ios("kill", packageName); }
  • Simctl (iOS Simulator) implementation of terminateApp: uses xcrun simctl terminate command.
    public async terminateApp(packageName: string) { this.simctl("terminate", this.simulatorUuid, packageName); }
  • Zod input schema for the mobile_terminate_app tool parameters.
    { device: z.string().describe("The device identifier to use. Use mobile_list_available_devices to find which devices are available to you."), packageName: z.string().describe("The package name of the app to terminate"), },

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/mobile-next/mobile-mcp'

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