Skip to main content
Glama
coji

Journal MCP Server

by coji

get_daily_summary

Retrieve summary statistics for journal entries to analyze daily patterns and insights from personal journal content.

Instructions

Get summary statistics for journal entries

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler and registration for the 'get_daily_summary' tool. It takes no input parameters, calls getStats() to retrieve journal statistics, formats them into a markdown response, and returns it as tool output.
    this.server.tool(
      'get_daily_summary',
      'Get summary statistics for journal entries',
      async () => {
        const stats = await getStats();
    
        let response = `📊 Journal Summary\n\n`;
        response += `**Total Entries:** ${stats.totalEntries}\n`;
        response += `**Total Days:** ${stats.totalFiles}\n`;
    
        if (stats.dateRange.earliest && stats.dateRange.latest) {
          response += `**Date Range:** ${stats.dateRange.earliest} to ${stats.dateRange.latest}\n`;
        }
    
        response += `\n**Top Tags:**\n`;
        if (stats.topTags.length === 0) {
          response += 'No tags found.\n';
        } else {
          for (const { tag, count } of stats.topTags) {
            response += `• ${tag} (${count})\n`;
          }
        }
    
        return {
          content: [
            {
              type: 'text',
              text: response,
            },
          ],
        } satisfies CallToolResult;
      }
    );
  • Core helper function getStats() that computes comprehensive journal statistics by scanning all entries, aggregating counts, date range, and top tags.
    export async function getStats(): Promise<JournalStats> {
      const result = await searchEntries();
      const files = result.entries;
    
      if (files.length === 0) {
        return {
          totalEntries: 0,
          totalFiles: 0,
          dateRange: { earliest: '', latest: '' },
          topTags: [],
        };
      }
    
      const totalEntries = files.reduce((sum, file) => sum + file.entries_count, 0);
      const dates = files.map((f) => f.date).sort();
      const topTags = await listTags();
    
      return {
        totalEntries,
        totalFiles: files.length,
        dateRange: {
          earliest: dates[0],
          latest: dates[dates.length - 1],
        },
        topTags: topTags.slice(0, 10),
      };
    }
  • Type definition for JournalStats, the data structure used by getStats() and rendered in the tool's output.
    export interface JournalStats {
      totalEntries: number;
      totalFiles: number;
      dateRange: {
        earliest: string;
        latest: string;
      };
      topTags: Array<{
        tag: string;
        count: number;
      }>;
    }
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states what the tool does but doesn't reveal behavioral traits like whether it's read-only, requires authentication, has rate limits, or what the summary includes. For a tool with zero annotation coverage, this is a significant gap in transparency.

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 any wasted words. It's appropriately sized and front-loaded, making it easy for an agent to parse quickly.

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 (a summary tool with no output schema and no annotations), the description is incomplete. It doesn't explain what 'summary statistics' entail, how data is aggregated, or what the return format looks like. For a tool that likely outputs structured data, this leaves significant gaps for the agent.

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

Parameters4/5

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

The tool has 0 parameters, and schema description coverage is 100%, so no parameter information is needed. The description doesn't add param semantics, but with no parameters, the baseline is high. It could slightly improve by noting the lack of inputs, but it's already adequate.

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 ('Get') and resource ('summary statistics for journal entries'), making the purpose understandable. However, it doesn't differentiate from siblings like 'get_recent_entries' or 'get_entry_by_date' in terms of what makes this summary unique, 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?

No guidance is provided on when to use this tool versus alternatives such as 'get_recent_entries' or 'get_entry_by_date'. The description implies usage for summary statistics but lacks explicit context or exclusions, leaving the agent to infer based on tool names 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/coji/journal-mcp'

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