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; } }

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