Skip to main content
Glama
bazylhorsey
by bazylhorsey

create_note

Create new notes in your Obsidian vault by specifying the vault name, file path, and content. Add frontmatter metadata to organize and structure your knowledge base effectively.

Instructions

Create a new note

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
contentYesNote content
frontmatterNoFrontmatter metadata
pathYesPath for the new note
vaultYesVault name

Implementation Reference

  • Top-level handler for the 'create_note' tool that retrieves the vault connector and delegates to its createNote method, returning the result as JSON.
    case 'create_note': {
      const connector = this.connectors.get(args?.vault as string);
      if (!connector) {
        throw new Error(`Vault "${args?.vault}" not found`);
      }
      const result = await connector.createNote(args?.path as string, args?.content as string, args?.frontmatter as Record<string, any> | undefined);
      return {
        content: [{ type: 'text', text: JSON.stringify(result, null, 2) }],
      };
    }
  • Input schema definition and description for the 'create_note' tool, used in ListTools response.
    {
      name: 'create_note',
      description: 'Create a new note',
      inputSchema: {
        type: 'object',
        properties: {
          vault: { type: 'string', description: 'Vault name' },
          path: { type: 'string', description: 'Path for the new note' },
          content: { type: 'string', description: 'Note content' },
          frontmatter: { type: 'object', description: 'Frontmatter metadata' },
        },
        required: ['vault', 'path', 'content'],
      },
    },
  • Implementation of createNote for local vaults: creates directories, serializes note with frontmatter, writes to filesystem, and returns parsed note.
    async createNote(notePath: string, content: string, frontmatter?: Record<string, any>): Promise<VaultOperationResult<Note>> {
      try {
        const fullPath = path.join(this.config.path!, notePath);
    
        // Ensure directory exists
        await fs.mkdir(path.dirname(fullPath), { recursive: true });
    
        const note: Note = {
          path: notePath,
          title: frontmatter?.title || notePath.split('/').pop()?.replace('.md', '') || 'Untitled',
          content,
          frontmatter
        };
    
        const serialized = serializeNote(note);
        await fs.writeFile(fullPath, serialized, 'utf-8');
    
        // Parse the note to get full structure
        const result = await this.getNote(notePath);
    
        return result;
      } catch (error) {
        return {
          success: false,
          error: `Failed to create note: ${error instanceof Error ? error.message : String(error)}`
        };
      }
  • Implementation of createNote for remote vaults: serializes note and sends HTTP POST to remote vault endpoint, then fetches the created note.
    async createNote(path: string, content: string, frontmatter?: Record<string, any>): Promise<VaultOperationResult<Note>> {
      try {
        const note: Note = {
          path,
          title: frontmatter?.title || path.split('/').pop()?.replace('.md', '') || 'Untitled',
          content,
          frontmatter
        };
    
        const serialized = serializeNote(note);
    
        await this.client.post(`/vault/${encodeURIComponent(path)}`, {
          content: serialized
        });
    
        const result = await this.getNote(path);
        return result;
      } catch (error) {
        return {
          success: false,
          error: `Failed to create note: ${error instanceof Error ? error.message : String(error)}`
        };
      }
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. 'Create a new note' implies a write operation, but it doesn't specify permissions needed, whether it overwrites existing notes, error conditions, or what happens on success. For a mutation tool with zero annotation coverage, this is a significant gap in transparency.

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 extremely concise at three words, with no wasted language. It's front-loaded with the core action, making it easy to parse quickly. Every word earns its place by conveying the essential 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 complexity of a note creation tool with 4 parameters, no annotations, and no output schema, the description is incomplete. It lacks details on behavior, error handling, or output format, which are crucial for an agent to use this tool effectively in a system with many sibling tools.

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 description adds no parameter information beyond what's in the schema. With 100% schema description coverage, the baseline is 3, as the schema adequately documents the four parameters (content, frontmatter, path, vault) and their types. No additional meaning is provided in the description.

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 'Create a new note' clearly states the action (create) and resource (note), which is adequate. However, it doesn't differentiate this from sibling tools like create_daily_note, create_from_template, or create_monthly_note, leaving ambiguity about when to use this general note creation versus more specialized alternatives.

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. With multiple sibling tools for creating notes (e.g., create_daily_note, create_from_template), the lack of context about prerequisites, typical use cases, or distinctions makes it difficult for an agent to choose appropriately.

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