Skip to main content
Glama

get_page

Retrieve a specific page from a Logseq graph by name, including journal pages formatted as "mmm dth, yyyy". Returns page details or None if not found.

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").
Journal pages have specific attributes:
- "journal?": true - Indicates this is a journal page
- "journalDay": YYYYMMDD - The date in numeric format

Args:
    name: The name of the page to retrieve.
    
Returns:
    Information about the requested page, or None if not found.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYes

Implementation Reference

  • The MCP tool handler for the 'get_page' tool. Decorated with @mcp.tool(), it defines the input (name: str) and output (Optional[Dict]) schema via type hints and docstring, and implements the logic by delegating 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").
        Journal pages have specific attributes:
        - "journal?": true - Indicates this is a journal page
        - "journalDay": YYYYMMDD - The date in numeric format
        
        Args:
            name: The name of the page to retrieve.
            
        Returns:
            Information about the requested page, or None if not found.
        """
        return logseq_client.get_page(name)
  • Helper method in LogseqAPIClient that performs the actual API call to retrieve the 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
  • Exported in the package __init__.py for easy import of the tool function.
    get_page, 
    create_page,
  • Imported and re-exported in tools/__init__.py.
    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", 
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 of behavioral disclosure. It explains that the tool returns page information or None if not found, which is useful. However, it lacks details on permissions, error handling, rate limits, or whether this is a read-only operation, which are important for a tool interacting with a graph system.

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 guidelines, and labeled sections for Args and Returns. It is appropriately sized, but the journal page details could be slightly more concise, and the front-loading is effective with the main action stated first.

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 the complexity of interacting with a graph system, no annotations, and no output schema, the description is moderately complete. It covers the purpose, parameter semantics, and basic return behavior, but lacks details on output structure, error cases, or integration with sibling tools, leaving room for improvement.

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 schema description coverage is 0%, so the description must compensate. It adds meaningful context for the 'name' parameter, explaining the specific format for journal pages and their attributes, which goes beyond the basic schema. However, it does not cover other potential nuances like case sensitivity or special characters for non-journal pages.

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 retrieves blocks within a page). The verb 'gets' is precise and the scope is well-defined.

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 explicit guidance on when to use this tool for journal pages, specifying the required date format ('mmm dth, yyyy') and attributes. However, it does not mention when NOT to use it or explicitly compare it to alternatives like get_all_pages or get_page_blocks, leaving some context gaps.

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

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/apw124/logseq-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server