Skip to main content
Glama
Radek44
by Radek44

close_app

Close the currently running Tauri desktop application to end automation sessions and free system resources.

Instructions

Close the currently running Tauri application gracefully

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The exported closeApp function that serves as the primary tool handler. It calls the driver's closeApp method and returns a 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 the MCP server's listTools handler, defining name, description, and input schema (no parameters required).
    { name: 'close_app', description: 'Close the currently running Tauri application gracefully', inputSchema: { type: 'object', properties: {}, }, },
  • MCP callTool dispatch for 'close_app', invoking the tool handler and formatting the response.
    case 'close_app': { const result = await closeApp(driver); return { content: [ { type: 'text', text: JSON.stringify(result, null, 2), }, ], }; }
  • Core implementation in TauriDriver that closes the WebDriver session, effectively shutting down the Tauri app.
    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