Skip to main content
Glama

get_journal

Retrieve journal entries from your Logseq knowledge graph for today or a specific date to access daily notes without manual searching.

Instructions

오늘 또는 특정 날짜의 저널 페이지 조회

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dateNo날짜 (YYYY-MM-DD, 기본값: 오늘)

Implementation Reference

  • MCP tool handler for 'get_journal': parses arguments using GetJournalSchema, calls graph.getJournalPage(date), returns JSON of page or error message if not found.
    case 'get_journal': {
      const { date } = GetJournalSchema.parse(args);
      const page = await graph.getJournalPage(date);
      if (!page) {
        return {
          content: [{ type: 'text', text: '저널 페이지를 찾을 수 없습니다.' }],
        };
      }
      return {
        content: [{ type: 'text', text: JSON.stringify(page, null, 2) }],
      };
    }
  • Zod schema for validating input to get_journal tool: optional date string (YYYY-MM-DD).
    const GetJournalSchema = z.object({
      date: z.string().max(10).optional().describe('날짜 (YYYY-MM-DD, 기본값: 오늘)'),
    });
  • src/index.ts:216-225 (registration)
    Registration of 'get_journal' tool in TOOLS array, including name, description, and JSON input schema.
    {
      name: 'get_journal',
      description: '오늘 또는 특정 날짜의 저널 페이지 조회',
      inputSchema: {
        type: 'object' as const,
        properties: {
          date: { type: 'string', description: '날짜 (YYYY-MM-DD, 기본값: 오늘)' },
        },
      },
    },
  • Core helper method getJournalPage in GraphService: computes journal filename from date (YYYY-MM-DD to YYYY_MM_DD.md), checks existence, returns Page via readPage or null.
    async getJournalPage(date?: string): Promise<Page | null> {
      const targetDate = date || this.getTodayString();
    
      // Validate date format (YYYY-MM-DD only)
      if (date && !/^\d{4}-\d{2}-\d{2}$/.test(date)) {
        throw new Error('Invalid date format: use YYYY-MM-DD');
      }
    
      const fileName = targetDate.replace(/-/g, '_') + '.md';
      const filePath = join(this.journalsPath, fileName);
      this.validatePath(filePath);
    
      try {
        await stat(filePath);
        return this.readPage(`journals/${fileName}`);
      } catch {
        return null;
      }
    }
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 the tool retrieves journal pages, implying a read-only operation, but doesn't mention any behavioral traits such as authentication needs, rate limits, error handling, or what happens if no page exists for the date. For a tool with zero annotation coverage, this leaves significant gaps in understanding its behavior.

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 concise and front-loaded in a single sentence: '오늘 또는 특정 날짜의 저널 페이지 조회'. It efficiently conveys the core purpose without unnecessary words. However, it could be slightly improved by structuring to highlight key distinctions, but overall it's appropriately sized and clear.

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 (a read operation with one parameter), lack of annotations, and no output schema, the description is incomplete. It doesn't explain what the tool returns (e.g., page content, metadata, or error if missing), how it interacts with siblings, or any prerequisites. For a tool in this context, more detail is needed to fully understand its use and limitations.

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 description adds minimal meaning beyond the input schema. It mentions '오늘 또는 특정 날짜' (today or a specific date), which aligns with the 'date' parameter in the schema (described as '날짜 (YYYY-MM-DD, 기본값: 오늘)'). Since schema description coverage is 100%, the baseline is 3, and the description doesn't provide additional syntax, format details, or constraints beyond what's already in the schema.

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 tool's purpose: '오늘 또는 특정 날짜의 저널 페이지 조회' (retrieve journal page for today or a specific date). It specifies the verb '조회' (retrieve/view) and resource '저널 페이지' (journal page), making the action clear. However, it doesn't explicitly differentiate from siblings like 'read_page' or 'list_pages', which might also retrieve pages.

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. It mentions retrieving journal pages by date, but doesn't clarify if this is for journal-specific pages only, how it differs from 'read_page' (which might read any page), or when to choose other siblings like 'list_pages' for broader queries. No explicit when/when-not or alternative recommendations are included.

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/dearcloud09/logseq-mcp'

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