Skip to main content
Glama
itrimble

Moom MCP Server

by itrimble

get_monitors

Retrieve monitor configuration data to adapt window layouts on macOS for improved workspace organization.

Instructions

Get monitor configuration data for layout adaptation

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Main handler function that runs 'displayplacer list', parses output using parseDisplayInfo, and returns formatted monitor configuration.
    async getMonitors() {
      try {
        const output = execSync('displayplacer list', { encoding: 'utf8' });
        const displays = this.parseDisplayInfo(output);
        
        return {
          content: [{
            type: 'text',
            text: `Monitor Configuration:\n${displays.map((d, i) => 
              `Display ${i + 1}: ${d.width}x${d.height} at (${d.x}, ${d.y})${d.isMain ? ' [Main]' : ''}`
            ).join('\n')}`
          }]
        };
      } catch (error) {
        return {
          content: [{
            type: 'text',
            text: `Error getting monitor info: ${error.message}`
          }]
        };
      }
    }
  • src/index.js:150-157 (registration)
    Tool registration entry in ListTools response defining name, description, and empty input schema.
    {
      name: 'get_monitors',
      description: 'Get monitor configuration data for layout adaptation',
      inputSchema: {
        type: 'object',
        properties: {},
      },
    },
  • src/index.js:227-228 (registration)
    Dispatch case in CallToolRequest handler that routes to the getMonitors implementation.
    case 'get_monitors':
      return await this.getMonitors();
  • Input schema definition (empty object, no parameters required).
    inputSchema: {
      type: 'object',
      properties: {},
    },
  • Helper function to parse displayplacer output into structured monitor data (width, height, position, main status).
    parseDisplayInfo(output) {
      const displays = [];
      const lines = output.split('\n');
      let currentDisplay = {};
    
      for (const line of lines) {
        if (line.includes('Persistent screen id:')) {
          if (currentDisplay.id) displays.push(currentDisplay);
          currentDisplay = { id: line.split(': ')[1] };
        } else if (line.includes('Type:')) {
          currentDisplay.type = line.split(': ')[1];
        } else if (line.includes('Resolution:')) {
          const res = line.match(/(\d+)x(\d+)/);
          if (res) {
            currentDisplay.width = parseInt(res[1]);
            currentDisplay.height = parseInt(res[2]);
          }
        } else if (line.includes('Origin:')) {
          const origin = line.match(/\((-?\d+),(-?\d+)\)/);
          if (origin) {
            currentDisplay.x = parseInt(origin[1]);
            currentDisplay.y = parseInt(origin[2]);
          }
        } else if (line.includes('Main Display: Yes')) {
          currentDisplay.isMain = true;
        }
      }
      
      if (currentDisplay.id) displays.push(currentDisplay);
      return displays;
    }
Behavior2/5

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

No annotations are provided, so the description carries the full burden. It states the tool retrieves configuration data, implying a read-only operation, but doesn't disclose behavioral traits such as whether it requires permissions, returns real-time or cached data, has rate limits, or what format the data is in. This is a significant gap for a tool with zero annotation coverage.

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 with no wasted words. It is front-loaded with the core purpose and includes necessary context, making it appropriately sized and easy to parse.

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

Completeness3/5

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

Given the tool's complexity (simple read operation with no parameters) and lack of annotations and output schema, the description is minimally adequate. It states what the tool does but lacks details on behavior, output format, or integration with sibling tools, leaving gaps that could hinder effective use by an AI agent.

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

Parameters4/5

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

The tool has 0 parameters, and schema description coverage is 100%, so there are no parameters to document. The description adds context by specifying the data is for 'layout adaptation', which provides semantic value beyond the empty schema. Baseline for 0 parameters is 4, as the description compensates adequately.

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 tool's purpose with a specific verb ('Get') and resource ('monitor configuration data'), and specifies the context ('for layout adaptation'). It doesn't explicitly differentiate from sibling tools like 'list_layouts' or 'create_quad_layout', but the focus on monitor configuration provides some implicit distinction.

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, timing, or relationships to sibling tools like 'list_layouts' or 'create_custom_grid_layout', leaving the agent to infer usage context from the purpose 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/itrimble/moom-mcp'

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