Skip to main content
Glama

distribute_elements

Distribute elements in Excalidraw diagrams evenly along horizontal or vertical axes for better organization and alignment using structured API commands.

Instructions

Distribute elements evenly

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
directionYes
elementIdsYes

Implementation Reference

  • The handler case for the 'distribute_elements' tool in the switch statement. It parses the input using DistributeElementsSchema, logs the action, and returns a stub success response without actual distribution logic.
    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 defining the input parameters for the distribute_elements tool: 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.js:224-240 (registration)
    Tool registration in the MCP server capabilities object, specifying the name, description, and input schema for distribute_elements.
    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'] } },

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/Abdullah007bajwa/mcp_excalidraw'

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