Skip to main content
Glama
bscott

NotePlan MCP Server

by bscott

create_daily_note

Create a daily note in NotePlan with specified date and initial content to organize daily tasks and thoughts.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dateNoThe date for the daily note (YYYY-MM-DD format)
contentNoInitial content for the daily note

Implementation Reference

  • The core handler function that implements the logic for creating a daily note. It generates a filename based on the date, checks for existence, uses a default template if no content provided, writes to the NotePlan Calendar directory or falls back to mock database, and returns the created note object.
    function createDailyNote(options: CreateDailyNoteParams = {}): Note {
      const noteDate = options.date ? new Date(options.date) : new Date();
      const dateStr = noteDate.toISOString().split('T')[0].replace(/-/g, ''); // YYYYMMDD format
      const noteId = `calendar-${dateStr}`;
      
      // Check if daily note already exists
      const existingNote = getNoteById(noteId);
      if (existingNote) {
        throw new Error(`Daily note for ${dateStr} already exists`);
      }
      
      const defaultTemplate = `# ${dateStr}
    
    ## Today's Plan
    - [ ] 
    
    ## Notes
    
    
    ## Reflection
    
    
    ---
    Created: ${noteDate.toISOString()}`;
      
      const content = options.content || defaultTemplate;
      
      if (isNotePlanAvailable()) {
        // Write to actual NotePlan directory
        const filePath = path.join(CALENDAR_PATH, `${dateStr}.md`);
        try {
          fs.writeFileSync(filePath, content, 'utf8');
          
          // Clear cache to force refresh
          notesCache = [];
          lastCacheUpdate = 0;
          
          // Return the newly created note
          return parseMarkdownFile(filePath, 'Calendar')!;
        } catch (error) {
          throw new Error(`Failed to create daily note: ${(error as Error).message}`);
        }
      } else {
        // Fallback to mock database
        const newNote: Note = {
          id: noteId,
          title: `Daily Note - ${dateStr}`,
          content,
          created: noteDate.toISOString(),
          modified: noteDate.toISOString(),
          folder: 'Calendar',
          type: 'daily'
        };
        
        notesDb.push(newNote);
        return newNote;
      }
    }
  • TypeScript interface defining the input parameters for the createDailyNote function: optional date (string) and content (string).
    interface CreateDailyNoteParams {
      date?: string;
      content?: string;
    }
  • src/index.ts:113-130 (registration)
    MCP tool registration for 'create_daily_note', including Zod input schema validation and a thin handler that delegates to noteService.createDailyNote and formats the response.
    server.tool(
      'create_daily_note',
      {
        date: z.string().optional().describe('The date for the daily note (YYYY-MM-DD format)'),
        content: z.string().optional().describe('Initial content for the daily note'),
      },
      async ({ date, content }) => {
        const dailyNote = noteService.createDailyNote({ date, content });
        return {
          content: [
            {
              type: 'text',
              text: JSON.stringify(dailyNote, null, 2),
            },
          ],
        };
      }
    );
  • Export of the noteService object, making createDailyNote available for import and use in the MCP server.
    export const noteService = {
      getAllNotes,
      getNoteById,
      searchNotes,
      getNotesByFolder,
      createDailyNote,
      createNote,
      updateNote
Behavior1/5

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

Tool has no description.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness1/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Tool has no description.

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

Completeness1/5

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

Tool has no description.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters1/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Tool has no description.

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

Purpose1/5

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

Tool has no description.

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

Usage Guidelines1/5

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

Tool has no description.

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/bscott/noteplan-mcp'

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