Skip to main content
Glama

list_drawings

Retrieve and browse all available Excalidraw drawings stored in the server with pagination controls for organized access.

Instructions

List all Excalidraw drawings

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pageNo
perPageNo

Implementation Reference

  • The main handler function that lists paginated drawings by reading metadata JSON files from the storage directory, filtering .meta.json files, and parsing their contents.
    export async function listDrawings(
      page: number = 1,
      perPage: number = 10
    ): Promise<{ drawings: any[]; total: number }> {
      await ensureStorageDir();
    
      try {
        // Get all files in the storage directory
        const files = await fs.readdir(STORAGE_DIR);
    
        // Filter metadata files
        const metadataFiles = files.filter((file) => file.endsWith(".meta.json"));
    
        // Calculate pagination
        const start = (page - 1) * perPage;
        const end = start + perPage;
        const paginatedFiles = metadataFiles.slice(start, end);
    
        // Read metadata for each drawing
        const drawings = await Promise.all(
          paginatedFiles.map(async (file) => {
            const metadataPath = path.join(STORAGE_DIR, file);
            const metadataStr = await fs.readFile(metadataPath, "utf-8");
            return safeJsonParse(metadataStr, "drawing metadata");
          })
        );
    
        return {
          drawings,
          total: metadataFiles.length,
        };
      } catch (error) {
        console.error("Failed to list drawings:", sanitizeErrorMessage(error));
        return {
          drawings: [],
          total: 0,
        };
      }
    }
  • Zod schema defining the input parameters for the list_drawings tool: optional page (default 1) and perPage (default 10, max 100).
    export const ListDrawingsSchema = z.object({
      page: z.number().int().min(1).optional().default(1),
      perPage: z.number().int().min(1).max(100).optional().default(10),
    });
  • src/index.ts:86-89 (registration)
    Tool registration in the listTools response, specifying name, description, and input schema converted from Zod schema.
      name: "list_drawings",
      description: "List all Excalidraw drawings",
      inputSchema: zodToJsonSchema(drawings.ListDrawingsSchema),
    },
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 it's a list operation, implying read-only behavior, but doesn't mention pagination (implied by parameters), rate limits, authentication needs, or what the output looks like. This leaves significant gaps for a tool with parameters.

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's front-loaded with the core purpose and appropriately sized for a simple list tool, though this conciseness comes at the cost of detail.

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 no annotations, 0% schema coverage, no output schema, and two parameters, the description is incomplete. It covers the basic purpose but lacks parameter explanations, behavioral context, and output details, making it inadequate for informed tool selection.

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 but doesn't mention parameters at all. The two parameters (page, perPage) are undocumented in both schema and description, leaving their purpose and usage unclear. This fails to add value beyond 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 ('List') and resource ('all Excalidraw drawings'), making the purpose immediately understandable. It distinguishes from siblings like 'get_drawing' by indicating it returns multiple items rather than a single one. However, it doesn't specify the scope beyond 'all' or mention pagination, which slightly limits differentiation.

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, when to choose it over 'get_drawing' for a single drawing, or how it relates to export tools. The agent must infer usage from the name alone.

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/andreswebs-public-images/excalidraw-mcp'

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