wpnav_delete_page
Delete a WordPress page by ID with optional permanent removal. Changes are logged in audit trail. This action cannot be undone.
Instructions
Delete a WordPress page by ID. Changes are logged in audit trail. WARNING: This action cannot be undone (page moves to trash by default).
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | WordPress page ID | |
| force | No | Force permanent deletion (skip trash). Default: false |
Implementation Reference
- src/tools/content/index.ts:212-240 (registration)Full registration of the wpnav_delete_page tool, including stubbed handler that rejects with 'not_supported' error.toolRegistry.register({ definition: { name: 'wpnav_delete_page', description: 'Delete a WordPress page by ID. Changes are logged in audit trail. WARNING: This action cannot be undone (page moves to trash by default).', inputSchema: { type: 'object', properties: { id: { type: 'number', description: 'WordPress page ID' }, force: { type: 'boolean', description: 'Force permanent deletion (skip trash). Default: false', default: false }, }, required: ['id'], }, }, handler: async (args) => { return { content: [{ type: 'text', text: JSON.stringify({ error: 'not_supported', code: 'NOT_SUPPORTED', message: 'Page delete via safe plan/apply is not available in v1.1. Use update operations or wait for v1.2.', context: { resource_type: 'page', resource_id: args.id, suggestion: 'Use wpnav_update_page to change status to trash instead' }, }, null, 2), }], isError: true, }; }, category: ToolCategory.CONTENT, });
- src/tools/content/index.ts:225-237 (handler)Handler implementation for wpnav_delete_page, currently a stub that returns an error indicating the feature is not yet supported.handler: async (args) => { return { content: [{ type: 'text', text: JSON.stringify({ error: 'not_supported', code: 'NOT_SUPPORTED', message: 'Page delete via safe plan/apply is not available in v1.1. Use update operations or wait for v1.2.', context: { resource_type: 'page', resource_id: args.id, suggestion: 'Use wpnav_update_page to change status to trash instead' }, }, null, 2), }], isError: true, };
- src/tools.ts:151-169 (schema)Schema definition for wpnav_delete_page in the exported tools array, used for MCP tool manifest generation.{ name: 'wpnav_delete_page', description: 'Delete a WordPress page by ID. Changes are logged in audit trail. WARNING: This action cannot be undone (page moves to trash by default).', inputSchema: { type: 'object' as const, properties: { id: { type: 'number' as const, description: 'WordPress page ID', }, force: { type: 'boolean' as const, description: 'Force permanent deletion (skip trash). Default: false', default: false, }, }, required: ['id'], },