Skip to main content
Glama
mikeysrecipes

Logseq MCP Tools

get_page

Retrieve a specific page from your Logseq knowledge graph by name, including journal pages using date formats like 'Apr 4th, 2025'.

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 MCP tool handler function for get_page, decorated with @mcp.tool(), which validates input via type hints and docstring, and executes by calling 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)
  • The supporting LogseqAPIClient.get_page method that performs the actual API call to Logseq's Editor.getPage endpoint.
    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
Behavior3/5

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

With no annotations provided, the description carries the full burden. It discloses that the tool retrieves information (implied read-only) and specifies journal page attributes, but lacks details on error handling, permissions, rate limits, or what happens if the page doesn't exist. It adds some behavioral context but leaves gaps for a mutation-free tool.

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 well-structured with a clear purpose statement, usage notes, and parameter/return sections. It is appropriately sized, but the journal attributes section could be more concise. Most sentences earn their place by providing essential information without redundancy.

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

Completeness4/5

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

Given the tool's low complexity (1 parameter, no output schema, no annotations), the description is largely complete. It covers purpose, parameter semantics, and return type. However, it lacks details on error cases or response structure, which would enhance completeness for a retrieval tool.

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

Parameters5/5

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

The description adds significant meaning beyond the input schema, which has 0% description coverage. It explains the 'name' parameter in detail, including format requirements for journal pages ('mmm dth, yyyy') and examples, and clarifies that journal pages are automatically created. This fully compensates for the schema's lack of documentation.

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

Purpose5/5

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

The description clearly states the specific action ('Gets a specific page') and resource ('from the Logseq graph by name'), distinguishing it from siblings like get_all_pages (which lists all pages) and get_page_blocks (which focuses on page contents). The verb 'gets' is precise and unambiguous.

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

Usage Guidelines4/5

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

The description provides clear context for when to use this tool (e.g., for journal pages, use specific date formats) and implies usage by specifying the target resource. However, it does not explicitly state when to choose alternatives like get_all_pages or get_page_blocks, nor does it mention prerequisites or exclusions.

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