Skip to main content
Glama

quit_application

Close a specified macOS application through the MCP Mac Apps Server. This tool terminates running apps by name, helping users manage system resources and control active processes.

Instructions

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

Input Schema

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

Implementation Reference

  • The core handler function that executes the quit_application tool by running an AppleScript command via osascript to quit the specified macOS application.
    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'
  • The core handler method that executes the quit_application tool by running an AppleScript command via osascript to quit the specified macOS application (TypeScript implementation).
    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 input schema definition for the quit_application tool, specifying appName as required string parameter.
    "name": "quit_application", "description": "Closes specified application", "inputSchema": { "type": "object", "properties": { "appName": { "type": "string", "description": "Application name to close", }, }, "required": ["appName"], }, },
  • The input schema definition for the quit_application tool (TypeScript version, in Russian).
    name: "quit_application", description: "Закрывает указанное приложение", inputSchema: { type: "object", properties: { appName: { type: "string", description: "Имя приложения для закрытия", }, }, required: ["appName"], },
  • src/server.py:603-604 (registration)
    The dispatch/registration code in the main request handler that routes tool calls to the quit_application function.
    elif tool_name == "quit_application": result_text = quit_application(arguments.get("appName"))

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