Skip to main content
Glama

create_journal

Create a journal page in Logseq for today or a specific date, optionally using a template to organize your daily notes.

Instructions

오늘 또는 특정 날짜의 저널 페이지 생성

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dateNo날짜 (YYYY-MM-DD, 기본값: 오늘)
templateNo템플릿 내용 (선택)

Implementation Reference

  • Core implementation of journal page creation: validates date, ensures directory, creates file with template or default content if not exists.
    async createJournalPage(date?: string, template?: string): Promise<Page> {
      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');
      }
    
      // 보안 검증: 템플릿 크기 제한 (DoS 방지)
      if (template) {
        this.validateContentSize(template);
      }
    
      const fileName = targetDate.replace(/-/g, '_') + '.md';
      const filePath = join(this.journalsPath, fileName);
      this.validatePath(filePath);
    
      // Ensure journals directory exists
      await mkdir(this.journalsPath, { recursive: true });
    
      // 보안 검증: 심링크 공격 방지
      await this.checkSymlink(filePath);
    
      // Check if already exists
      try {
        await stat(filePath);
        return this.readPage(`journals/${fileName}`);
      } catch {
        // Create new journal page
        const content = template || `- `;
        await writeFile(filePath, content, 'utf-8');
        return this.readPage(`journals/${fileName}`);
      }
    }
  • MCP call_tool dispatch for 'create_journal': parses input with schema and calls the graph service method.
    case 'create_journal': {
      const { date, template } = CreateJournalSchema.parse(args);
      const page = await graph.createJournalPage(date, template);
      return {
        content: [{ type: 'text', text: JSON.stringify(page, null, 2) }],
      };
    }
  • Zod validation schema for create_journal tool arguments.
    const CreateJournalSchema = z.object({
      date: z.string().max(10).optional().describe('날짜 (YYYY-MM-DD, 기본값: 오늘)'),
      template: z.string().max(MAX_CONTENT_LENGTH).optional().describe('템플릿 내용 (선택)'),
    });
  • src/index.ts:226-236 (registration)
    Registration of 'create_journal' tool in the TOOLS list returned by list_tools.
    {
      name: 'create_journal',
      description: '오늘 또는 특정 날짜의 저널 페이지 생성',
      inputSchema: {
        type: 'object' as const,
        properties: {
          date: { type: 'string', description: '날짜 (YYYY-MM-DD, 기본값: 오늘)' },
          template: { type: 'string', description: '템플릿 내용 (선택)' },
        },
      },
    },
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 provides minimal behavioral information. It states the creation action but doesn't disclose permissions needed, whether creation overwrites existing entries, what happens on failure, or format of results. For a mutation tool with zero annotation coverage, this is insufficient.

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?

Single sentence, zero waste, front-loaded with core purpose. Every word earns its place - specifies action, resource, and temporal scope efficiently without redundancy.

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?

For a creation tool with no annotations and no output schema, the description is incomplete. It doesn't explain what a successful creation returns, error conditions, or behavioral constraints. Given the mutation nature and lack of structured metadata, more context is needed for effective tool use.

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 already fully documents both parameters. The description mentions 'today or specific date' which aligns with the date parameter's description, but adds no additional semantic context beyond what the schema provides. 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 ('journal page') with specific temporal scope ('today or specific date'). It distinguishes from generic 'create_page' by specifying journal creation, though doesn't explicitly differentiate from other journal-related tools like 'get_journal'.

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 on when to use this tool versus alternatives like 'create_page' or 'append_to_page'. The description mentions temporal scope but doesn't provide context about prerequisites, when-not-to-use scenarios, or comparisons 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/dearcloud09/logseq-mcp'

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