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
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes |
Implementation Reference
- src/logseq_mcp/tools/pages.py:56-69 (handler)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