Skip to main content
Glama

create_page

Create a new page in Logseq graph with custom properties or format it as a journal entry with automatic dating by specifying the name and optional 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 parameters name: str and optional properties: Dict. Includes comprehensive docstring explaining usage for regular and journal pages. Delegates to logseq_client.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"). 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 performs the actual API call to Logseq's 'logseq.Editor.createPage' endpoint, handling parameters and response parsing.
    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

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

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