Skip to main content
Glama

wp_delete_application_password

Revoke an existing WordPress application password by specifying the user ID and password UUID to remove API access securely.

Instructions

Revokes an existing application password.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
siteNoThe ID of the WordPress site to target (from mcp-wordpress.config.json). Required if multiple sites are configured.
user_idYesThe ID of the user who owns the password.
uuidYesThe UUID of the application password to revoke.

Implementation Reference

  • MCP tool handler: extracts user_id and uuid parameters, calls WordPressClient.deleteApplicationPassword(), returns success message or throws formatted error.
    public async handleDeleteApplicationPassword( client: WordPressClient, params: Record<string, unknown>, ): Promise<unknown> { try { const { user_id, uuid } = params as { user_id: number; uuid: string }; await client.deleteApplicationPassword(user_id, uuid); return `✅ Application password with UUID ${uuid} has been revoked.`; } catch (_error) { throw new Error(`Failed to delete application password: ${getErrorMessage(_error)}`); } }
  • Tool registration entry in SiteTools.getTools(): specifies name, description, input schema (parameters), and binds the handler function.
    { name: "wp_delete_application_password", description: "Revokes an existing application password.", parameters: [ { name: "user_id", type: "number", required: true, description: "The ID of the user who owns the password.", }, { name: "uuid", type: "string", required: true, description: "The UUID of the application password to revoke.", }, ], handler: this.handleDeleteApplicationPassword.bind(this), },
  • Low-level API implementation in SiteOperations: constructs WP REST API DELETE endpoint and executes the request via the HTTP client.
    async deleteApplicationPassword(userId: number | "me", uuid: string): Promise<{ deleted: boolean }> { return this.client.delete(`users/${userId}/application-passwords/${uuid}`); }

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/docdyhr/mcp-wordpress'

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