Skip to main content
Glama
jagoff

obsidian-mcp-complete

by jagoff

obsidian_periodic_note

Manage periodic notes in Obsidian: read, create, upsert, append, or delete daily, weekly, monthly, quarterly, and yearly notes with custom content and frontmatter.

Instructions

Read/create/upsert/append daily, weekly, monthly, quarterly, or yearly notes.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
vaultNoOptional configured vault name. Defaults to the server default vault.
periodNodaily
dateNo
folderNo
actionNoread
contentNo
frontmatterNoYAML frontmatter object.
confirmationNo

Implementation Reference

  • src/tools.ts:983-1005 (registration)
    Registration of 'obsidian_periodic_note' tool with schema definition via the internal 'tool' helper. The tool is registered at line 983 and the handler spans lines 996-1004.
    tool(
      "obsidian_periodic_note",
      "Read/create/upsert/append daily, weekly, monthly, quarterly, or yearly notes.",
      {
        vault: vaultArg,
        period: z.enum(["daily", "weekly", "monthly", "quarterly", "yearly"]).optional().default("daily"),
        date: z.string().optional(),
        folder: z.string().optional(),
        action: z.enum(["read", "create", "upsert", "append", "delete"]).optional().default("read"),
        content: z.string().optional().default(""),
        frontmatter: frontmatterArg,
        confirmation: z.string().optional(),
      },
      async (args) => {
        const date = args.date ?? new Date().toISOString().slice(0, 10);
        const notePath = periodicPath(args.period, date, args.folder);
        if (args.action === "read") return { path: notePath, content: (await vaults.readText(notePath, args.vault)).text };
        if (args.action === "append") return vaults.appendText(notePath, args.content, args.vault, { create: true });
        if (args.action === "delete") return vaults.trash(notePath, args.vault, { confirmation: args.confirmation });
        const text = args.frontmatter ? stringifyFrontmatter(args.frontmatter, args.content) : args.content;
        return vaults.writeText(notePath, text, args.vault, { overwrite: args.action === "upsert" });
      },
    );
  • Handler function for obsidian_periodic_note that reads/creates/upserts/appends/deletes periodic notes (daily, weekly, monthly, quarterly, yearly). Uses periodicPath() to compute the file path and delegates to vaults.readText, vaults.appendText, vaults.writeText, or vaults.trash.
    async (args) => {
      const date = args.date ?? new Date().toISOString().slice(0, 10);
      const notePath = periodicPath(args.period, date, args.folder);
      if (args.action === "read") return { path: notePath, content: (await vaults.readText(notePath, args.vault)).text };
      if (args.action === "append") return vaults.appendText(notePath, args.content, args.vault, { create: true });
      if (args.action === "delete") return vaults.trash(notePath, args.vault, { confirmation: args.confirmation });
      const text = args.frontmatter ? stringifyFrontmatter(args.frontmatter, args.content) : args.content;
      return vaults.writeText(notePath, text, args.vault, { overwrite: args.action === "upsert" });
    },
  • Zod schema for obsidian_periodic_note: vault (optional), period (enum daily/weekly/monthly/quarterly/yearly), date, folder, action (read/create/upsert/append/delete), content, frontmatter, and confirmation.
    {
      vault: vaultArg,
      period: z.enum(["daily", "weekly", "monthly", "quarterly", "yearly"]).optional().default("daily"),
      date: z.string().optional(),
      folder: z.string().optional(),
      action: z.enum(["read", "create", "upsert", "append", "delete"]).optional().default("read"),
      content: z.string().optional().default(""),
      frontmatter: frontmatterArg,
      confirmation: z.string().optional(),
    },
  • The periodicPath helper function that computes the file path for a periodic note based on period, date, and folder. Handles daily, weekly (with ISO week), monthly, quarterly, and yearly patterns.
    function periodicPath(period: "daily" | "weekly" | "monthly" | "quarterly" | "yearly", date: string, folder?: string): string {
      const [year, month, day] = date.split("-").map((part) => Number(part));
      const d = new Date(Date.UTC(year, (month || 1) - 1, day || 1));
      if (period === "daily") return `${folder ?? "00-Inbox"}/${date}.md`;
      if (period === "monthly") return `${folder ?? "00-Inbox"}/${date.slice(0, 7)}.md`;
      if (period === "yearly") return `${folder ?? "00-Inbox"}/${String(year).padStart(4, "0")}.md`;
      if (period === "quarterly") {
        const quarter = Math.floor(((month || 1) - 1) / 3) + 1;
        return `${folder ?? "00-Inbox"}/${String(year).padStart(4, "0")}-Q${quarter}.md`;
      }
      return `${folder ?? "00-Inbox"}/${String(year).padStart(4, "0")}-W${isoWeek(d)}.md`;
    }
  • The isoWeek helper function used by periodicPath to compute the ISO week number for weekly periodic notes.
    function isoWeek(date: Date): string {
      const d = new Date(Date.UTC(date.getUTCFullYear(), date.getUTCMonth(), date.getUTCDate()));
      const day = d.getUTCDay() || 7;
      d.setUTCDate(d.getUTCDate() + 4 - day);
      const yearStart = new Date(Date.UTC(d.getUTCFullYear(), 0, 1));
      const week = Math.ceil((((d.getTime() - yearStart.getTime()) / 86400000) + 1) / 7);
      return String(week).padStart(2, "0");
    }
Behavior2/5

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

The description lists actions including delete, yet annotations state destructiveHint=false, creating a contradiction. No additional behavioral context (e.g., side effects, permissions) is provided beyond the action list.

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

Conciseness3/5

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

The description is a single sentence, which is concise but lacks structure. It could be improved by front-loading the purpose and separating actions or parameters.

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 tool's complexity (8 parameters, no output schema, many siblings), the description is incomplete. It omits details on action differences, required fields (none marked required), and return behavior, leaving significant gaps.

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

Parameters2/5

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

Schema description coverage is only 25% (2 of 8 parameters have descriptions). The description does not compensate by explaining key parameters like period, date, folder, or content, leaving the agent with insufficient guidance.

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 specifies the verbs (read, create, upsert, append) and the resource (daily, weekly, monthly, quarterly, or yearly notes), differentiating it from siblings like obsidian_daily_note and obsidian_create_note.

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

Usage Guidelines3/5

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

The description implies usage for periodic notes but provides no explicit guidance on when to use this tool versus alternatives or when not to use it, leaving the agent to infer context.

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

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