Skip to main content
Glama
coji

Journal MCP Server

by coji

get_recent_entries

Retrieve recent journal entries from your personal journal to review or analyze past content, with customizable limits for focused browsing.

Instructions

Get the most recent journal entries

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoNumber of recent entries to retrieve (default 10)

Implementation Reference

  • MCP server tool registration for 'get_recent_entries', including input schema (limit parameter) and handler function that fetches entries using getRecentEntries helper and formats a markdown-formatted text response.
    this.server.tool(
      'get_recent_entries',
      'Get the most recent journal entries',
      {
        limit: z
          .number()
          .optional()
          .describe('Number of recent entries to retrieve (default 10)'),
      },
      async (args) => {
        const entries = await getRecentEntries(args.limit);
    
        let response = `šŸ“… Recent Journal Entries (${entries.length})\n\n`;
    
        for (const file of entries) {
          response += `**${file.date}** - ${file.entries_count} entries\n`;
          response += `Tags: ${file.tags.join(', ') || 'None'}\n`;
    
          for (const entry of file.entries) {
            response += `\nšŸ“ ${entry.timestamp} - ${entry.title}\n`;
            response += `${entry.content}\n`;
          }
          response += '\n---\n\n';
        }
    
        return {
          content: [
            {
              type: 'text',
              text: response,
            },
          ],
        } satisfies CallToolResult;
      }
    );
  • Zod input schema defining the optional 'limit' parameter for the tool.
    {
      limit: z
        .number()
        .optional()
        .describe('Number of recent entries to retrieve (default 10)'),
    },
  • Core helper function that implements getRecentEntries by invoking searchEntries with the given limit and returning the recent JournalFile entries.
    export async function getRecentEntries(limit = 10): Promise<JournalFile[]> {
      const result = await searchEntries({ limit });
      return result.entries;
    }
  • Tool registration call specifying the tool name and description.
    this.server.tool(
      'get_recent_entries',
      'Get the most recent journal entries',
  • Import of the getRecentEntries helper function from journal manager.
      addEntry,
      searchEntries,
      getRecentEntries,
      listTags,
      getEntryByDate,
      getStats,
    } from './journal/manager.js';
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure but offers minimal information. It doesn't specify whether this is a read-only operation (implied by 'Get' but not explicit), what format the entries are returned in, whether there's pagination, authentication requirements, or rate limits. For a retrieval tool with zero annotation coverage, this leaves significant behavioral gaps.

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

Conciseness4/5

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

The description is a single, straightforward sentence that efficiently conveys the core functionality without unnecessary words. It's appropriately front-loaded with the main action and resource. However, it could be slightly more informative by adding context about ordering or default behavior, though this doesn't significantly detract from its 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 lack of annotations and output schema, the description is insufficiently complete. It doesn't explain what 'most recent' entails (e.g., sorted by date, time-based cutoff), the structure of returned entries, or error conditions. For a tool that likely returns multiple data objects, more context is needed to guide the agent effectively, especially with sibling tools offering alternative retrieval methods.

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 schema description coverage is 100%, with the single parameter 'limit' fully documented in the schema. The description doesn't add any parameter-specific information beyond what's already in the schema (e.g., it doesn't clarify what 'most recent' means in terms of ordering or time range). This meets the baseline score of 3 when the schema adequately covers parameters.

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 ('Get') and resource ('most recent journal entries'), making the purpose immediately understandable. It distinguishes from siblings like 'get_entry_by_date' (date-specific) and 'search_entries' (keyword-based), though it doesn't explicitly mention these distinctions. The description is specific enough to understand what the tool does without being tautological.

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 like 'get_entry_by_date', 'get_daily_summary', or 'search_entries'. It doesn't specify scenarios where retrieving recent entries is preferable to other retrieval methods, nor does it mention any prerequisites or constraints for usage. The agent must infer usage context from 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/coji/journal-mcp'

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