Skip to main content
Glama
bazylhorsey
by bazylhorsey

get_periodic_note_info

Retrieve information about periodic notes from your Obsidian vault, including daily, weekly, monthly, or yearly entries for specific dates.

Instructions

Get info about a periodic note

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dateNoDate (YYYY-MM-DD), defaults to today
typeYesNote type
vaultYesVault name

Implementation Reference

  • Core handler function that computes the periodic note path and title, checks if the file exists in the vault, and returns structured PeriodicNoteInfo or error.
    async getPeriodicNoteInfo(
      vaultPath: string,
      type: PeriodicNoteType,
      date?: Date
    ): Promise<VaultOperationResult<PeriodicNoteInfo>> {
      try {
        const noteDate = date || new Date();
        const notePath = this.getPeriodicNotePath(type, noteDate);
        const fullPath = path.join(vaultPath, notePath);
    
        let exists = false;
        try {
          await fs.access(fullPath);
          exists = true;
        } catch {
          exists = false;
        }
    
        const info: PeriodicNoteInfo = {
          type,
          date: noteDate,
          path: notePath,
          title: this.getPeriodicNoteTitle(type, noteDate),
          exists,
        };
    
        return { success: true, data: info };
      } catch (error) {
        return {
          success: false,
          error: `Failed to get ${type} note info: ${error instanceof Error ? error.message : String(error)}`
        };
      }
    }
  • MCP tool registration with input schema defining parameters: vault (required), type (enum: daily/weekly/monthly/yearly, required), date (optional YYYY-MM-DD).
      name: 'get_periodic_note_info',
      description: 'Get info about a periodic note',
      inputSchema: {
        type: 'object',
        properties: {
          vault: { type: 'string', description: 'Vault name' },
          type: { type: 'string', enum: ['daily', 'weekly', 'monthly', 'yearly'], description: 'Note type' },
          date: { type: 'string', description: 'Date (YYYY-MM-DD), defaults to today' },
        },
        required: ['vault', 'type'],
      },
    },
  • src/index.ts:950-967 (registration)
    Dispatch handler in MCP CallToolRequestSchema that validates vault, parses arguments, calls PeriodicNotesService.getPeriodicNoteInfo, and returns JSON result.
    case 'get_periodic_note_info': {
      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 type = args?.type as 'daily' | 'weekly' | 'monthly' | 'yearly';
      const date = args?.date ? new Date(args.date as string) : undefined;
      const result = await this.periodicNotesService.getPeriodicNoteInfo(
        connector.vaultPath,
        type,
        date
      );
    
      return {
        content: [{ type: 'text', text: JSON.stringify(result, null, 2) }],
      };
    }
  • TypeScript type definitions for input 'type' enum and output PeriodicNoteInfo structure used by the handler.
    export type PeriodicNoteType = 'daily' | 'weekly' | 'monthly' | 'yearly';
    
    export interface PeriodicNoteConfig {
      enabled: boolean;
      folder: string;
      templatePath?: string;
      format: string; // Date format for filename
    }
    
    export interface PeriodicNotesSettings {
      daily: PeriodicNoteConfig;
      weekly: PeriodicNoteConfig;
      monthly: PeriodicNoteConfig;
      yearly: PeriodicNoteConfig;
    }
    
    export interface PeriodicNoteInfo {
      type: PeriodicNoteType;
      date: Date;
      path: string;
      title: string;
      exists: boolean;
    }
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. It states a read operation ('Get info'), which implies it's non-destructive, but doesn't mention any behavioral traits like error handling, rate limits, authentication needs, or what 'info' specifically entails (e.g., metadata, content, or structure). This leaves significant gaps for a tool with no annotation coverage.

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 ('Get info about a periodic note') that is front-loaded and wastes no words. It directly conveys the core purpose without unnecessary elaboration, earning full marks for conciseness.

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 complexity of retrieving note information with 3 parameters, no annotations, and no output schema, the description is incomplete. It doesn't explain what 'info' includes (e.g., file content, metadata, or links), potential errors, or how results are formatted, making it inadequate for full agent understanding.

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?

The input schema has 100% description coverage, clearly documenting all three parameters (date, type, vault) with details like defaults and enums. The description adds no parameter semantics beyond what's in the schema, so it meets the baseline score of 3 for high schema coverage without compensating value.

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 'Get info about a periodic note' clearly states the verb ('Get') and resource ('periodic note'), making the purpose understandable. However, it doesn't differentiate from sibling tools like 'get_note' or 'get_note_metadata' that might retrieve similar information, which prevents a perfect score.

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 such as 'get_note' or 'list_periodic_notes'. It lacks context about prerequisites or exclusions, leaving the agent to infer usage based on the tool name alone.

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