Skip to main content
Glama

unlock_elements

Unlock selected elements in Excalidraw diagrams to enable editing and modifications, allowing users to update previously locked components.

Instructions

Unlock elements to allow modification

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
elementIdsYes

Implementation Reference

  • Handler logic for the unlock_elements tool: parses elementIds, sets locked=false on each matching element in the elements Map, and returns a success response with the list of IDs.
    case 'unlock_elements': { const params = ElementIdsSchema.parse(args); const { elementIds } = params; elementIds.forEach(id => { const element = elements.get(id); if (element) { element.locked = false; } }); const result = { unlocked: true, elementIds }; return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] }; }
  • src/index.js:254-266 (registration)
    Registration of the unlock_elements tool in the MCP server capabilities, including description and input schema.
    unlock_elements: { description: 'Unlock elements to allow modification', inputSchema: { type: 'object', properties: { elementIds: { type: 'array', items: { type: 'string' } } }, required: ['elementIds'] } },
  • Zod schema used to parse and validate the input arguments for unlock_elements (and lock_elements), expecting an array of element IDs.
    const ElementIdsSchema = z.object({ elementIds: z.array(z.string()) });
  • src/index.js:827-840 (registration)
    Tool listing entry for unlock_elements returned by the ListToolsRequest handler.
    { name: 'unlock_elements', description: 'Unlock elements to allow modification', inputSchema: { type: 'object', properties: { elementIds: { type: 'array', items: { type: 'string' } } }, required: ['elementIds'] } },

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