ghost_delete_page
Permanently removes a page from Ghost CMS using its unique ID, with no undo.
Instructions
Deletes a page from Ghost CMS by ID. This operation is permanent and cannot be undone.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | The ID of the page to delete. |
Implementation Reference
- src/mcp_server.js:842-851 (handler)The tool handler registered for 'ghost_delete_page'. Calls ghostService.deletePage(id), logs success, and returns a confirmation text response.
withErrorHandling('ghost_delete_page', deletePageSchema, async (input) => { const { id } = input; await ghostService.deletePage(id); mcpLogger.info(`Page deleted successfully. Page ID: ${id}`); return { content: [{ type: 'text', text: `Page ${id} has been successfully deleted.` }], }; }) ); - src/mcp_server.js:835-851 (registration)Registration of the 'ghost_delete_page' tool via server.registerTool with description, inputSchema, and the async handler.
server.registerTool( 'ghost_delete_page', { description: 'Deletes a page from Ghost CMS by ID. This operation is permanent and cannot be undone.', inputSchema: deletePageSchema, }, withErrorHandling('ghost_delete_page', deletePageSchema, async (input) => { const { id } = input; await ghostService.deletePage(id); mcpLogger.info(`Page deleted successfully. Page ID: ${id}`); return { content: [{ type: 'text', text: `Page ${id} has been successfully deleted.` }], }; }) ); - src/mcp_server.js:725-727 (schema)Input schema (Zod object) for the delete page tool: requires 'id' (validated via ghostIdSchema).
const deletePageSchema = z.object({ id: ghostIdSchema.meta({ description: 'The ID of the page to delete.' }), }); - src/services/pages.js:62-62 (helper)The deletePage export from pages service, which is an alias for service.remove (generated by createResourceService factory).
export const deletePage = service.remove; - The remove function in the resource service factory that calls deleteResource (from ghostApiClient) with the resource name, id, and label.
async function remove(id) { return deleteResource(resource, id, label); }