Skip to main content
Glama

create_daily_note

Create a daily note in Obsidian for today or a specific date, with optional initial content or template.

Instructions

Create today's daily note or a note for a specific date

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dateNoDate in YYYY-MM-DD format (defaults to today)
contentNoInitial content for the daily note
templatePathNoPath to a template note to use (replaces {{date}} placeholder)

Implementation Reference

  • Implementation and registration of the 'create_daily_note' tool.
    // 5. create_daily_note
    server.registerTool(
      "create_daily_note",
      {
        description: "Create today's daily note or a note for a specific date",
        inputSchema: {
          date: z
            .string()
            .optional()
            .describe("Date in YYYY-MM-DD format (defaults to today)"),
          content: z.string().optional().describe("Initial content for the daily note"),
          templatePath: z
            .string()
            .optional()
            .describe("Path to a template note to use (replaces {{date}} placeholder)"),
        },
      },
      async ({ date, content, templatePath }) => {
        try {
          const config = getDailyNoteConfig(vaultPath);
          const targetDate = date ? new Date(date + "T00:00:00") : new Date();
    
          if (isNaN(targetDate.getTime())) {
            return errorResult("Error: Invalid date format. Use YYYY-MM-DD.");
          }
    
          const dateStr = formatDate(targetDate, config.format);
          const folder = config.folder ? `${config.folder}/` : "";
          const notePath = `${folder}${dateStr}.md`;
    
          if (await noteExists(vaultPath, notePath)) {
            return errorResult(`Error: Daily note already exists at '${notePath}'.`);
          }
    
          let finalContent = content ?? "";
    
          if (templatePath) {
            try {
              const templateContent = await readNote(vaultPath, templatePath);
              finalContent = templateContent.replace(/\{\{date\}\}/g, dateStr);
            } catch (err) {
              return errorResult(`Error reading template: ${err instanceof Error ? err.message : String(err)}`);
            }
          }
    
          await writeNote(vaultPath, notePath, finalContent);
          return textResult(`Created daily note at '${notePath}'.`);
        } catch (err) {
          console.error("create_daily_note error:", err);
          return errorResult(`Error creating daily note: ${err instanceof Error ? err.message : String(err)}`);
        }
      },
    );
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 provides minimal behavioral information. It states the tool creates notes but doesn't mention permissions required, whether it overwrites existing daily notes, error handling, or what happens on success/failure. For a creation tool with zero annotation coverage, this is inadequate.

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?

Extremely concise single sentence that efficiently communicates the core functionality. No wasted words or redundant information. The description is appropriately sized for its purpose.

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 and no annotations or output schema, the description is insufficient. It doesn't explain what happens when a daily note already exists, what permissions are needed, what the return value looks like, or how it differs from sibling tools like 'create_note'. The minimal description leaves too many operational questions unanswered.

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 all three parameters. The description doesn't add any parameter semantics beyond what's in the schema - it mentions 'today's daily note or a note for a specific date' which aligns with the date parameter's description but doesn't provide additional context about parameter interactions or constraints.

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 ('Create') and resource ('daily note'), specifying it can be for today or a specific date. It distinguishes from generic 'create_note' by focusing on daily notes, but doesn't explicitly differentiate from 'get_daily_note' which might retrieve rather than create.

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 on when to use this tool versus alternatives like 'create_note' or 'get_daily_note'. The description implies date-specific creation but doesn't provide context about prerequisites, error conditions, or when other tools might be more appropriate.

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

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