Skip to main content
Glama
Radek44

MCP Tauri Automation

by Radek44

close_app

Gracefully terminate the currently running Tauri desktop application to complete automation workflows or end testing sessions.

Instructions

Close the currently running Tauri application gracefully

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Primary handler function for the 'close_app' tool. Executes driver.closeApp() and returns standardized ToolResponse.
    export async function closeApp(
      driver: TauriDriver
    ): Promise<ToolResponse<{ message: string }>> {
      try {
        await driver.closeApp();
    
        return {
          success: true,
          data: {
            message: 'Application closed successfully',
          },
        };
      } catch (error) {
        return {
          success: false,
          error: error instanceof Error ? error.message : String(error),
        };
      }
    }
  • src/index.ts:76-83 (registration)
    Tool registration in MCP server's ListToolsResponse, defining name, description, and input schema (no required params).
    {
      name: 'close_app',
      description: 'Close the currently running Tauri application gracefully',
      inputSchema: {
        type: 'object',
        properties: {},
      },
    },
  • MCP server dispatcher for 'close_app' tool calls, invokes the handler and returns JSON-formatted response.
    case 'close_app': {
      const result = await closeApp(driver);
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify(result, null, 2),
          },
        ],
      };
    }
  • Core TauriDriver.closeApp() method that terminates the WebDriver session and resets application state.
    async closeApp(): Promise<void> {
      if (!this.appState.browser || !this.appState.isRunning) {
        throw new Error('No application is currently running');
      }
    
      try {
        await this.appState.browser.deleteSession();
      } catch (error) {
        console.error('Error closing browser session:', error);
      } finally {
        this.appState.browser = null;
        this.appState.isRunning = false;
        this.appState.sessionId = undefined;
        this.appState.appPath = undefined;
      }
    }
Behavior4/5

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

With no annotations provided, the description carries full burden and does well by specifying 'gracefully' - indicating proper shutdown procedures rather than force termination. However, it doesn't disclose potential side effects, confirmation requirements, or what 'gracefully' entails operationally.

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?

Single sentence with zero waste - every word contributes essential information. Front-loaded with the core action, followed by target specification and important behavioral qualifier.

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?

For a destructive operation with no annotations and no output schema, the description is minimal but functional. It identifies the action and target but lacks details about success/failure states, side effects, or what 'gracefully' means in practice given the tool's complexity.

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 with 100% schema description coverage, so the baseline is 4. The description appropriately doesn't discuss parameters since none exist, focusing instead on the action's behavioral characteristics.

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 ('close') and target resource ('currently running Tauri application'), with the adverb 'gracefully' adding important behavioral context. It distinguishes itself from sibling tools like 'launch_app' by performing the opposite operation.

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 ('currently running') but doesn't explicitly state when to use this tool versus alternatives or prerequisites. No guidance is provided about what happens if no app is running or whether this should be used instead of force-quitting methods.

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