Skip to main content
Glama

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
NameRequiredDescriptionDefault
idYesWordPress page ID
forceNoForce permanent deletion (skip trash). Default: false

Implementation Reference

  • 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, });
  • 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, };
  • 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'], },

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/littlebearapps/wp-navigator-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server