Skip to main content
Glama
quinny1187

Obsidian MCP Server

by quinny1187

read_note

Retrieve content from Obsidian notes by specifying vault and file paths to access stored information directly.

Instructions

Read a note from the vault

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
vault_pathYesPath to the Obsidian vault
note_pathYesPath to the note relative to vault root (with or without .md extension)

Implementation Reference

  • The core handler function for the 'read_note' tool. It validates the vault, reads the note file, parses frontmatter with gray-matter, and returns structured data including content, frontmatter, raw content, and file stats.
    export async function handleReadNote(
      vaultManager: VaultManager,
      vaultPath: string,
      notePath: string
    ) {
      await vaultManager.validateVault(vaultPath);
      
      const filePath = vaultManager.getFilePath(vaultPath, notePath);
      
      try {
        const content = await fs.readFile(filePath, 'utf-8');
        const parsed = matter(content);
        const stats = await fs.stat(filePath);
        
        return {
          path: notePath,
          content: parsed.content,
          frontmatter: parsed.data,
          raw: content,
          stats: {
            created: stats.birthtime,
            modified: stats.mtime,
            size: stats.size,
          },
        };
      } catch (error: any) {
        if (error.code === 'ENOENT') {
          throw new Error(`Note not found: ${notePath}`);
        }
        throw error;
      }
    }
  • Tool registration entry including name, description, and input schema definition for 'read_note' used in list_tools response.
    {
      name: 'read_note',
      description: 'Read a note from the vault',
      inputSchema: {
        type: 'object',
        properties: {
          vault_path: {
            type: 'string',
            description: 'Path to the Obsidian vault',
          },
          note_path: {
            type: 'string',
            description: 'Path to the note relative to vault root (with or without .md extension)',
          },
        },
        required: ['vault_path', 'note_path'],
      },
    },
  • src/index.ts:183-188 (registration)
    Dispatch logic in the CallToolRequestSchema handler that routes 'read_note' calls to the handleReadNote function with input validation.
    case 'read_note':
      if (!args || typeof args !== 'object' || !('vault_path' in args) || !('note_path' in args)) {
        throw new McpError(ErrorCode.InvalidParams, 'Missing required parameters');
      }
      result = await handleReadNote(vaultManager, args.vault_path as string, args.note_path as string);
      break;
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 only states the basic action without disclosing behavioral traits. It doesn't mention error handling (e.g., if the note doesn't exist), permissions, rate limits, or what the output format might be (e.g., plain text, metadata). This leaves significant gaps for an agent to understand how the tool behaves beyond its name.

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 purpose without any wasted words. It's appropriately sized for a simple read operation, making it easy to parse and understand quickly.

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 lack of annotations and output schema, the description is incomplete for a tool that reads notes. It doesn't explain what is returned (e.g., note content, formatting, errors), which is critical context for an agent to use this tool effectively alongside siblings like 'write_note'. The simplicity of the tool doesn't excuse this gap in behavioral disclosure.

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 semantics beyond what the input schema provides, as schema description coverage is 100% with clear documentation for both parameters. The baseline score of 3 reflects adequate coverage by the schema alone, with the description not compensating or adding extra meaning.

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 ('Read') and resource ('a note from the vault'), making the tool's purpose immediately understandable. It doesn't explicitly differentiate from siblings like 'get_vault_info' or 'list_notes', but the verb 'Read' implies retrieving content of a specific note rather than metadata or listings.

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?

No guidance is provided on when to use this tool versus alternatives like 'list_notes' or 'search_vault'. The description assumes the user already knows which note to read, but it doesn't explain prerequisites or contextual cues for selection among sibling tools.

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/quinny1187/obsidian-mcp'

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