Skip to main content
Glama
TrueOleg

MCP Mac Apps Server

by TrueOleg

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"))
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. 'Закрывает' implies a destructive/mutative operation, but it doesn't specify whether this is a graceful shutdown or force-quit, what permissions are required, whether unsaved data might be lost, or what happens if the app isn't running. For a destructive tool with zero annotation coverage, this is inadequate.

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?

The description is a single, efficient sentence in Russian that directly states the tool's function. There's no wasted verbiage or unnecessary elaboration. It's appropriately sized for a simple tool with one parameter.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a destructive tool with no annotations and no output schema, the description is insufficient. It doesn't explain what 'closing' entails behaviorally, what happens on success/failure, or any side effects. The agent lacks critical information about this mutation operation's consequences and expected outcomes.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, with the single parameter 'appName' clearly documented in the schema as 'Имя приложения для закрытия' (Name of the application to close). The description doesn't add any parameter details beyond what the schema provides, such as format examples or constraints. Baseline 3 is appropriate when the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('закрывает' - closes) and the target resource ('указанное приложение' - the specified application). It distinguishes from siblings like 'open_application' and 'get_running_applications' by specifying a closing action rather than opening or listing. However, it doesn't specify whether this is graceful termination or force-quit, which prevents a perfect score.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., the application must be running), exclusions, or comparison with similar tools like 'run_applescript' which might also close applications. The agent must infer usage context from the tool name alone.

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

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