Skip to main content
Glama
conorluddy

XC-MCP: XCode CLI wrapper

by conorluddy

Manage App Privacy Permissions

simctl-privacy
Idempotent

Grant, revoke, or reset app privacy permissions on simulators without user prompts. Supports structured audit trails for test scenario verification.

Instructions

simctl-privacy

Manage app privacy permissions on simulators with structured audit trail support.

What it does

Grants, revokes, or resets privacy permissions for apps without requiring user interaction. Supports audit trail tracking for test scenario documentation and verification.

Parameters

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

  • bundleId (string, required): App bundle ID (e.g., com.example.MyApp)

  • action (string, required): "grant", "revoke", or "reset"

  • service (string, required): Permission service to modify

  • scenario (string, optional): Test scenario name for audit trail

  • step (number, optional): Step number in test scenario

Supported Services

  • camera, microphone, location, contacts, photos

  • calendar, health, reminders, motion, keyboard

  • mediaLibrary, calls, siri, all (for reset)

LLM Optimization

The scenario and step parameters enable structured permission audit trail tracking. This allows AI agents to track permission state changes across test scenarios and verify permissions at each step of a test workflow.

Returns

JSON response with:

  • Permission modification status

  • Audit entry with timestamp and test context

  • Guidance for verification and next steps

Examples

Grant camera permission

await simctlPrivacyTool({
  udid: 'device-123',
  bundleId: 'com.example.MyApp',
  action: 'grant',
  service: 'camera'
})

Revoke microphone permission

await simctlPrivacyTool({
  udid: 'device-123',
  bundleId: 'com.example.MyApp',
  action: 'revoke',
  service: 'microphone'
})

Reset all permissions

await simctlPrivacyTool({
  udid: 'device-123',
  bundleId: 'com.example.MyApp',
  action: 'reset',
  service: 'all'
})

Grant with audit trail tracking

await simctlPrivacyTool({
  udid: 'device-123',
  bundleId: 'com.example.MyApp',
  action: 'grant',
  service: 'location',
  scenario: 'LocationTest',
  step: 1
})

Common Use Cases

  1. Permission testing: Verify app behavior with different permission states

  2. Onboarding flows: Test permission request flows without manual interaction

  3. Denied permission handling: Test app behavior when permissions are denied

  4. Permission combinations: Test apps with various permission combinations

  5. Audit trail: Track permission changes across automated test scenarios

Important Notes

  • No user prompts: Permissions are changed without showing system alerts

  • Immediate effect: Changes take effect immediately for running apps

  • App restart: Some permissions may require app restart to take effect

  • Reset behavior: "reset" with "all" service clears all permissions

  • Audit trail: scenario/step parameters create structured test documentation

Error Handling

  • App not installed: Error if app is not installed on simulator

  • Invalid service: Error if service name is not recognized

  • Invalid action: Error if action is not "grant", "revoke", or "reset"

  • Invalid bundle ID: Validates bundle ID format (must contain '.')

Testing Workflow

  1. Reset permissions: Start with clean slate

  2. Grant permission: simctl-privacy <udid> <bundleId> grant camera scenario:"CameraTest" step:1

  3. Launch app: simctl-launch <udid> <bundleId>

  4. Test feature: Use camera feature in app

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

  6. Revoke permission: Test denied permission handling

  7. Verify behavior: Screenshot and check error handling

Permission Testing Strategies

  • Happy path: Grant all permissions, test full functionality

  • Denial path: Deny permissions, verify error handling

  • Mixed state: Some granted, some denied, test partial functionality

  • Reset testing: Test permission request flows from clean state

  • Background permissions: Test location "always" vs "when in use"

Audit Trail Usage

The auditEntry in the response includes:

  • timestamp: When permission was changed

  • action, service, bundleId: What was changed

  • success: Whether change succeeded

  • testContext: scenario and step for test tracking

This enables agents to maintain a complete history of permission changes during testing.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
stepNo
udidYes
actionYes
serviceYes
bundleIdYes
scenarioNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv4.1.0

TDQS

A4.7/5.0
Behavior5/5

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

Beyond the annotations, the description discloses meaningful behavioral traits: permissions are changed without system prompts, changes take effect immediately, some permissions may require an app restart, reset clears all permissions, and scenario/step create audit entries. It also documents error conditions, which is valuable operational context.

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 long but well-organized with clear headings, parameter documentation, examples, and use cases. Some redundancy exists—especially around audit trail tracking, which appears in multiple sections—so it is not maximally concise, but the structure makes it easy to scan.

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?

For a 6-parameter mutation tool with no output schema, the description provides a thorough picture: return shape, audit entry fields, error handling, example calls, and workflow guidance. An agent has enough context to invoke the tool correctly and interpret its results.

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 description coverage is 0%, so the description carries the full burden, and it succeeds. It defines each parameter, including udid source, bundleId format, action values, service meaning, and scenario/step audit semantics. The Supported Services list and multiple examples further clarify valid combinations.

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 uses specific verbs ('grants, revokes, or resets') and clearly names the resource ('app privacy permissions on simulators'). It goes beyond the generic title by explaining the no-user-interaction behavior and the audit trail, which distinguishes it from other simctl tools.

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?

Common Use Cases, Testing Workflow, and Permission Testing Strategies give clear, explicit context for when this tool should be used. However, it does not name alternative tools or explicitly state when not to use it, so it stops short of full exclusion guidance.

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