Skip to main content
Glama
conorluddy

XC-MCP: XCode CLI wrapper

by conorluddy

Open URL on Simulator

simctl-openurl

Open any URL in an iOS Simulator to test deep links, universal links, and custom URL schemes. Route web, mailto, tel, or app-specific URLs to the appropriate handler.

Instructions

simctl-openurl

Open URLs in a simulator, including web URLs, deep links, and special URL schemes.

What it does

Opens a URL in the simulator, which can be a web URL (http/https), custom app deep link (myapp://), or special URL scheme (mailto:, tel:, sms:). The system will route the URL to the appropriate app handler.

Parameters

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

  • url (string, required): URL to open (e.g., https://example.com or myapp://deeplink?id=123)

Supported URL Schemes

  • HTTP/HTTPS: Web URLs (opens in Safari)

  • Custom schemes: Deep links to your app (myapp://, yourapp://)

  • mailto: Email composition (opens Mail app)

  • tel: Phone dialer (opens Phone app on iPhone)

  • sms: SMS composition (opens Messages app)

  • facetime: FaceTime calls

  • maps: Apple Maps URLs

Returns

JSON response with:

  • URL open status

  • Detected URL scheme

  • Guidance for testing URL handling and deep links

Examples

Open web URL

await simctlOpenUrlTool({
  udid: 'device-123',
  url: 'https://example.com'
})
await simctlOpenUrlTool({
  udid: 'device-123',
  url: 'myapp://open?id=123&action=view'
})
await simctlOpenUrlTool({
  udid: 'device-123',
  url: 'mailto:test@example.com?subject=Hello'
})
await simctlOpenUrlTool({
  udid: 'device-123',
  url: 'tel:+1234567890'
})

Common Use Cases

  1. Deep link testing: Verify app handles custom URL schemes correctly

  2. Universal links: Test https:// URLs that open your app

  3. Navigation testing: Confirm deep links navigate to correct screens

  4. Parameter parsing: Verify URL parameters are parsed correctly

  5. Fallback handling: Test behavior when no handler is registered

Important Notes

  • Simulator must be booted: URLs can only be opened on running simulators

  • Handler registration: Custom schemes require an app that handles them

  • URL encoding: Ensure URL parameters are properly encoded

  • Timing: Consider launching app first if testing immediate URL handling

Error Handling

  • No handler registered: Error if no app handles the URL scheme

  • Simulator not booted: Indicates simulator must be booted first

  • Invalid URL format: Validates URL has proper scheme and format

  • Simulator not found: Validates simulator exists in cache

  1. Install app: simctl-install <udid> /path/to/App.app

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

  3. Open deep link: simctl-openurl <udid> myapp://route?param=value

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

  5. Check logs: Monitor console for URL handling logs

Testing Strategies

  • Parameter variations: Test different query parameters

  • Invalid URLs: Verify error handling for malformed URLs

  • Background handling: Test URLs when app is backgrounded

  • Fresh launch: Test URLs when app is not running

  • State preservation: Verify app state is maintained after URL handling

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYes
udidYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.1.0

TDQS

A4.4/5.0
Behavior4/5

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

Annotations are all false, so the description carries the full burden. It states that URLs are routed to the appropriate handler, lists supported schemes, and describes error conditions (no handler, simulator not booted, invalid URL) and return format (JSON with status and detected scheme). It also notes prerequisites like the simulator being booted. This goes beyond the annotations and provides valuable behavioral context for an agent.

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 thorough but verbose, running many sections: 'What it does', 'Parameters', 'Supported URL Schemes', 'Returns', 'Examples', 'Common Use Cases', 'Important Notes', 'Error Handling', 'Deep Link Testing Workflow', and 'Testing Strategies'. It is well-structured and front-loaded with a summary, but significant redundancy exists (e.g., use cases overlap with testing strategies). For a tool with only two parameters, the length is excessive, though each section does add some value.

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 values ('JSON response with URL open status, detected URL scheme, guidance'). It covers error scenarios, prerequisites, and supported URL schemes comprehensively. The workflow integrates with sibling tools (install, launch) and mentions taking screenshots via simctl-io, providing a complete picture of how to use this tool in context. Nothing an agent needs to invoke it correctly is missing.

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 coverage is 0%, so the description must compensate. It explicitly documents both parameters: udid (stated as coming from simctl-list) and url (with examples of web, deep links, and mailto/tel). It clarifies the expected format for url via the 'Supported URL Schemes' section and provides multiple code examples showing valid values. This adds substantial meaning beyond the bare schema.

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 opens with a clear statement: 'Open URLs in a simulator, including web URLs, deep links, and special URL schemes.' It names the verb (open), resource (URL), and scope (simulator), and further differentiates by listing supported scheme categories. This distinguishes it from sibling tools like simctl-launch (which launches apps) and simctl-install (which installs apps).

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 includes a 'Common Use Cases' section (deep link testing, universal links, navigation testing) and a 'Deep Link Testing Workflow' that shows it as step 3 after install and launch. This gives implicit context for when to use it, though it does not explicitly contrast with alternatives like idb-launch or simctl-launch. The workflow implies 'open URLs' is separate from launching, but no explicit 'use this instead of X' statement exists.

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