Skip to main content
Glama

activate_layout

Enable programmatic activation of Moom window layouts on macOS by specifying the desired layout name through the Moom MCP Server, streamlining workspace management.

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

  • The core handler function that executes the 'activate_layout' tool by running AppleScript to instruct the Moom application 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}`, }, ], }; } }
  • Input schema validation for the tool, requiring a 'layoutName' string parameter.
    inputSchema: { type: 'object', properties: { layoutName: { type: 'string', description: 'Name of the layout to activate (e.g., "Teaching (Mac Mini)", "AI Research Mode")', }, }, required: ['layoutName'], },
  • src/index.js:32-45 (registration)
    Registration of the 'activate_layout' tool in the ListToolsRequestSchema handler, providing name, description, and 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'], }, },
  • Dispatch logic in the CallToolRequestSchema handler that routes calls to 'activate_layout' to the activateLayout method.
    case 'activate_layout': return await this.activateLayout(args.layoutName);

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