ungroup_elements
Separate grouped elements in Excalidraw diagrams by inputting the group ID. Simplify editing and reorganization of individual components within complex visual designs using structured API.
Instructions
Ungroup a group of elements
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| groupId | Yes |
Implementation Reference
- src/index.js:493-508 (handler)Executes the ungroup_elements tool: validates input with GroupIdSchema, verifies group exists, extracts element IDs, removes the group from sceneState, and returns confirmation.case 'ungroup_elements': { const params = GroupIdSchema.parse(args); const { groupId } = params; if (!sceneState.groups.has(groupId)) { throw new Error(`Group ${groupId} not found`); } const elementIds = sceneState.groups.get(groupId); sceneState.groups.delete(groupId); const result = { groupId, ungrouped: true, elementIds }; return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] }; }
- src/index.js:197-206 (registration)Registers the ungroup_elements tool in the MCP server capabilities, providing description and JSON input schema.ungroup_elements: { description: 'Ungroup a group of elements', inputSchema: { type: 'object', properties: { groupId: { type: 'string' } }, required: ['groupId'] } },
- src/index.js:56-58 (schema)Zod schema used for input validation in the ungroup_elements handler.const GroupIdSchema = z.object({ groupId: z.string() });