Skip to main content
Glama
mikeysrecipes

Logseq MCP Tools

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()
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden. It discloses the return format (list) and special attributes for journal pages, which is useful behavioral context. However, it doesn't mention performance implications (e.g., large graphs), pagination, error conditions, or authentication needs, leaving gaps for a read operation.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is appropriately sized with three sentences: purpose statement, journal page detail, and return format. It's front-loaded with the core function and avoids redundancy. The journal detail could be slightly more integrated, but overall it's efficient.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no annotations, no output schema, and moderate complexity (retrieving all pages), the description provides the essential purpose and return type but lacks details on output structure (e.g., page fields), error handling, or performance considerations. It's minimally adequate but leaves the agent guessing about the full response format.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has 0 parameters with 100% schema coverage, so the schema already fully documents the absence of inputs. The description appropriately doesn't add parameter information, maintaining focus on the tool's behavior and output. This meets the baseline for zero-parameter tools.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose with a specific verb ('Gets') and resource ('all pages from the Logseq graph'). It distinguishes this tool from siblings like get_page (singular) and get_page_blocks, but doesn't explicitly contrast with search_blocks or other list-oriented tools.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage by mentioning journal page identification, suggesting this tool is for retrieving comprehensive page lists. However, it doesn't explicitly state when to use this vs. alternatives like search_blocks or get_page_blocks, nor does it provide exclusion criteria or prerequisites.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other 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