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"]

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