Skip to main content
Glama

get_all_pages

Retrieve all pages from your Logseq graph, including journal entries with date attributes, to access your complete knowledge base.

Instructions

Gets all pages from the Logseq graph. Journal pages can be identified by the "journal?" attribute set to true and will include a "journalDay" attribute in the format YYYYMMDD. Returns: list: A list of all pages in the Logseq graph.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The main MCP tool handler for 'get_all_pages', decorated with @mcp.tool(). It calls the LogseqAPIClient's get_all_pages method to retrieve all pages from the Logseq graph.
    @mcp.tool() def get_all_pages() -> List[Dict]: """ Gets all pages from the Logseq graph. Journal pages can be identified by the "journal?" attribute set to true and will include a "journalDay" attribute in the format YYYYMMDD. Returns: list: A list of all pages in the Logseq graph. """ """Fetch all pages from Logseq.""" return logseq_client.get_all_pages()
  • Supporting method in LogseqAPIClient that handles the actual API call to Logseq's 'logseq.Editor.getAllPages' endpoint and normalizes the response to a list of page dictionaries.
    def get_all_pages(self) -> List[Dict]: """Get all pages in the graph""" response = self.call_api("logseq.Editor.getAllPages") if isinstance(response, list): return response return response.get("result", []) if isinstance(response, dict) else []
  • The package __all__ export list includes 'get_all_pages', indicating it's part of the public API. Importing this module registers all tools via their decorators.
    __all__ = ["get_all_pages", "get_page", "create_page", "get_page_blocks", "get_block", "create_block", "update_block", "search_blocks", "get_page_linked_references"]
  • Global LogseqAPIClient instance used by the get_all_pages tool and other page-related tools.
    logseq_client = LogseqAPIClient()

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