Skip to main content
Glama

delete_drawing

Remove an Excalidraw drawing by specifying its unique ID to manage your diagram collection and maintain workspace organization.

Instructions

Delete an Excalidraw drawing by ID

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYes

Implementation Reference

  • Core implementation of deleteDrawing: removes the drawing content and metadata files from the storage directory.
    export async function deleteDrawing(id: string): Promise<void> {
      await ensureStorageDir();
      
      // Get the drawing file path
      const filePath = path.join(STORAGE_DIR, `${id}.json`);
      const metadataPath = path.join(STORAGE_DIR, `${id}.meta.json`);
      
      try {
        // Check if the drawing exists
        await fs.access(filePath);
        
        // Delete the drawing file
        await fs.unlink(filePath);
        
        // Delete the metadata file
        await fs.unlink(metadataPath);
      } catch (error) {
        throw new ExcalidrawResourceNotFoundError(`Drawing with ID ${id} not found`);
      }
    }
  • MCP tool call handler: parses input with schema and invokes the deleteDrawing function, returns success response.
    case "delete_drawing": {
      const args = drawings.DeleteDrawingSchema.parse(request.params.arguments);
      await drawings.deleteDrawing(args.id);
      return {
        content: [{ type: "text", text: JSON.stringify({ success: true }, null, 2) }],
      };
  • index.ts:78-81 (registration)
    Registration of the delete_drawing tool in the ListTools response, specifying name, description, and input schema.
      name: "delete_drawing",
      description: "Delete an Excalidraw drawing by ID",
      inputSchema: zodToJsonSchema(drawings.DeleteDrawingSchema),
    },
  • Zod input schema validation for delete_drawing tool: requires a non-empty string 'id'.
    export const DeleteDrawingSchema = z.object({
      id: z.string().min(1),
    });
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 action is 'Delete', implying a destructive mutation, but does not disclose critical traits like whether deletion is permanent, requires specific permissions, or has side effects (e.g., affecting associated files). This leaves significant gaps for a destructive operation.

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, front-loaded sentence with zero waste—'Delete an Excalidraw drawing by ID'—directly conveying the core action and parameter. It is appropriately sized and efficiently structured.

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 (destructive mutation with no annotations, 0% schema coverage, and no output schema), the description is incomplete. It fails to address behavioral risks, return values, or error conditions, making it inadequate for safe and effective use by an AI agent.

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

Parameters3/5

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

The schema description coverage is 0%, but the description adds meaning by specifying that the 'id' parameter refers to 'an Excalidraw drawing by ID', clarifying its purpose. However, it does not provide details on ID format, source, or validation, which limits compensation for the low schema coverage.

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

Purpose5/5

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

The description clearly states the specific action ('Delete') and target resource ('an Excalidraw drawing by ID'), distinguishing it from sibling tools like 'get_drawing', 'update_drawing', or 'create_drawing'. It precisely communicates the tool's function without redundancy.

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, such as whether it's irreversible or if there are prerequisites like confirming deletion. It lacks explicit context for usage compared to siblings like 'update_drawing' or 'list_drawings'.

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/i-tozer/excalidraw-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server