Skip to main content
Glama

delete_page

Remove a page and all its associated blocks from a Logseq graph permanently. Specify the page name to delete it irreversibly using this MCP server tool.

Instructions

Deletes a page from the Logseq graph.

⚠️ This removes the page and all its blocks. Cannot be undone.

Args:
    name: The name of the page to delete.
    
Returns:
    Result of the deletion operation.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYes

Implementation Reference

  • The MCP tool handler for 'delete_page', decorated with @mcp.tool(), which delegates to the LogseqAPIClient.delete_page method.
    @mcp.tool()
    def delete_page(name: str) -> Dict:
        """
        Deletes a page from the Logseq graph.
        
        ⚠️ This removes the page and all its blocks. Cannot be undone.
        
        Args:
            name: The name of the page to delete.
            
        Returns:
            Result of the deletion operation.
        """
        return logseq_client.delete_page(name)
  • The LogseqAPIClient helper method that performs the actual API call to Logseq's 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
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