Skip to main content
Glama
bazylhorsey
by bazylhorsey

create_daily_note

Create a daily note for a specific date in your Obsidian vault, with optional template variables and automatic default to today's date.

Instructions

Create a daily note for a specific date

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dateNoDate (YYYY-MM-DD), defaults to today
variablesNoAdditional template variables
vaultYesVault name

Implementation Reference

  • src/index.ts:394-406 (registration)
    Registers the 'create_daily_note' tool with the MCP ListTools handler, including its description and input schema.
    {
      name: 'create_daily_note',
      description: 'Create a daily note for a specific date',
      inputSchema: {
        type: 'object',
        properties: {
          vault: { type: 'string', description: 'Vault name' },
          date: { type: 'string', description: 'Date (YYYY-MM-DD), defaults to today' },
          variables: { type: 'object', description: 'Additional template variables' },
        },
        required: ['vault'],
      },
    },
  • MCP tool handler for 'create_daily_note': retrieves vault connector, parses date, calls PeriodicNotesService.createPeriodicNote('daily'), and returns JSON result.
    case 'create_daily_note': {
      const connector = this.connectors.get(args?.vault as string);
      if (!connector || !connector.vaultPath) {
        throw new Error(`Vault "${args?.vault}" not found or not a local vault`);
      }
    
      const date = args?.date ? new Date(args.date as string) : undefined;
      const result = await this.periodicNotesService.createPeriodicNote(
        connector.vaultPath,
        'daily',
        date,
        args?.variables as Record<string, any> | undefined
      );
    
      return {
        content: [{ type: 'text', text: JSON.stringify(result, null, 2) }],
      };
    }
  • Core implementation of periodic note creation (used for daily notes when type='daily'): generates filename/path, checks existence, renders template or default content, creates directories, writes file.
    async createPeriodicNote(
      vaultPath: string,
      type: PeriodicNoteType,
      date?: Date,
      variables?: Record<string, any>
    ): Promise<VaultOperationResult<string>> {
      try {
        const noteDate = date || new Date();
        const config = this.settings[type];
    
        if (!config.enabled) {
          return { success: false, error: `${type} notes are not enabled` };
        }
    
        // Generate note path
        const notePath = this.getPeriodicNotePath(type, noteDate);
        const fullPath = path.join(vaultPath, notePath);
    
        // Check if note already exists
        try {
          await fs.access(fullPath);
          return { success: true, data: notePath }; // Already exists
        } catch {
          // Note doesn't exist, continue to create
        }
    
        // Ensure directory exists
        await fs.mkdir(path.dirname(fullPath), { recursive: true });
    
        let content: string;
    
        // Use template if specified
        if (config.templatePath) {
          const renderResult = await this.templateService.renderTemplate(
            vaultPath,
            config.templatePath,
            {
              targetPath: notePath,
              variables: {
                ...this.getPeriodicNoteVariables(type, noteDate),
                ...variables,
              },
            }
          );
    
          if (!renderResult.success || !renderResult.data) {
            return { success: false, error: renderResult.error };
          }
    
          content = renderResult.data.content;
        } else {
          // Generate default content
          content = this.generateDefaultContent(type, noteDate);
        }
    
        // Write file
        await fs.writeFile(fullPath, content, 'utf-8');
    
        return { success: true, data: notePath };
      } catch (error) {
        return {
          success: false,
          error: `Failed to create ${type} note: ${error instanceof Error ? error.message : String(error)}`
        };
      }
  • Default configuration settings for daily notes, used by PeriodicNotesService (folder, format).
    daily: {
      enabled: true,
      folder: 'Daily Notes',
      format: 'YYYY-MM-DD',
    },
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 action ('Create') without disclosing behavioral traits. It doesn't mention permissions needed, whether it overwrites existing notes, what happens on invalid dates, or what the output looks like. For a creation tool with zero annotation coverage, this is a significant gap.

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 states the core purpose without unnecessary words. It's appropriately sized and front-loaded with the essential information.

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?

For a creation tool with 3 parameters, no annotations, and no output schema, the description is inadequate. It doesn't explain what a 'daily note' entails, how it differs from regular notes, what template variables are used for, or what happens after creation. The context signals show complexity (nested objects, required parameters) that warrants more explanation.

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 all parameters are documented in the schema. The description doesn't add any parameter semantics beyond what's in the schema - it mentions 'specific date' which aligns with the 'date' parameter but provides no additional context about the 'variables' or 'vault' parameters. 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.

Purpose4/5

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

The description clearly states the verb ('Create') and resource ('daily note') with a specific scope ('for a specific date'), which distinguishes it from generic note creation tools. However, it doesn't explicitly differentiate from sibling periodic note tools like create_monthly_note or create_weekly_note beyond the 'daily' qualifier.

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 like create_note, create_from_template, or other periodic note tools. It mentions 'for a specific date' but doesn't explain when daily notes are preferred over regular notes or templated notes.

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