Skip to main content
Glama

get_screen_info

Read-only

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,
      },
    },
Behavior4/5

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

Annotations already declare readOnlyHint=true and destructiveHint=false, covering safety. The description adds useful context about what specific display attributes are retrieved (resolution, origin, scale factor), which helps the agent understand the return format. However, it doesn't mention potential platform-specific behavior, refresh rates, or multi-monitor edge cases.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single, dense sentence with zero waste—every word contributes to understanding the tool's purpose and output. It's front-loaded with the core action ('Retrieve display configuration') followed by specific attributes, making it efficient and scannable.

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 zero-parameter read-only tool with annotations covering safety, the description is nearly complete—it clearly states what data is returned. A minor gap is the lack of output schema or details on return format (e.g., structured object vs. raw text), but given the simplicity and annotations, this is acceptable.

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?

With 0 parameters and 100% schema description coverage, the baseline is 4. The description appropriately omits parameter details since none exist, focusing instead on the return value semantics (what display configuration data is retrieved).

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 specific action ('Retrieve') and resource ('display configuration'), listing exact attributes returned (number of displays, resolution, origin, scale factor). It distinguishes itself from sibling tools like 'screenshot' or 'get_cursor_position' by focusing on hardware/OS-level display metadata rather than visual capture or pointer location.

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 implies usage for obtaining display hardware/software configuration details, but provides no explicit guidance on when to choose this over alternatives like 'screenshot' (for visual data) or 'get_ui_elements' (for UI component details). No prerequisites, exclusions, or comparative context with siblings are mentioned.

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

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