Skip to main content
Glama
Abdullah007bajwa

Excalidraw MCP Server

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']
      }
    },
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the tool 'unlock elements to allow modification,' which implies a mutation operation that changes state from locked to unlocked. However, it lacks details on permissions needed, whether unlocking is reversible, side effects, rate limits, or what happens if elements are already unlocked. This is a significant gap for a mutation tool with zero annotation coverage.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is extremely concise with a single sentence ('Unlock elements to allow modification'), which is front-loaded and wastes no words. It efficiently states the core action and purpose without unnecessary elaboration, making it easy to parse quickly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity of a mutation tool with no annotations, 1 undocumented parameter, and no output schema, the description is incomplete. It doesn't cover behavioral aspects like safety, permissions, or side effects, nor does it explain parameters or return values. For a tool that likely changes system state, this leaves critical gaps for an AI agent to use it correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 1 parameter with 0% description coverage, and the tool description provides no information about parameters. It doesn't explain what 'elementIds' are, their format, or constraints (e.g., valid IDs, maximum array size). For a single required parameter with no schema documentation, the description fails to compensate, leaving the parameter meaning unclear.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a clear action ('unlock') and target ('elements'), but it's vague about what 'elements' are in this context and doesn't differentiate from sibling tools like 'lock_elements' or 'update_element'. It specifies the purpose as allowing modification, which is helpful but lacks specificity about the resource domain.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus alternatives like 'lock_elements' (for opposite action) or 'update_element' (for modification after unlocking). The description implies usage when modification is needed, but it doesn't specify prerequisites, exclusions, or contextual triggers for unlocking elements.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other 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