Skip to main content
Glama

Delete expired transients

wp_cleanup_transients
Destructive

Delete the expired transients: every transient whose transient_timeout row in the options table has passed is deleted through WordPress (value and timeout). Transients not yet expired and site transients (site_transient) are left alone. Returns deleted, the number of expired transients found and handed to WordPress for deletion. With a persistent object cache WordPress deletes in the cache only, so the old option rows can remain. Requires manage_options. wp_delete_transient removes one by name. Forwarded by AlphaBridge Connect to the one site this connection reaches.

Input Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already flag destructiveHint and idempotentHint=false, but the description adds real substance: exactly which rows are removed (value and timeout), that site transients are spared, that a persistent object cache can leave stale option rows behind, and the manage_options requirement. That cache caveat is behavior an agent cannot infer from any structured field.

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

Conciseness4/5

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

Front-loaded with the action and its scope, then caveats, then the sibling pointer. Every sentence carries information, though the trailing sentence about AlphaBridge forwarding is somewhat incidental and the cache caveat could be tightened.

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

Completeness5/5

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

With no output schema, the description supplies the return contract ('deleted, the number of expired transients found and handed to WordPress for deletion'), plus permissions and the cache caveat. An agent has everything needed to call this and interpret the result correctly.

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

Parameters4/5

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

The tool takes zero parameters, so there is nothing for the description to disambiguate. The baseline applies, and the description correctly describes only scope and return value rather than inventing arguments.

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?

States a specific verb and resource ('Delete the expired transients') and precisely defines the scope: only transients whose _transient_timeout_ row has passed, excluding site transients. It also distinguishes itself from the sibling wp_delete_transient by naming the single-name alternative.

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 condition for use is clear from the definition of 'expired', and it explicitly points to wp_delete_transient for the one-by-name case. It does not state exclusions like 'avoid running during peak load' or prerequisites beyond manage_options, so it falls short of a full 5.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources