Skip to main content
Glama
bazylhorsey
by bazylhorsey

create_monthly_note

Create a monthly note for your Obsidian vault with template variables, organizing your monthly planning and documentation in one centralized location.

Instructions

Create a monthly note for a specific date

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dateNoDate in the month (YYYY-MM-DD), defaults to this month
variablesNoAdditional template variables
vaultYesVault name

Implementation Reference

  • Tool schema definition including name, description, and input schema for create_monthly_note, part of the tools list returned by listTools.
    {
      name: 'create_monthly_note',
      description: 'Create a monthly note for a specific date',
      inputSchema: {
        type: 'object',
        properties: {
          vault: { type: 'string', description: 'Vault name' },
          date: { type: 'string', description: 'Date in the month (YYYY-MM-DD), defaults to this month' },
          variables: { type: 'object', description: 'Additional template variables' },
        },
        required: ['vault'],
      },
    },
  • Dispatch handler in the MCP CallToolRequestSchema that extracts parameters and calls PeriodicNotesService.createPeriodicNote with type 'monthly'.
    case 'create_monthly_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,
        'monthly',
        date,
        args?.variables as Record<string, any> | undefined
      );
    
      return {
        content: [{ type: 'text', text: JSON.stringify(result, null, 2) }],
      };
    }
  • Core handler function createPeriodicNote in PeriodicNotesService that implements the logic for creating monthly notes (when type='monthly'). Handles path generation, template rendering (if configured), default content generation, and file creation.
    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)}`
        };
      }
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 basic action. It doesn't disclose behavioral traits such as what happens if a note already exists for that month, whether it requires specific permissions, how template variables are used, or any side effects. This is inadequate for a creation tool with zero 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 that directly states the tool's purpose without unnecessary words. It is appropriately sized and front-loaded, with zero wasted text.

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 (creation operation with 3 parameters including nested objects), lack of annotations, and no output schema, the description is insufficient. It doesn't explain the creation process, how variables interact with templates, what the output looks like, or error conditions, leaving significant gaps for an agent to use it correctly.

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 (date, variables, vault). The description adds no additional parameter semantics beyond what's in the schema, such as format details for date or examples for variables. 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 action ('create') and resource ('monthly note') with specific temporal scope ('for a specific date'). It distinguishes from siblings like create_daily_note and create_weekly_note by specifying monthly periodicity, though it doesn't explicitly contrast with create_note (generic) or create_from_template (template-based).

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 is provided on when to use this tool versus alternatives like create_daily_note, create_weekly_note, create_yearly_note, or create_note. The description implies usage for monthly notes but doesn't specify prerequisites, exclusions, or comparative contexts with sibling tools.

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