Skip to main content
Glama
bazylhorsey
by bazylhorsey

create_canvas

Create a new canvas file in your Obsidian vault to organize notes and ideas visually. Specify the vault name and file path to generate the canvas.

Instructions

Create a new canvas file

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesPath for new canvas
vaultYesVault name

Implementation Reference

  • Core handler function that creates an empty Obsidian canvas file by writing a minimal CanvasData JSON structure to the specified vault path.
    async createCanvas(vaultPath: string, canvasPath: string): Promise<VaultOperationResult<CanvasData>> {
      const emptyCanvas: CanvasData = {
        nodes: [],
        edges: []
      };
    
      const result = await this.writeCanvas(vaultPath, canvasPath, emptyCanvas);
      if (!result.success) {
        return { success: false, error: result.error };
      }
    
      return { success: true, data: emptyCanvas };
    }
  • Input schema definition for the create_canvas tool, specifying required vault and path parameters.
      name: 'create_canvas',
      description: 'Create a new canvas file',
      inputSchema: {
        type: 'object',
        properties: {
          vault: { type: 'string', description: 'Vault name' },
          path: { type: 'string', description: 'Path for new canvas' },
        },
        required: ['vault', 'path'],
      },
    },
  • src/index.ts:652-661 (registration)
    MCP server tool call handler that routes create_canvas requests to the CanvasService by resolving the vault connector and passing vaultPath and canvas path.
    case 'create_canvas': {
      const connector = this.connectors.get(args?.vault as string);
      if (!connector || !connector.vaultPath) {
        throw new Error(`Vault "${args?.vault}" not found or not a local vault`);
      }
      const result = await this.canvasService.createCanvas(connector.vaultPath, args?.path as string);
      return {
        content: [{ type: 'text', text: JSON.stringify(result, null, 2) }],
      };
    }
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 'Create a new canvas file,' implying a write operation, but lacks details on permissions, side effects (e.g., file overwriting), error handling, or response format. This is a significant gap for a mutation tool without 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 ('Create a new canvas file') that is front-loaded and wastes no words. Every part of the sentence directly contributes to understanding the tool's purpose, making it appropriately concise.

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 as a mutation operation with no annotations and no output schema, the description is incomplete. It doesn't address behavioral aspects like what happens on success/failure, the format of the created file, or how it differs from other creation tools, leaving gaps for the agent to navigate.

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 input schema has 100% description coverage, clearly documenting both parameters ('path' and 'vault') with their types and requirements. The description adds no additional parameter semantics beyond what the schema provides, so it meets the baseline score of 3 for high schema coverage without extra value.

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 action ('Create') and resource ('a new canvas file'), making the purpose immediately understandable. It distinguishes this from sibling tools like 'get_canvas' or 'list_canvas_files' by specifying creation rather than retrieval. However, it doesn't explicitly differentiate from other creation tools like 'create_note' or 'create_from_template', which slightly limits its 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., needing a vault), exclusions, or comparisons to sibling tools such as 'create_note' or 'create_from_template', leaving the agent to infer usage based on context 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/bazylhorsey/obsidian-mcp-server'

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