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)Executes the delete_page tool by parsing the page ID argument and delegating to the BookStack client's deletePage method, returning 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)Defines the tool schema including name, description, and input schema requiring a numeric page ID.{ 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)BookStack API client helper method that performs the actual DELETE request to /pages/{id} endpoint.async deletePage(id: number): Promise<void> { return this.delete(`/pages/${id}`); }
- src/index.ts:124-126 (registration)Registers the dispatch logic for content tools, including delete_page, by checking if the tool name is in contentToolNames and calling the appropriate handler.if (contentToolNames.includes(name)) { result = await handleContentTool(name, args, bookStackClient); } else if (searchUserToolNames.includes(name)) {