Skip to main content
Glama

ui_describe_all

Retrieve accessibility information for the entire screen in iOS Simulator to inspect UI elements and analyze screen content for testing and development purposes.

Instructions

Describes accessibility information for the entire screen in the iOS Simulator

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
udidNoUdid of target, can also be set with the IDB_UDID env var

Implementation Reference

  • src/index.ts:225-268 (registration)
    Registration of the 'ui_describe_all' tool using server.tool(), conditional on not being filtered. Includes schema validation and handler function.
    if (!isToolFiltered("ui_describe_all")) { server.tool( "ui_describe_all", "Describes accessibility information for the entire screen in the iOS Simulator", { udid: z .string() .regex(UDID_REGEX) .optional() .describe("Udid of target, can also be set with the IDB_UDID env var"), }, async ({ udid }) => { try { const actualUdid = await getBootedDeviceId(udid); const { stdout } = await idb( "ui", "describe-all", "--udid", actualUdid, "--json", "--nested" ); return { isError: false, content: [{ type: "text", text: stdout }], }; } catch (error) { return { isError: true, content: [ { type: "text", text: errorWithTroubleshooting( `Error describing all of the ui: ${toError(error).message}` ), }, ], }; } } ); }
  • Handler function executes idb 'ui describe-all --json --nested' on the target UDID (defaulting to booted simulator) and returns the stdout as text content, with error handling.
    async ({ udid }) => { try { const actualUdid = await getBootedDeviceId(udid); const { stdout } = await idb( "ui", "describe-all", "--udid", actualUdid, "--json", "--nested" ); return { isError: false, content: [{ type: "text", text: stdout }], }; } catch (error) { return { isError: true, content: [ { type: "text", text: errorWithTroubleshooting( `Error describing all of the ui: ${toError(error).message}` ), }, ], }; } }
  • Input schema using Zod: optional 'udid' string matching UDID_REGEX.
    { udid: z .string() .regex(UDID_REGEX) .optional() .describe("Udid of target, can also be set with the IDB_UDID env var"), },
  • UDID_REGEX constant used for validating the udid parameter in the schema.
    const UDID_REGEX = /^[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{12}$/;
  • getBootedDeviceId helper function used in the handler to resolve the target UDID.
    async function getBootedDeviceId( deviceId: string | undefined ): Promise<string> { // If deviceId not provided, get the currently booted simulator let actualDeviceId = deviceId; if (!actualDeviceId) { const { id } = await getBootedDevice(); actualDeviceId = id; } if (!actualDeviceId) { throw new Error("No booted simulator found and no deviceId provided"); } return actualDeviceId; }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/joshuayoes/ios-simulator-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server