Skip to main content
Glama
yctimlin

Excalidraw MCP Server

by yctimlin

distribute_elements

Evenly space elements in Excalidraw diagrams horizontally or vertically by specifying element IDs and direction.

Instructions

Distribute elements evenly

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
directionYes
elementIdsYes

Implementation Reference

  • Handler for distribute_elements tool: parses input using DistributeElementsSchema, logs the action (placeholder implementation), and returns a success result.
    case 'distribute_elements': {
      const params = DistributeElementsSchema.parse(args);
      const { elementIds, direction } = params;
      
      // Implementation would distribute elements based on the specified direction
      logger.info('Distributing elements', { elementIds, direction });
      
      const result = { distributed: true, elementIds, direction };
      return {
        content: [{ type: 'text', text: JSON.stringify(result, null, 2) }]
      };
    }
  • Zod schema for validating distribute_elements tool input parameters: array of element IDs and direction (horizontal or vertical).
    const DistributeElementsSchema = z.object({
      elementIds: z.array(z.string()),
      direction: z.enum(['horizontal', 'vertical'])
    });
  • src/index.ts:371-388 (registration)
    Tool registration in the tools array, defining name, description, and inputSchema for distribute_elements.
    {
      name: 'distribute_elements',
      description: 'Distribute elements evenly',
      inputSchema: {
        type: 'object',
        properties: {
          elementIds: { 
            type: 'array',
            items: { type: 'string' }
          },
          direction: { 
            type: 'string', 
            enum: ['horizontal', 'vertical'] 
          }
        },
        required: ['elementIds', 'direction']
      }
    },
Behavior1/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 of behavioral disclosure. 'Distribute elements evenly' implies a layout operation but doesn't specify whether it modifies elements (e.g., repositioning), requires specific permissions, has side effects, or what the expected outcome is. This is inadequate for a tool with potential mutation effects.

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 extremely concise with 'Distribute elements evenly'—a single, front-loaded phrase that directly states the action. There's no wasted verbiage, making it efficient in terms of word count, though this brevity contributes to its lack of detail.

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 the complexity of a layout tool with 2 parameters, no annotations, and no output schema, the description is incomplete. It doesn't cover behavioral aspects, parameter details, or usage context, leaving significant gaps for the agent to infer functionality. This is insufficient for effective tool selection and invocation.

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

Parameters2/5

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

Schema description coverage is 0%, so the description must compensate for undocumented parameters. It mentions 'elements' and 'evenly', which loosely relates to 'elementIds' and 'direction', but doesn't explain what 'elementIds' represent (e.g., IDs of graphical objects) or how 'direction' affects distribution. The description adds minimal meaning beyond the bare schema.

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

Purpose2/5

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

The description 'Distribute elements evenly' states a general action but lacks specificity about what 'elements' are or what 'distribute' means in this context. It's vague compared to sibling tools like 'align_elements' or 'group_elements', which have clearer scopes. The description doesn't distinguish this tool from potential alternatives, making it minimally informative.

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

Usage Guidelines1/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 like 'align_elements' or 'group_elements'. There's no mention of prerequisites, typical scenarios, or exclusions. This leaves the agent without context for selecting this tool appropriately among the siblings.

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

Related 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/yctimlin/mcp_excalidraw'

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