Skip to main content
Glama

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,

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