Skip to main content
Glama

ungroup_elements

Separate grouped elements in Excalidraw diagrams to edit individual components independently.

Instructions

Ungroup a group of elements

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
groupIdYes

Implementation Reference

  • The main handler logic for the 'ungroup_elements' tool. It validates the input using GroupIdSchema, checks if the group exists in sceneState.groups, retrieves the element IDs, deletes the group, and returns a success response with the details.
    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) }] }; }
  • Zod schema used for input validation of the groupId parameter in the ungroup_elements handler.
    const GroupIdSchema = z.object({ groupId: z.string() });
  • src/index.js:197-206 (registration)
    Tool registration in the MCP server capabilities, including the description and input schema definition.
    ungroup_elements: { description: 'Ungroup a group of elements', inputSchema: { type: 'object', properties: { groupId: { type: 'string' } }, required: ['groupId'] } },
  • Duplicate schema definition in the ListToolsRequestHandler for consistency.
    name: 'ungroup_elements', description: 'Ungroup a group of elements', inputSchema: { type: 'object', properties: { groupId: { type: 'string' } }, required: ['groupId'] }

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