Skip to main content
Glama
Abdullah007bajwa

Excalidraw MCP Server

group_elements

Combine multiple diagram elements into a single group for easier organization and manipulation in Excalidraw diagrams.

Instructions

Group multiple elements together

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
elementIdsYes

Implementation Reference

  • The handler function for the 'group_elements' tool. It parses the input arguments using ElementIdsSchema, generates a unique groupId, stores the elementIds in sceneState.groups Map, and returns a JSON response with the groupId and elementIds.
    case 'group_elements': {
      const params = ElementIdsSchema.parse(args);
      const { elementIds } = params;
      
      const groupId = generateId();
      sceneState.groups.set(groupId, elementIds);
      
      const result = { groupId, elementIds };
      return {
        content: [{ type: 'text', text: JSON.stringify(result, null, 2) }]
      };
    }
  • Zod schema used for input validation in the group_elements handler (and others). Defines required elementIds as array of strings.
    const ElementIdsSchema = z.object({
      elementIds: z.array(z.string())
    });
  • Input schema definition for the group_elements tool in the MCP server capabilities declaration.
    group_elements: {
      description: 'Group multiple elements together',
      inputSchema: {
        type: 'object',
        properties: {
          elementIds: { 
            type: 'array',
            items: { type: 'string' }
          }
        },
        required: ['elementIds']
      }
    },
  • src/index.js:753-764 (registration)
    Tool registration in the ListToolsRequestHandler response, listing the group_elements tool with its schema.
    name: 'group_elements',
    description: 'Group multiple elements together',
    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?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the action ('group') but doesn't describe what grouping entails (e.g., creates a parent container, applies transformations, affects visibility), whether it's destructive to individual elements, permissions needed, or response format. 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 a single, efficient sentence with zero waste—it directly states the tool's action without fluff. It's appropriately sized for a simple tool, though this conciseness comes at the cost of detail. Every word earns its place by conveying the core function.

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 tool's complexity (a mutation operation with 1 parameter), lack of annotations, no output schema, and low schema description coverage, the description is incomplete. It doesn't explain the grouping behavior, return values, error conditions, or how it fits with siblings like 'ungroup_elements'. For a tool that likely modifies state, this is inadequate.

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, so the description must compensate. It mentions 'multiple elements' which hints at the 'elementIds' array parameter, but doesn't explain what element IDs are (e.g., strings, UUIDs), how to obtain them, or constraints (e.g., minimum count, valid IDs). The description adds minimal value beyond the schema's structural definition.

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 the action ('group') and target ('multiple elements'), which provides a basic understanding of purpose. However, it's vague about what 'elements' are in this context (e.g., UI components, graphic objects, data items) and doesn't differentiate from siblings like 'align_elements' or 'distribute_elements' beyond the grouping action. It avoids tautology by not just restating the name, but lacks specificity.

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?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., elements must exist), exclusions (e.g., cannot group locked elements), or compare to siblings like 'ungroup_elements' for reversal. Usage is implied from the action but not explicitly stated, leaving the agent to infer context.

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