Skip to main content
Glama

Optimize database tables

wp_db_optimize
Destructive

Run OPTIMIZE TABLE on every database table whose name starts with this site's table prefix, to reclaim unused space and defragment. Returns optimized (the count) and tables (the names). On large tables it can take a while and, depending on the storage engine, lock them meanwhile; there is no dry run. Requires manage_options. 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.7/5.0
Behavior5/5

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

Goes well past the annotations: it discloses table-locking risk during execution, that the call may be slow on large tables, that no dry run exists, that manage_options is required, and that the operation is scoped to a single site via AlphaBridge Connect. These are exactly the operational risks an agent needs before invoking a destructiveHint tool.

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?

Front-loaded with the action and scope, then the return shape, then risk and prerequisites — a sensible ordering for an agent deciding whether to call. No filler sentences; every clause carries new information.

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 shape (optimized count, tables list) and covers permissions, locking, duration and lack of dry run. Nothing material is missing for a parameterless destructive maintenance operation.

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?

Zero parameters, so the baseline is 4; there is nothing for the description to disambiguate. The mention of the site's table prefix clarifies the implicit scope of an argument-less call.

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?

Names the exact operation (OPTIMIZE TABLE), the exact target set (every table beginning with this site's prefix), and the outcome (reclaim unused space, defragment). This is clearly distinguishable from siblings like wp_db_tables (listing) or wp_db_schema (structure inspection).

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?

It states the goal that motivates a call ('to reclaim unused space and defragment') and tells the agent there is no dry run, which is decisive for a destructive tool. It does not, however, name alternatives (e.g., wp_db_tables to preview sizes) or a when-not-to-use condition.

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