Skip to main content
Glama
conorluddy

XC-MCP: XCode CLI wrapper

by conorluddy

Override Simulator Status Bar

simctl-status-bar
Idempotent

Override or clear iOS simulator status bar settings like time, network, WiFi, and battery to create consistent screenshots and test app behavior under different device conditions.

Instructions

simctl-status-bar

Override or clear simulator status bar appearance for consistent screenshots and UI testing.

What it does

Controls the simulator's status bar appearance, allowing you to set specific time, network status, battery level, and WiFi state. Useful for creating consistent screenshots and testing app behavior under different device conditions.

Parameters

  • udid (string, required): Simulator UDID (from simctl-list)

  • operation (string, required): "override" or "clear"

  • time (string, optional): Time in 24-hour format (e.g., "9:41", "23:59")

  • dataNetwork (string, optional): Network type - none, 1x, 3g, 4g, 5g, lte, lte-a

  • wifiMode (string, optional): WiFi state - active, searching, failed

  • batteryState (string, optional): Battery state - charging, charged, discharging

  • batteryLevel (number, optional): Battery percentage 0-100

Returns

JSON response with:

  • Status bar modification status

  • Applied parameters (for override operation)

  • Guidance for verification and testing

Examples

Override with classic Apple time

await simctlStatusBarTool({
  udid: 'device-123',
  operation: 'override',
  time: '9:41',
  batteryLevel: 100
})

Simulate poor network conditions

await simctlStatusBarTool({
  udid: 'device-123',
  operation: 'override',
  dataNetwork: 'none',
  wifiMode: 'failed'
})

Simulate low battery

await simctlStatusBarTool({
  udid: 'device-123',
  operation: 'override',
  batteryState: 'discharging',
  batteryLevel: 15
})

Clear all overrides

await simctlStatusBarTool({
  udid: 'device-123',
  operation: 'clear'
})

Common Use Cases

  1. Consistent screenshots: Set time to 9:41 and battery to 100% for app store screenshots

  2. Network condition testing: Test app behavior with different network types

  3. Low battery testing: Verify app handles low battery warnings correctly

  4. UI testing: Ensure status bar doesn't interfere with visual regression tests

  5. Demo mode: Clean status bar for presentations and demos

Status Bar Parameters

Time

  • Format: 24-hour "HH:MM" (e.g., "9:41", "14:30", "23:59")

  • Apple default: "9:41" (time of original iPhone announcement)

Data Network

  • none: No cellular data

  • 1x: 2G network

  • 3g: 3G network

  • 4g: 4G network

  • 5g: 5G network

  • lte: LTE network

  • lte-a: LTE Advanced

WiFi Mode

  • active: Connected and active

  • searching: Searching for network

  • failed: Connection failed

Battery State

  • charging: Device is charging

  • charged: Fully charged

  • discharging: Running on battery

Battery Level

  • Range: 0-100

  • Shows percentage in status bar

Important Notes

  • Screenshot consistency: Apply overrides before taking screenshots for consistent results

  • Demo mode: Apple often uses 9:41 time and 100% battery for marketing materials

  • Simulator only: Status bar overrides only work on simulators, not real devices

  • Persistent: Overrides persist until cleared or simulator is reset

  • Version compatibility: Some parameters may not work on older iOS versions

Error Handling

  • Invalid time format: Error if time is not in HH:MM format

  • Invalid network type: Error if dataNetwork is not in allowed list

  • Invalid battery level: Error if batteryLevel is not 0-100

  • Simulator not found: Validates simulator exists in cache

App Store Screenshot Best Practices

For app store screenshots, Apple recommends:

  1. Time: "9:41" (Apple's standard)

  2. Battery: 100% (shows full battery icon)

  3. Signal: Full bars (use "lte" or "5g")

  4. WiFi: Active (shows connected)

  5. No notifications or indicators

await simctlStatusBarTool({
  udid: 'device-123',
  operation: 'override',
  time: '9:41',
  dataNetwork: '5g',
  wifiMode: 'active',
  batteryState: 'charged',
  batteryLevel: 100
})

Testing Workflow

  1. Apply overrides: Set desired status bar state

  2. Take screenshot: simctl-io <udid> screenshot to verify

  3. Test app: Launch app and verify it handles the conditions

  4. Clear overrides: Reset to normal state when done

Visual Verification

After applying overrides, always take a screenshot to verify the status bar appears correctly:

simctl-io <udid> screenshot

The status bar changes are visible immediately and affect all screenshots taken while overrides are active.

When to Clear Overrides

  • After taking app store screenshots

  • Before testing features that depend on actual device state

  • When switching between different test scenarios

  • At the end of automated test runs

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
timeNo
udidYes
wifiModeNo
operationYes
dataNetworkNo
batteryLevelNo
batteryStateNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv4.1.0

TDQS

A4.2/5.0
Behavior3/5

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

Annotations indicate idempotentHint=true, destructiveHint=false, readOnlyHint=false. The description adds context like 'overrides persist until cleared or simulator is reset', 'simulator only', and version compatibility notes, which are useful. However, it doesn't detail side effects (e.g., if override fails partially) or the exact persistence mechanism beyond a note. It doesn't contradict annotations, so a 3 is fair.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

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

The description is extremely long (500+ words) with extensive examples, best practices, and workflows. While thorough, it includes redundant sections (e.g., status bar parameters repeated in prose and code, multiple example calls). It is front-loaded with purpose, but the verbosity could be trimmed. Score 3 for moderate structure, but it's not concise.

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?

Given the tool's complexity (7 params, no output schema, no enum coverage), the description is comprehensive. It covers return values in the 'Returns' section, error handling, verification workflow, and best practices. Nothing essential is missing for an agent to call it correctly.

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

Parameters5/5

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

Schema has 0% description coverage, so the description must compensate, and it does. It exhaustively explains every parameter: time format, allowed values for dataNetwork, wifiMode, batteryState, batteryLevel range, and even examples. It adds enumerations and formats that the schema lacks, making it highly informative.

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 clearly states it overrides or clears the simulator status bar appearance, with a specific verb ('override'/'clear') and resource. It distinguishes from siblings by focusing on status bar manipulation, which is unique among simctl tools. The title and description align, and the examples reinforce the purpose.

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 provides extensive usage context, including common use cases (screenshots, network testing, low battery), testing workflows, and when to clear overrides. It implicitly differentiates from other simctl tools by focusing on status bar only, but doesn't explicitly say 'use this instead of X for Y' or mention alternatives. Still, the guidance is strong.

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