Skip to main content
Glama
conorluddy

XC-MCP: XCode CLI wrapper

by conorluddy

Terminate App (IDB)

idb-terminate
Idempotent

Force-quit running iOS apps by bundle ID to reset app state for clean testing. Idempotent termination succeeds even if app isn't running, enabling reliable reinstall and test reruns.

Instructions

idb-terminate

Terminate running application - force-quit apps for clean state testing and debugging.

Overview

Force-terminates running applications by bundle ID with immediate stop (no graceful shutdown). Idempotent operation that succeeds even if app not running. Detects whether app was actually running from output parsing to provide accurate status. Essential for resetting app state between test runs and preparing for reinstallation.

Parameters

Required

  • bundleId (string): App bundle identifier to terminate

Optional

  • udid (string): Target identifier - auto-detects if omitted

Returns

Termination status with success indicator, bundle ID, wasRunning flag (parsed from output to distinguish actual termination from no-op), command output, error details if failed, and next steps guidance (relaunch, reinstall, verification).

Examples

Force-quit app before reinstall

const result = await idbTerminateTool({
  bundleId: 'com.example.MyApp'
});

Stop app on specific device

await idbTerminateTool({
  bundleId: 'com.example.MyApp',
  udid: 'DEVICE-UDID-123'
});
  • idb-launch: Relaunch app after termination

  • idb-list-apps: Verify running status before/after termination

  • idb-uninstall: Remove app after termination for clean install

Notes

  • This is a force-kill operation (not graceful shutdown)

  • Idempotent - succeeds even if app not running

  • IDB terminate sends termination signal to running app

  • wasRunning flag indicates if app was actually terminated vs already stopped

  • Safe to call multiple times - no error if app already stopped

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
udidNo
bundleIdYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv4.1.0

TDQS

A4.6/5.0
Behavior5/5

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

Annotations provide idempotentHint=true and readOnlyHint=false, and the description adds substantial behavioral detail beyond that: it is a force-kill with no graceful shutdown, succeeds even when the app is not running, reports a wasRunning flag parsed from output, and is safe to call multiple times. 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.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is longer than average but well-structured with Overview, Parameters, Returns, Examples, Related Tools, and Notes. Core information is front-loaded and each section adds value, though there is minor redundancy about idempotency and wasRunning appearing in multiple sections.

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?

With no output schema, the description explains return fields (success indicator, bundle ID, wasRunning flag, command output, error details, next steps guidance). It also provides two realistic examples and enough behavioral context for an agent to call the tool correctly. Nothing critical is missing.

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

Parameters4/5

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

The input schema has 0% description coverage, so the description must compensate. It does: bundleId is defined as "App bundle identifier to terminate" and udid as "Target identifier - auto-detects if omitted." The meaning is clear, though udid could be more explicitly described as a device identifier.

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?

The description states a specific verb and resource: "Force-terminates running applications by bundle ID with immediate stop." It clearly positions the tool as a force-quit operation distinct from idb-launch, idb-uninstall, and idb-list-apps, and the Related Tools section reinforces how it fits among siblings.

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?

The description gives clear context for when to use it: "resetting app state between test runs and preparing for reinstallation." It also names related tools (idb-launch, idb-list-apps, idb-uninstall) that may be used before or after. It does not explicitly say when not to use it, but the use-case guidance is strong enough.

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