Skip to main content
Glama
Radek44

MCP Tauri Automation

by Radek44

get_app_state

Retrieve the current application state, including running status, session information, and page details for Tauri desktop application automation and testing.

Instructions

Get the current state of the application, including whether it's running, session info, and page details

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Main tool handler: Fetches app state from driver, adds page title and URL if running, returns ToolResponse.
    export async function getAppState(
      driver: TauriDriver
    ): Promise<ToolResponse<{
      isRunning: boolean;
      appPath?: string;
      sessionId?: string;
      pageTitle?: string;
      pageUrl?: string;
    }>> {
      try {
        const state = driver.getAppState();
        let pageTitle: string | undefined;
        let pageUrl: string | undefined;
    
        if (state.isRunning) {
          try {
            pageTitle = await driver.getPageTitle();
            pageUrl = await driver.getPageUrl();
          } catch (error) {
            // Ignore errors getting page info
          }
        }
    
        return {
          success: true,
          data: {
            isRunning: state.isRunning,
            appPath: state.appPath,
            sessionId: state.sessionId,
            pageTitle,
            pageUrl,
          },
        };
      } catch (error) {
        return {
          success: false,
          error: error instanceof Error ? error.message : String(error),
        };
      }
    }
  • Tool schema registration: Defines name, description, and empty input schema in ListTools response.
    {
      name: 'get_app_state',
      description: 'Get the current state of the application, including whether it\'s running, session info, and page details',
      inputSchema: {
        type: 'object',
        properties: {},
      },
    },
  • src/index.ts:322-332 (registration)
    Tool dispatch registration: Switch case in CallToolRequestHandler that invokes the getAppState handler.
    case 'get_app_state': {
      const result = await getAppState(driver);
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify(result, null, 2),
          },
        ],
      };
    }
  • Core helper: TauriDriver.getAppState() returns the internal app state.
    getAppState(): Readonly<AppState> {
      return {
        isRunning: this.appState.isRunning,
        browser: this.appState.browser,
        processId: this.appState.processId,
        appPath: this.appState.appPath,
        sessionId: this.appState.sessionId,
      };
    }
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool retrieves information ('Get'), implying it's a read-only operation, but doesn't specify whether it requires authentication, has rate limits, or what happens on errors. For a tool with zero annotation coverage, this leaves significant behavioral gaps unaddressed, though it at least indicates the type of operation.

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, efficient sentence that front-loads the core purpose ('Get the current state of the application') and adds specifics without unnecessary elaboration. Every part earns its place by clarifying what information is included. It could be slightly more structured but remains highly concise.

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

Completeness3/5

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

Given the tool's low complexity (0 parameters, no output schema, no annotations), the description is adequate but minimal. It covers the purpose and scope of information retrieved, but lacks details on behavioral aspects like error handling or return format. For a read-only tool with no structured output, more context on what the state includes would be helpful, though it meets minimum viability.

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?

The tool has 0 parameters, and schema description coverage is 100%, so there are no parameters to document. The description appropriately doesn't discuss parameters, which is correct for this case. Baseline for 0 parameters is 4, as there's no need to compensate for missing parameter information.

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 tool's purpose with specific verbs ('Get') and resources ('current state of the application'), and lists what information is included ('whether it's running, session info, and page details'). It distinguishes from siblings by focusing on application state retrieval rather than interaction or control operations. However, it doesn't explicitly differentiate from all possible siblings in a structured way.

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 context through the information it retrieves (application state, session info, page details), suggesting it should be used when checking application status or context. However, it provides no explicit guidance on when to use this tool versus alternatives, nor does it mention prerequisites or exclusions. The context is implied but not clearly articulated.

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/Radek44/mcp-tauri-automation'

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