Skip to main content
Glama
itrimble

Moom MCP Server

by itrimble

activate_layout

Activate a specific Moom window layout by name to organize macOS desktop windows for different workflows and tasks.

Instructions

Activate a specific Moom layout by name

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
layoutNameYesName of the layout to activate (e.g., "Teaching (Mac Mini)", "AI Research Mode")

Implementation Reference

  • Core handler function that executes the tool by sending an AppleScript command to Moom to apply the specified layout.
    async activateLayout(layoutName) {
      // Use AppleScript to apply layout
      const script = `
        tell application "Moom"
          apply layout "${layoutName}"
        end tell
      `;    
      try {
        await this.runAppleScript(script);
        return {
          content: [
            {
              type: 'text',
              text: `Successfully activated layout: ${layoutName}`,
            },
          ],
        };
      } catch (error) {
        return {
          content: [
            {
              type: 'text',
              text: `Error: ${error.message}`,
            },
          ],
        };
      }
    }
  • src/index.js:33-45 (registration)
    Tool registration in the MCP ListTools response, defining name, description, and input schema.
      name: 'activate_layout',
      description: 'Activate a specific Moom layout by name',
      inputSchema: {
        type: 'object',
        properties: {
          layoutName: {
            type: 'string',
            description: 'Name of the layout to activate (e.g., "Teaching (Mac Mini)", "AI Research Mode")',
          },
        },
        required: ['layoutName'],
      },
    },
  • Input schema defining the expected parameters for the activate_layout tool.
    inputSchema: {
      type: 'object',
      properties: {
        layoutName: {
          type: 'string',
          description: 'Name of the layout to activate (e.g., "Teaching (Mac Mini)", "AI Research Mode")',
        },
      },
      required: ['layoutName'],
    },
  • Dispatch handler in the CallToolRequest switch statement that routes to the activateLayout method.
    case 'activate_layout':
      return await this.activateLayout(args.layoutName);
  • Helper function used by activateLayout to execute AppleScript commands.
    async runAppleScript(script) {
      try {
        const { stdout, stderr } = await execAsync(`osascript -e '${script}'`);
        if (stderr) {
          throw new Error(stderr);
        }
        return stdout.trim();
      } catch (error) {
        throw new Error(`AppleScript error: ${error.message}`);
      }
    }
Behavior2/5

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

No annotations are provided, so the description carries full burden for behavioral disclosure. While 'Activate' implies a state change, it doesn't specify whether this requires permissions, has side effects (e.g., rearranging windows), or what happens on success/failure. The description lacks critical behavioral context for a mutation tool.

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 that directly states the tool's function without unnecessary words. It's appropriately sized and front-loaded, with every word contributing to understanding the purpose.

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?

Given no annotations, no output schema, and a mutation tool with behavioral implications, the description is incomplete. It doesn't address what 'activate' entails operationally, potential errors, or results, leaving significant gaps for an agent to use this tool effectively.

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 'layoutName' fully documented in the schema. The description adds no additional parameter semantics beyond implying activation by name, which the schema already covers. This meets the baseline for high schema coverage.

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 ('Activate') and target resource ('Moom layout by name'), making the purpose immediately understandable. However, it doesn't differentiate this tool from its siblings like 'list_layouts' or 'save_current_layout' beyond the activation function, 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. With siblings like 'list_layouts' (which might be needed first to know layout names) and 'trigger_moom_action' (which might offer similar functionality), there's no indication of prerequisites, exclusions, or comparative context.

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/itrimble/moom-mcp'

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