Skip to main content
Glama

get_page_linked_references

Retrieve all blocks containing links to a specific Logseq page. Input the page name to generate a list of references for tracking and organizing interconnected notes.

Instructions

Gets all linked references to a specific page.

Returns blocks containing [[Page Name]] links to the specified page.

Args:
    page_name: The name of the page to find references to.
    
Returns:
    List of blocks that reference the specified page.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
page_nameYes

Implementation Reference

  • The main MCP tool handler for 'get_page_linked_references', decorated with @mcp.tool(). It defines the input (page_name: str) and output (List[Dict]) schema via typing and docstring, and delegates to LogseqAPIClient.
    def get_page_linked_references(page_name: str) -> List[Dict]:
        """
        Gets all linked references to a specific page.
        
        Returns blocks containing [[Page Name]] links to the specified page.
        
        Args:
            page_name: The name of the page to find references to.
            
        Returns:
            List of blocks that reference the specified page.
        """
        return logseq_client.get_page_linked_references(page_name) 
  • Supporting method in LogseqAPIClient that performs the actual API call to Logseq's getPageLinkedReferences endpoint.
    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 []
  • Re-export of the tool function in tools/__init__.py for convenient import.
    __all__ = [
        "get_all_pages", 
        "get_page", 
        "create_page",
        "delete_page",
        "get_page_blocks",
        "get_block",
        "create_block", 
        "update_block",
        "remove_block",
        "insert_block",
        "move_block",
        "search_blocks",
        "get_page_linked_references",
  • Re-export of the tool function in the main package __init__.py.
    __all__ = ["get_all_pages", "get_page", "create_page", "get_page_blocks", "get_block", "create_block", "update_block", "search_blocks", "get_page_linked_references"]
Behavior2/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 describes what the tool does (gets references) and the return format (list of blocks), but lacks behavioral details such as whether it requires authentication, how it handles non-existent pages, pagination, rate limits, or error conditions. The description doesn't contradict any annotations since none exist.

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 appropriately sized and front-loaded: the first sentence states the core purpose, the second clarifies the return content, and the Args/Returns sections are concise and necessary. Every sentence earns its place with no redundant information.

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 tool's moderate complexity (finding references), no annotations, no output schema, and 1 parameter, the description is somewhat complete but has gaps. It explains the purpose, parameter, and return type, but lacks behavioral context (e.g., error handling, performance). The absence of an output schema means the description should ideally detail the return structure more, though it does specify 'List of blocks.'

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?

With 0% schema description coverage (the schema has no descriptions for parameters), the description compensates by explaining the single parameter 'page_name' as 'The name of the page to find references to.' This adds clear meaning beyond the bare schema. However, it doesn't specify format constraints (e.g., case sensitivity, special characters).

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 tool's purpose with specific verb ('Gets') and resource ('all linked references to a specific page'), and distinguishes it from siblings like get_page (which retrieves page content) and get_page_blocks (which retrieves blocks within a page). The second sentence further clarifies what constitutes a 'linked reference' by mentioning 'blocks containing [[Page Name]] links'.

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 implicitly indicates when to use this tool (to find references to a specific page) but does not explicitly state when not to use it or name alternatives. For example, it doesn't clarify if this should be used instead of search_blocks for finding references, though the context suggests this is the specialized tool for that purpose.

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