Skip to main content
Glama

get_screen_info

Retrieve display configuration details including screen count, resolutions, positions, and scaling factors for macOS desktop automation.

Instructions

Retrieve display configuration: number of displays, per-display resolution, origin, and scale factor.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function that executes the get_screen_info tool logic by invoking the Swift helper and formatting the output.
    async function handleGetScreenInfo(): Promise<CallToolResult> {
      const response = await runInputHelper("display_info", {});
      const { displays: rawDisplays } = DisplayInfoResponseSchema.parse(response);
    
      const displays: DisplayInfo[] = rawDisplays.map((d) => ({
        name: d.name,
        resolution: { width: d.width, height: d.height },
        origin: { x: d.x, y: d.y },
        scaleFactor: d.scaleFactor,
      }));
    
      const result = {
        displayCount: displays.length,
        displays,
      };
    
      return {
        content: [
          {
            type: "text" as const,
            text: JSON.stringify(result, null, 2),
          },
        ],
      };
    }
  • Input validation schema for get_screen_info tool.
    const GetScreenInfoInputSchema = z.object({});
  • Registration definition for the get_screen_info tool.
    {
      name: "get_screen_info",
      description:
        "Retrieve display configuration: number of displays, per-display resolution, origin, and scale factor.",
      inputSchema: zodToToolInputSchema(GetScreenInfoInputSchema),
      annotations: {
        readOnlyHint: true,
        destructiveHint: false,
      },
    },

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/antbotlab/mac-use-mcp'

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