Skip to main content
Glama

create_page

Generate new pages in Logseq with customizable properties and automatic journal configuration. Simplify graph organization and entry management using direct input options.

Instructions

Creates a new page in the Logseq graph.

For journal pages, use the format "mmm dth, yyyy" (e.g., "Apr 4th, 2025").
Logseq automatically sets "journal?": true and "journalDay": YYYYMMDD.

Args:
    name: The name of the new page.
    properties: Optional properties to set on the new page.
    
Returns:
    Information about the created page.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYes
propertiesNo

Implementation Reference

  • The primary MCP tool handler for 'create_page', decorated with @mcp.tool(). Delegates to LogseqAPIClient.create_page().
    @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").
        Logseq automatically sets "journal?": true and "journalDay": YYYYMMDD.
        
        Args:
            name: The name of the new page.
            properties: Optional properties to set on the new page.
            
        Returns:
            Information about the created page.
        """
        return logseq_client.create_page(name, properties)
  • Underlying helper method in LogseqAPIClient that calls the Logseq API endpoint 'logseq.Editor.createPage'.
    def create_page(self, page_name: str, properties: Optional[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
  • Re-exports the create_page tool function for use in other modules, facilitating its availability for MCP registration.
    from .pages import get_all_pages, get_page, create_page, delete_page, get_page_linked_references
    from .blocks import get_page_blocks, get_block, create_block, update_block, remove_block, insert_block, move_block, search_blocks
    
    __all__ = [
        "get_all_pages", 
        "get_page", 
        "create_page",
  • Imports and exports the create_page tool as part of the package __all__, making it available when the package is imported before running the MCP server.
    from .tools import (
        get_all_pages, 
        get_page, 
        create_page,
        get_page_blocks,
        get_block,
        create_block, 
        update_block,
        search_blocks,
        get_page_linked_references,
    )
Install Server

Other Tools

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

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