Skip to main content
Glama

ui_describe_all

Read-only

Retrieves accessibility information for all UI elements visible on the iOS Simulator screen.

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:281-284 (registration)
    Conditional registration of the ui_describe_all tool, wrapped in isToolFiltered check
    if (!isToolFiltered("ui_describe_all")) {
      server.tool(
        "ui_describe_all",
        "Describes accessibility information for the entire screen in the iOS Simulator",
  • Input schema for ui_describe_all: accepts an optional udid parameter (UUID format)
    {
      udid: z
        .string()
        .regex(UDID_REGEX)
        .optional()
        .describe("Udid of target, can also be set with the IDB_UDID env var"),
    },
  • Handler function for ui_describe_all: resolves UDID, calls idb ui describe-all --udid --json --nested, returns accessibility info as text
      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}`
                ),
              },
            ],
          };
        }
      }
    );
  • ui_describe_all result reused by ui_view tool to get screen dimensions (width/height in points) for screenshot resizing
    // Get screen dimensions in points from ui_describe_all
    const { stdout: uiDescribeOutput } = await idb(
      "ui",
      "describe-all",
      "--udid",
      actualUdid,
      "--json",
      "--nested"
    );
    
    let uiData: unknown;
    try {
      uiData = JSON.parse(uiDescribeOutput);
    } catch {
      throw new Error("Failed to parse screen dimensions: idb returned invalid JSON");
    }
    const screenFrame = (uiData as Array<{ frame?: { width: unknown; height: unknown } }>)[0]?.frame;
    if (
      !screenFrame ||
      typeof screenFrame.width !== "number" ||
      typeof screenFrame.height !== "number" ||
      screenFrame.width <= 0 ||
      screenFrame.height <= 0
    ) {
      throw new Error("Could not determine valid screen dimensions from idb output");
    }
    
    const pointWidth = screenFrame.width;
    const pointHeight = screenFrame.height;
Behavior2/5

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

Annotations already declare readOnlyHint=true and openWorldHint=true, covering safety and side-effect information. The description adds no further behavioral context (e.g., what 'accessibility information' entails, performance implications, or behavior on non-accessible screens).

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 a single, clear sentence with no unnecessary words. It is appropriately front-loaded, though could benefit from slight restructuring to include return behavior.

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

Completeness2/5

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

Despite the tool's simplicity, the description omits return value details (e.g., format, structure, whether it returns a list or tree of elements). With no output schema, this gap reduces completeness for an agent needing to process results.

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

Parameters3/5

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

The single optional parameter 'udid' is fully described in the schema (UUID pattern, env var fallback). The description provides no additional parameter semantics, but with 100% schema coverage, a score of 3 is appropriate.

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 the verb 'describe' and the resource 'accessibility information for the entire screen in the iOS Simulator'. It differentiates from siblings like ui_describe_point (point-specific) and ui_find_element (element search), making purpose unambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description only implies usage for obtaining full-screen accessibility info. It provides no explicit guidance on when to use versus alternatives (e.g., ui_describe_point for specific points, ui_find_element for targeted elements) or when not to use.

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

Install Server

Other Tools

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