Skip to main content
Glama
Radek44
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; } }

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