Skip to main content
Glama

group_elements

Group multiple elements in Excalidraw diagrams by specifying their IDs for better organization and structure within the drawing interface.

Instructions

Group multiple elements together

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
elementIdsYes

Implementation Reference

  • Executes the group_elements tool: validates input with ElementIdsSchema, generates a unique groupId, stores the elementIds in sceneState.groups Map, and returns the groupId and elementIds.
    case 'group_elements': { const params = ElementIdsSchema.parse(args); const { elementIds } = params; const groupId = generateId(); sceneState.groups.set(groupId, elementIds); const result = { groupId, elementIds }; return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] }; }
  • Zod schema for input validation of elementIds array, used in group_elements (and similar tools) handler.
    const ElementIdsSchema = z.object({ elementIds: z.array(z.string()) });
  • src/index.js:184-195 (registration)
    Registers the group_elements tool in the MCP server capabilities, providing description and input schema.
    group_elements: { description: 'Group multiple elements together', inputSchema: { type: 'object', properties: { elementIds: { type: 'array', items: { type: 'string' } } }, required: ['elementIds'] }
  • src/index.js:753-764 (registration)
    Registers the group_elements tool in the ListToolsRequestHandler response.
    name: 'group_elements', description: 'Group multiple elements together', inputSchema: { type: 'object', properties: { elementIds: { type: 'array', items: { type: 'string' } } }, required: ['elementIds'] }

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