Skip to main content
Glama

mcp_optimize_tables

Optimizes every WordPress database table matching the selected site's table prefix by running OPTIMIZE TABLE, helping reclaim space and maintain database performance.

Instructions

Run OPTIMIZE TABLE on every table with the site's table prefix

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "site": "<site>"
    },
    "name": "mcp_optimize_tables"
  }
}

Input Schema

NameRequiredDescriptionDefault
siteYesSite id (see list_sites)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv3.4.0
    • addedInput schema / additionalProperties
      Added value: +false
    • addedInput schema / properties / site
      Added value: +{
      +  "description": "Site id (see list_sites)",
      +  "type": "string"
      +}
    • addedInput schema / required
      Added value: +[
      +  "site"
      +]
  2. First observedv2.0.0

TDQS

B3.3/5.0
Behavior3/5

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

No annotations are supplied, so the description carries the full burden. It does disclose the most important behavioral fact — the operation is bulk and covers all prefixed tables, not a single table — which implies broad impact. However, it says nothing about locking, duration, permissions, or what happens to tables mid-optimization, which are exactly the traits an agent needs before invoking a maintenance mutation.

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?

A single front-loaded sentence with the verb and the scope in immediate succession; every word earns its place and there is no boilerplate.

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

Completeness3/5

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

For a bulk maintenance mutation with no annotations and no output schema, the definition covers what it does and on what scope, but leaves the agent without safety, cost, or result information. It is minimally adequate rather than 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?

Only one parameter, and the schema already documents it at 100% coverage with a pointer to list_sites for discovery. The description adds marginal meaning by tying the site id to a table-prefix scoping concept, but contributes no format or validation detail beyond the schema.

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

Purpose4/5

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

States a specific verb and mechanism (OPTIMIZE TABLE) plus the exact scope (every table carrying the site's table prefix), so an agent can tell this apart from read-oriented siblings like mcp_get_tables or media_optimize_attachment. It stops short of naming an alternative, but the resource and scope are unambiguous.

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

Usage Guidelines2/5

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

There is no when-to-use or when-not-to-use guidance, no prerequisites, and no hint about cost or frequency. The phrase 'every table' implies a bulk maintenance action, but the agent must infer that this is a periodic housekeeping operation rather than something to run casually.

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

Deploy Server

Other Tools