Skip to main content
Glama

snapshot

Get the accessibility tree from a Tauri window, returning reference numbers to enable click and fill interactions with UI elements.

Instructions

Get accessibility tree (returns ref numbers for click/fill)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
windowNoWindow label (default: focused window)

Implementation Reference

  • Schema definition for the 'snapshot' tool, describing its purpose ('Get accessibility tree') and optional 'window' input parameter.
    snapshot: {
      name: 'snapshot',
      description: 'Get accessibility tree (returns ref numbers for click/fill)',
      inputSchema: z.object({
        window: z.string().optional().describe('Window label (default: focused window)'),
      }),
    },
  • Handler function for the 'snapshot' tool. Calls socketManager.snapshot(args) and returns the formatted result as text content.
    snapshot: async (args: { window?: string }) => {
      const result = await socketManager.snapshot(args);
      return {
        content: [
          {
            type: 'text' as const,
            text: result,
          },
        ],
      };
    },
  • SocketManager.snapshot() helper method that sends a 'snapshot' JSON-RPC command to the Tauri backend and formats the result.
    async snapshot(options?: { window?: string }): Promise<string> {
      const params: Record<string, unknown> = {};
      if (options?.window) params.window = options.window;
    
      const result = await this.sendCommand('snapshot', params) as { window: string; snapshot: string; title: string; url: string };
      // Format as readable output with window label
      return `# [${result.window}] ${result.title}\nURL: ${result.url}\n\n${result.snapshot}`;
    }
  • Registration of 'snapshot' in the DEFAULT_ESSENTIAL_TOOLS list, ensuring it's included by default in the MCP server tool listing.
    const DEFAULT_ESSENTIAL_TOOLS = [
      'get_session_status',
      'start_session',
      'stop_session',
      'snapshot',
      'click',
      'fill',
      'screenshot',
      'navigate',
    ];
Behavior3/5

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

The description mentions the return value (ref numbers) and hints at read-only nature, but does not disclose error conditions, effects, or permissions. Without annotations, this is adequate but not thorough.

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?

The description is a single, front-loaded sentence that conveys the core functionality without extraneous words. It is 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 simple tool with one optional parameter and no output schema, the description adequately covers what it does and what it returns. It could mention preconditions or errors, but remains mostly sufficient.

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 only parameter 'window' is fully described in the input schema. The description adds no additional information about parameter usage or defaults, so it meets the baseline for high schema coverage.

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 description clearly states the action 'Get accessibility tree' and its output 'returns ref numbers for click/fill', which distinguishes it from sibling tools like click and fill. It is specific about the resource and purpose.

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 use before actions like click or fill, but does not explicitly state when to use it or provide alternatives. No comparison with siblings is given.

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/DaveDev42/tauri-plugin-mcp'

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