Skip to main content
Glama

get_all_pages

Retrieve all pages from a Logseq graph, including journal pages identified by the 'journal?' attribute and YYYYMMDD format. Useful for accessing and managing knowledge graph content.

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

  • MCP tool handler for 'get_all_pages'. Decorated with @mcp.tool(), it fetches all pages by delegating to LogseqAPIClient.get_all_pages(). Includes type hints and documentation serving as schema.
    @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()
  • Core implementation in LogseqAPIClient that calls the Logseq API 'logseq.Editor.getAllPages', handles response unwrapping, and returns list of pages.
    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 []
  • Imports and exposes 'get_all_pages' in tools package __all__, ensuring it's available for registration when the package is imported.
    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",
  • Imports 'get_all_pages' from tools into the main package, listed in __all__, making it discoverable for MCP server.
    from .tools import ( get_all_pages,

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