Skip to main content
Glama

get_page

Retrieve specific page details from a Logseq graph by name, including journal pages formatted as 'mmm dth, yyyy', returning structured page information.

Instructions

Gets a specific page from the Logseq graph by name. For journal pages, use the format "mmm dth, yyyy" (e.g., "Apr 4th, 2025"). Note that journal pages are automatically created in Logseq with this date format. Journal pages have specific attributes: - "journal?": true - Indicates this is a journal page - "journalDay": YYYYMMDD - The date in numeric format (e.g., 20250404 for April 4, 2025) Args: name (str): The name of the page to retrieve. Returns: dict: Information about the requested page.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYes

Implementation Reference

  • The main handler function for the 'get_page' MCP tool, decorated with @mcp.tool() for registration, which delegates to the Logseq client.
    @mcp.tool() def get_page(name: str) -> Optional[Dict]: """ Gets a specific page from the Logseq graph by name. For journal pages, use the format "mmm dth, yyyy" (e.g., "Apr 4th, 2025"). Note that journal pages are automatically created in Logseq with this date format. Journal pages have specific attributes: - "journal?": true - Indicates this is a journal page - "journalDay": YYYYMMDD - The date in numeric format (e.g., 20250404 for April 4, 2025) Args: name (str): The name of the page to retrieve. Returns: dict: Information about the requested page. """ """Fetch a specific page by name.""" return logseq_client.get_page(name)
  • Supporting helper method in LogseqAPIClient that performs the actual API call to retrieve a page from Logseq.
    def get_page(self, page_name: str) -> Optional[Dict]: """Get a page by name""" response = self.call_api("logseq.Editor.getPage", [page_name]) if response is None: return None return response.get("result") if isinstance(response, dict) else response
  • Re-export and inclusion in __all__ for the get_page tool function in the tools module.
    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",
  • Type hints and docstring defining the input schema (name: str) and output (Optional[Dict]) for the get_page tool.
    def get_page(name: str) -> Optional[Dict]: """ Gets a specific page from the Logseq graph by name. For journal pages, use the format "mmm dth, yyyy" (e.g., "Apr 4th, 2025"). Note that journal pages are automatically created in Logseq with this date format. Journal pages have specific attributes: - "journal?": true - Indicates this is a journal page - "journalDay": YYYYMMDD - The date in numeric format (e.g., 20250404 for April 4, 2025) Args: name (str): The name of the page to retrieve. Returns: dict: Information about the requested page. """

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