Skip to main content
Glama

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
NameRequiredDescriptionDefault
groupIdYes

Implementation Reference

  • 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'] } },
  • Zod schema used for input validation in the ungroup_elements handler.
    const GroupIdSchema = z.object({ groupId: z.string() });

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