Skip to main content
Glama

get_drawing

Retrieve an Excalidraw diagram by its unique identifier to access, view, or edit the drawing within the Excalidraw MCP Server.

Instructions

Get an Excalidraw drawing by ID

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYes

Implementation Reference

  • MCP CallToolRequestSchema handler case for 'get_drawing': parses input arguments using GetDrawingSchema and delegates to drawings.getDrawing(id), then formats result as text content.
    case "get_drawing": {
      const args = drawings.GetDrawingSchema.parse(request.params.arguments);
      const result = await drawings.getDrawing(args.id);
      return {
        content: [{ type: "text", text: JSON.stringify(result, null, 2) }],
      };
    }
  • Core implementation of getDrawing: reads drawing content and metadata from storage files, returns combined object or throws not found error.
    export async function getDrawing(id: string): Promise<{ id: string, name: string, content: string, metadata: any }> {
      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 {
        // Read the drawing content
        const content = await fs.readFile(filePath, 'utf-8');
        
        // Read the metadata
        const metadataStr = await fs.readFile(metadataPath, 'utf-8');
        const metadata = JSON.parse(metadataStr);
        
        return {
          id,
          name: metadata.name,
          content,
          metadata,
        };
      } catch (error) {
        throw new ExcalidrawResourceNotFoundError(`Drawing with ID ${id} not found`);
      }
    }
  • Zod input schema for get_drawing tool: requires 'id' as non-empty string.
    export const GetDrawingSchema = z.object({
      id: z.string().min(1),
    });
  • index.ts:68-71 (registration)
    Tool specification registration in MCP ListToolsRequestSchema response: defines name, description, and input schema.
      name: "get_drawing",
      description: "Get an Excalidraw drawing by ID",
      inputSchema: zodToJsonSchema(drawings.GetDrawingSchema),
    },
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 tool retrieves a drawing by ID but does not describe what happens if the ID is invalid (e.g., error handling), whether it requires authentication, rate limits, or the format of the returned drawing. For a read operation with zero annotation coverage, this leaves significant gaps in understanding behavior.

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 that front-loads the core action ('Get an Excalidraw drawing by ID') with zero wasted words. It is appropriately sized for a simple retrieval tool and earns its place by clearly stating the purpose.

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 simplicity (1 parameter, no output schema, no annotations), the description is incomplete. It lacks details on error cases, return format (e.g., drawing data structure), and how it differs from siblings like 'export_to_json'. For a tool in a set with multiple export options, more context is needed to guide effective use.

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?

Schema description coverage is 0%, so the description must compensate. It mentions the 'id' parameter but provides no additional meaning beyond what the schema implies (a string of minLength 1). It does not explain what the ID represents (e.g., a unique identifier for drawings), where to obtain it, or format examples. The description adds minimal value over the bare schema.

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

Purpose4/5

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

The description clearly states the verb ('Get') and resource ('an Excalidraw drawing'), specifying retrieval by ID. It distinguishes from siblings like 'list_drawings' (which retrieves multiple) and 'create_drawing' (which creates new), but could be more explicit about the distinction. The purpose is specific and actionable.

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 does not mention prerequisites (e.g., needing a valid drawing ID), exclusions (e.g., not for creating or updating), or direct comparisons to siblings like 'list_drawings' for bulk retrieval. Usage is implied but not explicitly stated.

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