delete_page
Remove a page from BookStack by moving it to the recycle bin using its page ID.
Instructions
Delete a page (moves to recycle bin)
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Page ID |
Implementation Reference
- src/tools/content-tools.ts:705-709 (handler)Handler logic for the 'delete_page' tool: parses the page ID from input arguments, calls the BookStackClient's deletePage method, and returns a success message.case "delete_page": { const id = parseInteger(args.id); await client.deletePage(id); return `Page ${id} deleted successfully`; }
- src/tools/content-tools.ts:395-405 (schema)Tool definition for 'delete_page', specifying the name, description, and input schema that requires a numeric 'id' parameter.{ name: "delete_page", description: "Delete a page (moves to recycle bin)", inputSchema: { type: "object", properties: { id: { type: "number", description: "Page ID" }, }, required: ["id"], }, },
- src/lib/bookstack-client.ts:222-224 (helper)BookStackClient helper method that performs the actual DELETE API request to `/pages/{id}` to delete the page.async deletePage(id: number): Promise<void> { return this.delete(`/pages/${id}`); }
- src/index.ts:124-126 (registration)Registration and dispatch logic in the main server handler: routes 'delete_page' (included in contentToolNames) to the handleContentTool function.if (contentToolNames.includes(name)) { result = await handleContentTool(name, args, bookStackClient); } else if (searchUserToolNames.includes(name)) {