Skip to main content
Glama

read_note

Retrieve the full text content of a note file from your personal notes directory by specifying its relative path. Ideal for accessing organized, searchable knowledge within the MCP Notes system.

Instructions

Read the complete contents of a note file from your notes directory. Specify the path relative to your notes directory (e.g., 'Log/2023-01-01.md'). Returns the full text content of the note file.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesThe path to the note file, relative to your notes directory

Implementation Reference

  • The "read_note" tool is registered here in the handleToolCall switch statement, delegating execution to the handleReadNote function.
    case "read_note":
      return await handleReadNote(notesPath, args);
  • Imports the handleReadNote handler function from './filesystem.js', which contains the exact implementation of the read_note tool logic.
    import {
      ensureDirectory,
      initializeNotesDirectory,
      handleSearchFiles,
      handleReadNote,
      handleReadMultipleNotes,
      handleListDirectory,
      handleCreateDirectory,
      getFilesystemToolDefinitions
    } from './filesystem.js';
  • Imports getFilesystemToolDefinitions from './filesystem.js', which provides the input schema and description for the read_note tool.
    import {
      ensureDirectory,
      initializeNotesDirectory,
      handleSearchFiles,
      handleReadNote,
      handleReadMultipleNotes,
      handleListDirectory,
      handleCreateDirectory,
      getFilesystemToolDefinitions
    } from './filesystem.js';
  • The Note.load() method provides the core file reading and frontmatter parsing logic, likely used within the handleReadNote implementation.
    async load(): Promise<boolean> {
      try {
        const content = await fs.readFile(this.fullPath, 'utf8');
        this.exists = true;
        
        // Parse frontmatter if it exists
        if (content.startsWith('---')) {
          const frontmatterEnd = content.indexOf('---', 3);
          if (frontmatterEnd !== -1) {
            const frontmatter = content.substring(3, frontmatterEnd);
            
            // Extract created date
            const createdMatch = frontmatter.match(/created: (.*)/);
            if (createdMatch) {
              const createdDate = new Date(createdMatch[1]);
              this.dateInfo = this._formatDate(createdDate);
            }
            
            // Extract tags
            const tagMatch = frontmatter.match(/tags:\n(?:  - .*\n)*/);
            if (tagMatch) {
              this.tags = tagMatch[0].split('\n')
                .slice(1) // Skip the "tags:" line
                .map(line => line.replace('  - ', ''))
                .filter(tag => tag); // Remove empty strings
            }
            
            // Store content without frontmatter
            this.content = content.substring(frontmatterEnd + 4);
          } else {
            this.content = content;
          }
        } else {
          this.content = content;
        }
        
        return true;
      } catch (error) {
        if (error instanceof Error && 'code' in error && error.code === 'ENOENT') {
          this.exists = false;
          return false;
        }
        throw error;
      }
    }
Behavior3/5

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

With no annotations provided, the description carries full burden. It discloses the return behavior ('Returns the full text content of the note file') and path specification requirement. However, it doesn't mention error handling (e.g., what happens if file doesn't exist), permissions, or file format constraints.

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?

Two sentences, zero waste. First sentence states purpose and input, second sentence states output. Every element earns its place, and the description is appropriately sized for a simple read operation.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple read operation with 100% schema coverage and no output schema, the description is mostly complete. It covers purpose, input specification with example, and return value. The main gap is lack of error handling information, which would be helpful given no annotations.

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 already fully documents the single 'path' parameter. The description adds a helpful example ('e.g., 'Log/2023-01-01.md'') but doesn't provide additional semantic meaning beyond what the schema states. Baseline 3 is appropriate when schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the specific action ('Read the complete contents'), resource ('a note file from your notes directory'), and scope ('complete contents'). It distinguishes from siblings like 'read_multiple_notes' (single vs multiple) and 'write_note' (read vs write).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides clear context about when to use this tool ('Read the complete contents of a note file') and implies when not to use it (for multiple notes, use 'read_multiple_notes'; for writing, use 'write_note'). However, it doesn't explicitly name alternatives or provide exclusion criteria.

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

Related 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/markacianfrani/mcp-notes'

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