Skip to main content
Glama
bazylhorsey
by bazylhorsey

get_note

Retrieve notes from your Obsidian vault by specifying the vault name and file path to access specific documents and their content.

Instructions

Get a note by its path

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesPath to the note
vaultYesVault name

Implementation Reference

  • src/index.ts:66-77 (registration)
    Registration of the 'get_note' MCP tool, including name, description, and input schema definition.
    {
      name: 'get_note',
      description: 'Get a note by its path',
      inputSchema: {
        type: 'object',
        properties: {
          vault: { type: 'string', description: 'Vault name' },
          path: { type: 'string', description: 'Path to the note' },
        },
        required: ['vault', 'path'],
      },
    },
  • Handler for the 'get_note' tool: retrieves the connector for the specified vault and calls its getNote method with the path, returning the JSON-stringified result.
    case 'get_note': {
      const connector = this.connectors.get(args?.vault as string);
      if (!connector) {
        throw new Error(`Vault "${args?.vault}" not found`);
      }
      const result = await connector.getNote(args?.path as string);
      return {
        content: [{ type: 'text', text: JSON.stringify(result, null, 2) }],
      };
    }
  • LocalConnector implementation of getNote: reads the Markdown file from disk, parses it into a Note object using parseNote, adds backlinks from cache, and caches the result.
    async getNote(notePath: string): Promise<VaultOperationResult<Note>> {
      try {
        const fullPath = path.join(this.config.path!, notePath);
        const content = await fs.readFile(fullPath, 'utf-8');
        const stats = await fs.stat(fullPath);
    
        const note = parseNote(notePath, content, stats);
    
        // Add backlinks
        note.backlinks = this.getBacklinks(notePath);
    
        // Update cache
        this.notesCache.set(notePath, note);
    
        return { success: true, data: note };
      } catch (error) {
        return {
          success: false,
          error: `Failed to get note: ${error instanceof Error ? error.message : String(error)}`
        };
      }
    }
  • RemoteConnector implementation of getNote: checks cache first, otherwise fetches note content via HTTP API, parses into Note, and caches.
    async getNote(path: string): Promise<VaultOperationResult<Note>> {
      try {
        // Try cache first
        if (this.notesCache.has(path)) {
          return { success: true, data: this.notesCache.get(path)! };
        }
    
        // Fetch from remote
        const response = await this.client.get(`/vault/${encodeURIComponent(path)}`);
        const content = response.data.content || response.data;
    
        const note = parseNote(path, content);
        this.notesCache.set(path, note);
    
        return { success: true, data: note };
      } catch (error) {
        return {
          success: false,
          error: `Failed to get note: ${error instanceof Error ? error.message : String(error)}`
        };
      }
    }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden but offers minimal behavioral insight. It implies a read operation ('Get') but doesn't disclose error handling (e.g., if note doesn't exist), authentication needs, rate limits, or return format. For a tool with zero annotation coverage, this leaves significant gaps in understanding how it behaves.

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 wasted words. It's front-loaded with the core action ('Get a note'), making it immediately clear. Every word earns its place, and there's no redundancy or fluff.

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 and no output schema, the description is incomplete for a tool with 2 required parameters. It doesn't explain what 'Get' returns (e.g., note content, metadata, or both), error conditions, or how 'path' and 'vault' interact. For a read operation in a system with many sibling tools, more context is needed to use it effectively.

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?

Schema description coverage is 100%, so the schema fully documents both parameters ('path' and 'vault'). The description adds no additional meaning beyond implying 'path' is the primary identifier. Since the schema does the heavy lifting, the baseline score of 3 is appropriate, though the description doesn't compensate or enhance parameter understanding.

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 'Get a note by its path' clearly states the verb ('Get') and resource ('note'), and specifies the primary lookup mechanism ('by its path'). It distinguishes from siblings like 'get_note_metadata' (metadata only) and 'search_notes' (multiple notes via search), though it doesn't explicitly name these alternatives. The purpose is specific but could be more differentiated.

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 when to choose 'get_note' over 'get_note_metadata' (for full content vs. metadata), 'search_notes' (for finding notes without knowing exact path), or 'get_related_notes' (for contextual notes). No prerequisites or exclusions are 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/bazylhorsey/obsidian-mcp-server'

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