Skip to main content
Glama

delete_page

Remove pages from your Logseq graph, including all associated blocks, with irreversible deletion for journal pages using date format.

Instructions

Deletes a page from the Logseq graph. This operation removes the specified page and all its blocks. This action cannot be undone. For journal pages, use the format "mmm dth, yyyy" (e.g., "Apr 4th, 2025"). Args: name (str): The name of the page to delete. Returns: dict: Result of the deletion operation.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYes

Implementation Reference

  • The primary MCP tool handler for 'delete_page', decorated with @mcp.tool(). It takes a page name and delegates the deletion to the LogseqAPIClient instance.
    @mcp.tool() def delete_page(name: str) -> Dict: """ Deletes a page from the Logseq graph. This operation removes the specified page and all its blocks. This action cannot be undone. For journal pages, use the format "mmm dth, yyyy" (e.g., "Apr 4th, 2025"). Args: name (str): The name of the page to delete. Returns: dict: Result of the deletion operation. """ """Delete a page from the Logseq graph.""" return logseq_client.delete_page(name)
  • Core helper method in LogseqAPIClient that performs the actual API call to Logseq's 'logseq.Editor.deletePage' endpoint to delete the specified page.
    def delete_page(self, page_name: str) -> Dict: """Delete a page from the graph""" response = self.call_api("logseq.Editor.deletePage", [page_name]) if isinstance(response, dict) and "result" in response: return response.get("result") return response
  • Re-exports the delete_page tool function along with others, facilitating its import and registration via module import since tools are auto-registered by decorators.
    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", "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", ]

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