Skip to main content
Glama

wp_cleanup

Run database cleanup on a WordPress site: remove orphaned meta, old revisions, auto-drafts, expired transients, and close pingbacks to improve performance.

Instructions

Run database cleanup on a WordPress site. Removes orphaned postmeta/termmeta, old revisions, auto-drafts, expired transients, old action scheduler entries, and closes pingbacks.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
site_idYesWP Engine environment name (e.g., 'reynoldstransf')
delete_revisionsNoWhether to delete post revisions (default: true)
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden. It explicitly lists destructive actions (removes orphaned postmeta, revisions, auto-drafts, etc.) and even includes 'closes pingbacks'. This is substantive disclosure, though it stops short of stating irreversibility or backup requirements.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, information-dense sentence. It front-loads the purpose and follows with a concise list of actions, with no unnecessary words.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description covers the main behavior thoroughly for a 2-parameter tool with no output schema. It lacks details like thresholds for 'old' or output expectations, but given the scope, it is sufficiently complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so both parameters are already well-documented. The description does not add extra parameter-level meaning, but the baseline is 3, which is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool runs database cleanup on a WordPress site and enumerates specific items removed (orphaned postmeta/termmeta, revisions, auto-drafts, etc.). This differentiates it from sibling tools like wp_clear_cache or wp_seo_check.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides clear context for when to use the tool ('Run database cleanup'), implying it is for database maintenance issues. However, it does not explicitly mention alternatives or when not to use it, though sibling tool names are visible.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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/markahope-aag/wp-audit-mcp'

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