Skip to main content
Glama

Terminate App

mobile_terminate_app
Destructive

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);
    }
Behavior3/5

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

The annotations already declare destructiveHint=true, so the agent knows this is a destructive operation. The description adds minimal context beyond this - it confirms the destructive nature ('terminate') but doesn't elaborate on what termination entails (e.g., force stop vs graceful shutdown, whether data is preserved, permissions required, or potential side effects). No contradiction with annotations exists.

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 a single, efficient sentence that communicates the core purpose without unnecessary words. It's front-loaded with the essential action and resource, making it immediately scannable and understandable.

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

Completeness3/5

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

For a destructive operation with good schema coverage but no output schema, the description is minimally adequate. It identifies the tool's purpose and destructive nature, but lacks details about what termination means operationally, success/failure indicators, or error conditions. The annotations cover the safety profile, but more behavioral context would be helpful.

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?

With 100% schema description coverage, both parameters are fully documented in the schema itself. The description adds no additional parameter information beyond what's already in the schema descriptions. This meets the baseline expectation when schema coverage is complete.

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

Purpose4/5

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

The description clearly states the action ('stop and terminate') and resource ('an app on mobile device'), making the purpose immediately understandable. It distinguishes from siblings like mobile_launch_app (which starts apps) and mobile_uninstall_app (which removes apps), though it doesn't explicitly mention these distinctions in the description text itself.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention when termination is appropriate versus other app control methods, nor does it reference sibling tools like mobile_launch_app or mobile_uninstall_app for context. The input schema hints at mobile_list_available_devices for device discovery, but this isn't explicit usage guidance.

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

Install Server

Other Tools

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