Skip to main content
Glama

terminate_app

Force-quit applications on iOS simulators by specifying the bundle identifier, enabling app management and testing automation.

Instructions

Terminate (force-quit) an app on a simulator

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
bundle_idYesApp bundle identifier (e.g. com.example.myapp)
udidNoSimulator UDID (optional, defaults to booted simulator)

Implementation Reference

  • The `terminateApp` method that executes the `xcrun simctl terminate` command.
    private async terminateApp(bundleId: string, udid?: string) {
      const target = await resolveUdid(udid);
      try {
        await execAsync(`xcrun simctl terminate ${target} ${bundleId}`);
      } catch {
        // Ignore errors — app may not be running
      }
      return {
        content: [{ type: 'text', text: `Terminated ${bundleId} on ${target}` }],
      };
    }
  • src/index.ts:296-307 (registration)
    The tool definition and schema registration for `terminate_app`.
    {
      name: 'terminate_app',
      description: 'Terminate (force-quit) an app on a simulator',
      inputSchema: {
        type: 'object',
        properties: {
          bundle_id: { type: 'string', description: 'App bundle identifier (e.g. com.example.myapp)' },
          udid: { type: 'string', description: 'Simulator UDID (optional, defaults to booted simulator)' },
        },
        required: ['bundle_id'],
        additionalProperties: false,
      },
  • The switch case handler that routes the MCP tool call to the `terminateApp` method.
    case 'terminate_app':
      return this.terminateApp(args.bundle_id as string, args.udid);

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/xmuweili/app-screen-mcp'

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