get_page_linked_references
Retrieve all blocks in a Logseq graph that link to a specific page using double bracket notation [[Page Name]]. Ideal for tracking references and connections within your knowledge base.
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
| Name | Required | Description | Default |
|---|---|---|---|
| page_name | Yes |
Implementation Reference
- src/logseq_mcp/tools/pages.py:84-101 (handler)MCP tool handler for 'get_page_linked_references'. Decorated with @mcp.tool(), it delegates to the LogseqAPIClient instance to fetch linked references for the given page name.@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)
- LogseqAPIClient helper method that calls the underlying Logseq API 'logseq.Editor.getPageLinkedReferences' endpoint and normalizes the response.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 []