Skip to main content
Glama
mikeysrecipes

Logseq MCP Tools

create_page

Create new pages in Logseq knowledge graphs, including journal entries with automatic date formatting and properties.

Instructions

Creates a new page in the Logseq graph.

For journal pages, use the format "mmm dth, yyyy" (e.g., "Apr 4th, 2025").
Journal pages are specially formatted in Logseq with automatic dating.

When you create a journal page, Logseq automatically:
- Sets "journal?": true
- Sets "journalDay": YYYYMMDD (e.g., 20250404 for April 4, 2025)
- Formats the page as a journal entry

Args:
    name (str): The name of the new page.
    properties (dict, optional): Properties to set on the new page.
    
Returns:
    dict: Information about the created page.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYes
propertiesNo

Implementation Reference

  • MCP tool handler for create_page. Decorated with @mcp.tool(), defines input schema via type hints and docstring, implements logic by calling the Logseq client.
    @mcp.tool() 
    def create_page(name: str, properties: Optional[Dict] = None) -> Dict:
        """
        Creates a new page in the Logseq graph.
        
        For journal pages, use the format "mmm dth, yyyy" (e.g., "Apr 4th, 2025").
        Journal pages are specially formatted in Logseq with automatic dating.
        
        When you create a journal page, Logseq automatically:
        - Sets "journal?": true
        - Sets "journalDay": YYYYMMDD (e.g., 20250404 for April 4, 2025)
        - Formats the page as a journal entry
        
        Args:
            name (str): The name of the new page.
            properties (dict, optional): Properties to set on the new page.
            
        Returns:
            dict: Information about the created page.
        """
        """Create a new page with the given name and properties."""
        return logseq_client.create_page(name, properties)
  • Helper method in LogseqAPIClient that wraps the Logseq API call to create a page.
    def create_page(self, page_name: str, properties: Dict = None) -> Dict:
        """Create a new page"""
        params = [page_name]
        if properties:
            params.append(properties)
        response = self.call_api("logseq.Editor.createPage", params)
        if isinstance(response, dict) and "result" in response:
            return response.get("result")
        return response
  • Global client instance used by the tool handlers.
    logseq_client = LogseqAPIClient()
  • Re-export of the create_page tool from pages.py for central import.
    from .pages import get_all_pages, get_page, create_page, delete_page, get_page_linked_references
  • Re-export of create_page in the package __init__.
    create_page,
Behavior4/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. It effectively describes key behaviors: it explains what happens when creating journal pages (automatic property setting and formatting), which is valuable context beyond just the creation action. However, it doesn't mention potential errors, permissions needed, or rate limits, leaving some behavioral aspects uncovered.

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 well-structured and appropriately sized: it starts with the core purpose, provides specific usage guidelines, explains behavioral aspects for journal pages, and clearly documents parameters and returns. Every sentence adds value without redundancy, making it easy to parse and understand.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity (creation tool with journal-specific behavior), no annotations, and no output schema, the description does a good job covering the essentials: purpose, usage, behavior, and parameters. However, it doesn't describe the return value format (beyond 'dict: Information about the created page'), which would be helpful since there's no output schema. For a creation tool, this is a minor gap.

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?

With 0% schema description coverage, the description must compensate for the lack of parameter documentation in the schema. It adds meaningful semantics: it explains that 'name' is for the new page and 'properties' are optional properties to set, and provides specific format guidance for journal page names. This goes beyond what the bare schema provides, though it could elaborate more on property structure.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb 'creates' and the resource 'new page in the Logseq graph', distinguishing it from siblings like create_block (which creates blocks) or delete_page (which removes pages). It specifies the exact action and target resource without ambiguity.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides explicit guidance on when to use this tool vs. alternatives: it instructs to use the specific format 'mmm dth, yyyy' for journal pages and explains that journal pages are specially formatted with automatic dating. This helps differentiate from creating regular pages or using other tools like create_block for different content types.

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

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