Skip to main content
Glama

quit_application

Close specified macOS applications using the MCP Mac Apps Server. Provide the app name to terminate running processes.

Instructions

Закрывает указанное приложение

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
appNameYesИмя приложения для закрытия

Implementation Reference

  • The handler function that implements the quit_application tool by running an AppleScript to quit the macOS application named appName.
    private async quitApplication(appName: string) { try { const appleScript = ` tell application "${appName}" quit end tell `; await execAsync(`osascript -e '${appleScript.replace(/'/g, "'\\''")}'`); return { content: [ { type: "text", text: `Приложение "${appName}" закрыто`, }, ], }; } catch (error) { throw new Error( `Не удалось закрыть приложение "${appName}": ${error instanceof Error ? error.message : String(error)}` ); } }
  • The handler function that implements the quit_application tool by running an AppleScript to quit the macOS application named app_name.
    def quit_application(app_name: str) -> str: """Closes application""" apple_script = f'tell application "{app_name}"\nquit\nend tell' apple_script_escaped = apple_script.replace("'", "'\\''") stdout, stderr = exec_command(f"osascript -e '{apple_script_escaped}'") if stderr: raise Exception(f'Failed to close application "{app_name}": {stderr}') return f'Application "{app_name}" closed'
  • Input schema definition for the quit_application tool in the tools list.
    name: "quit_application", description: "Закрывает указанное приложение", inputSchema: { type: "object", properties: { appName: { type: "string", description: "Имя приложения для закрытия", }, }, required: ["appName"], }, },
  • Input schema definition for the quit_application tool in the tools list.
    "name": "quit_application", "description": "Closes specified application", "inputSchema": { "type": "object", "properties": { "appName": { "type": "string", "description": "Application name to close", }, }, "required": ["appName"], }, },
  • src/index.ts:320-322 (registration)
    Dispatch/registration case in the tool request handler switch statement.
    case "quit_application": return await this.quitApplication(args?.appName as string);

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/TrueOleg/MCP-expirements'

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