Skip to main content
Glama
XC-MCP: XCode CLI wrapper

XC-MCP: XCode CLI wrapper

by conorluddy

Duo Pose and State

simctl-duo
Idempotent

Control a booted Duo simulator's hinge angle or pose and interface orientation, then read back observed state using an explicit UDID.

Instructions

simctl-duo

Control a booted Duo's hinge and interface orientation, with observed state readback.

Requires an explicit simulator UDID. operation: state, hinge, or rotate. hinge accepts angle (0–180 degrees) or pose (closed=0, partial=90, open=180), exclusively. rotate accepts orientation: portrait, landscape, portrait-upside-down, landscape-flipped. The private helper is compiled with Xcode on first use. No additional CLI is required. Changes poll readback for five seconds; hinge tolerance is two degrees. Endpoint changes also verify the active cover/inner display. Intermediate angles do not imply a specific display. Research credits: https://github.com/artemnovichkov/hinge and https://github.com/skarol/duoctl. Replace the private backend when supported headless APIs provide equivalent verified behavior; XCTest-only hinge APIs are insufficient. Folding and rotation can migrate independently. idb coordinate touches on the inner screen are unverified. Use explicit display screenshots.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "udid": "<udid>",
      "operation": "<operation>"
    },
    "name": "simctl-duo"
  }
}

Input Schema

NameRequiredDescriptionDefault
poseNo
udidYes
angleNo
operationYes
orientationNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv5.2.0

TDQS

A4.2/5.0
Behavior5/5

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

Beyond the annotations it discloses a real side effect: a private helper is compiled with Xcode on first use, which explains why readOnlyHint is false even for the state operation. It also gives concrete timing and tolerance behavior (five-second readback polling, two-degree hinge tolerance), notes that endpoint changes verify the active cover/inner display, and flags that folding and rotation can migrate independently. These are exactly the operational traits an agent cannot infer from the hints alone.

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 purpose and precondition are front-loaded before the per-operation detail, and the caveats are grouped at the end where an agent will still read them. Density is high with almost no filler sentences. The research credit URLs and the note about replacing the private backend are somewhat tangential for a caller, though defensible as maintenance context.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a five-parameter, three-mode tool with no output schema, the description supplies the mode semantics, verification behavior, timing, and known reliability limits. The main gap is that it never describes the shape of the 'state readback' payload, which an agent needs to interpret results since no output schema exists. Everything needed to invoke the tool correctly is present.

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?

Schema description coverage is 0%, so the description carries the burden, and it covers all five parameters: udid, operation, the angle/pose pair, and orientation. Most valuable is the pose-to-angle mapping (closed=0, partial=90, open=180) and the mutual exclusivity of angle and pose, neither of which the schema expresses. The 0-180 range and the orientation/pose enum values are restatements of schema constraints, which slightly dilutes the added value.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The opening line gives a specific verb and resource: control a booted Duo's hinge and interface orientation, with observed state readback. The three operations (state, hinge, rotate) are then enumerated, so an agent knows exactly what capability surface this covers. It stops short of naming a sibling it is not, but no sibling in the catalog plausibly competes for hinge/rotation control.

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?

It states the required precondition (explicit simulator UDID) and maps each operation to its accepted parameters, including the exclusivity rule that hinge takes angle or pose but not both. It also warns that intermediate angles do not imply a specific display and that idb coordinate touches are unverified, steering the agent toward screenshots. There is no explicit when-not or named alternative, which keeps it out of the top band.

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