Skip to main content
Glama
mikeysrecipes

Logseq MCP Tools

get_page_linked_references

Find all blocks that link to a specific Logseq page using [[Page Name]] notation. Returns references to help track connections in your knowledge graph.

Instructions

Gets all linked references to a specific page in the Logseq graph.

This returns blocks that contain links to the specified page using
the Logseq double bracket notation: [[Page Name]].

For journal pages, use the format "mmm dth, yyyy" (e.g., "Apr 4th, 2025").

Args:
    page_name (str): The name of the page to find references to.
    
Returns:
    list: A list of blocks that reference the specified page.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
page_nameYes

Implementation Reference

  • The MCP tool handler for 'get_page_linked_references'. Decorated with @mcp.tool(), it defines the tool's input (page_name: str) and output (List[Dict]), with a detailed docstring for schema. Delegates to LogseqAPIClient for execution.
    @mcp.tool()
    def get_page_linked_references(page_name: str) -> List[Dict]:
        """
        Gets all linked references to a specific page in the Logseq graph.
        
        This returns blocks that contain links to the specified page using
        the Logseq double bracket notation: [[Page Name]].
        
        For journal pages, use the format "mmm dth, yyyy" (e.g., "Apr 4th, 2025").
        
        Args:
            page_name (str): The name of the page to find references to.
            
        Returns:
            list: A list of blocks that reference the specified page.
        """
        """Get all blocks that link to the specified page."""
        return logseq_client.get_page_linked_references(page_name) 
  • Supporting helper method in LogseqAPIClient that calls the underlying Logseq API endpoint 'logseq.Editor.getPageLinkedReferences' and handles the response format.
    def get_page_linked_references(self, page_name: str) -> List[Dict]:
        """Get linked references to a page"""
        response = self.call_api("logseq.Editor.getPageLinkedReferences", [page_name])
        if isinstance(response, list):
            return response
        return response.get("result", []) if isinstance(response, dict) else []
Behavior3/5

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

No annotations are provided, so the description carries the full burden. It discloses that the tool returns blocks with double bracket links, which is useful behavioral context. However, it lacks details on permissions, rate limits, error handling, or whether the operation is read-only (implied by 'Gets' but not explicit). More behavioral traits would improve this.

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

Conciseness5/5

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

The description is well-structured and front-loaded: the first sentence states the purpose, followed by details on link format and journal page handling, then clearly labeled Args and Returns sections. Every sentence adds value without redundancy, making it efficient and easy to parse.

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 1 parameter with 0% schema coverage and no output schema, the description does a good job explaining inputs and outputs (list of blocks). It covers the tool's purpose and usage context adequately. However, for a tool with no annotations, it could benefit from more behavioral details like error cases or performance expectations to be fully complete.

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?

Schema description coverage is 0%, so the description must compensate fully. It clearly explains the single parameter 'page_name', including its type (str) and purpose ('The name of the page to find references to'), and provides a specific format example for journal pages. This adds significant meaning beyond the bare schema.

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 verb ('Gets') and resource ('all linked references to a specific page in the Logseq graph'), specifying the exact scope of what is retrieved. It distinguishes from siblings like get_page (which retrieves page content) or get_page_blocks (which retrieves blocks within a page) by focusing on cross-references.

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: to find blocks that link to a specific page. It explicitly mentions the format for journal pages, which is crucial guidance. However, it does not explicitly state when not to use it or name alternatives among siblings (e.g., search_blocks might also find references but differently).

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