wpnav_delete_post
Delete WordPress posts by ID with audit logging. Moves posts to trash by default or permanently deletes them when forced. This action cannot be undone.
Instructions
Delete a WordPress post by ID. Changes are logged in audit trail. WARNING: This action cannot be undone (post moves to trash by default).
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | WordPress post ID | |
| force | No | Force permanent deletion (skip trash). Default: false |
Implementation Reference
- src/tools/content/index.ts:657-685 (handler)The complete tool registration for 'wpnav_delete_post', including input schema, stub handler (returns not_supported error), and category assignment. This is the primary implementation location where the tool is defined and registered with the registry.toolRegistry.register({ definition: { name: 'wpnav_delete_post', description: 'Delete a WordPress post by ID. Changes are logged in audit trail. WARNING: This action cannot be undone (post moves to trash by default).', inputSchema: { type: 'object', properties: { id: { type: 'number', description: 'WordPress post 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: 'Post delete via safe plan/apply is not available in v1.1. Use update operations or wait for v1.2.', context: { resource_type: 'post', resource_id: args.id, suggestion: 'Use wpnav_update_post to change status to trash instead' }, }, null, 2), }], isError: true, }; }, category: ToolCategory.CONTENT, });
- src/tools.ts:282-301 (schema)Static schema definition for 'wpnav_delete_post' tool exported in tools.ts, likely used for MCP client tool discovery and validation.{ name: 'wpnav_delete_post', description: 'Delete a WordPress post by ID. Changes are logged in audit trail. WARNING: This action cannot be undone (post moves to trash by default).', inputSchema: { type: 'object' as const, properties: { id: { type: 'number' as const, description: 'WordPress post ID', }, force: { type: 'boolean' as const, description: 'Force permanent deletion (skip trash). Default: false', default: false, }, }, required: ['id'], }, },