Skip to main content
Glama
Szowesgad

automator-mcp

by Szowesgad

system_automation

Execute system-level automation tasks on macOS, including managing files, controlling displays, capturing screenshots, and toggling system settings through predefined commands.

Instructions

Perform system-level automation tasks

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
taskYesSystem task to perform
parametersNoTask-specific parameters

Implementation Reference

  • The main handler function for the 'system_automation' tool. It maps tasks to AppleScript commands and executes them using runAppleScript.
    async runSystemAutomation(args) {
      const { task, parameters = {} } = args;
      
      const systemTasks = {
        empty_trash: 'tell application "Finder" to empty trash',
        show_desktop: 'tell application "Finder" to reveal desktop',
        hide_all_apps: 'tell application "System Events" to set visible of every process to false',
        sleep_display: 'do shell script "pmset displaysleepnow"',
        take_screenshot: 'do shell script "screencapture -i ~/Desktop/screenshot.png"',
        start_screensaver: 'tell application "System Events" to start current screen saver',
        toggle_dark_mode: `
          tell application "System Events"
            tell appearance preferences
              set dark mode to not dark mode
            end tell
          end tell
        `,
        get_system_info: `
          set sysInfo to system info
          return (computer name of sysInfo) & " - " & (system version of sysInfo)
        `,
      };
      
      if (systemTasks[task]) {
        return await this.runAppleScript(systemTasks[task]);
      }
      
      throw new Error(`Unknown system task: ${task}`);
    }
  • The tool schema registration, including name, description, and input schema definition for 'system_automation'.
    {
      name: 'system_automation',
      description: 'Perform system-level automation tasks',
      inputSchema: {
        type: 'object',
        properties: {
          task: {
            type: 'string',
            enum: [
              'empty_trash',
              'show_desktop',
              'hide_all_apps',
              'sleep_display',
              'take_screenshot',
              'start_screensaver',
              'toggle_dark_mode',
              'get_system_info',
            ],
            description: 'System task to perform',
          },
          parameters: {
            type: 'object',
            description: 'Task-specific parameters',
          },
        },
        required: ['task'],
      },
    },
  • src/index.js:190-191 (registration)
    Dispatch case in the CallToolRequestSchema handler that routes 'system_automation' calls to the runSystemAutomation method.
    case 'system_automation':
      return await this.runSystemAutomation(args);

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/Szowesgad/automator-mcp'

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