Skip to main content
Glama

Inspect the database

inspect_database
Read-onlyIdempotent

Inspect your WordPress database for health issues: identify table sizes, engines, collations, orphaned rows, revisions, and non-utf8mb4 tables. Find potential orphan tables and cleanup opportunities to optimize performance.

Instructions

A developer's view of the WordPress database: every table with engine, collation, approximate rows, data and index bytes and reclaimable overhead; which plugin each non-core table belongs to, with tables whose owner is inactive, not installed or unknown listed as possible orphans; orphaned rows (postmeta, commentmeta and usermeta without a parent, term relationships pointing nowhere); revisions per post type, auto-drafts, trashed posts and spam/trash comments; and tables not on utf8mb4. Counts are capped so a huge table cannot stall the query. Works on MySQL/MariaDB and on the SQLite integration (sizes are then unavailable and noted). Read-only. Needs the companion plugin.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
site_idNoWhich configured WordPress site to act on. Optional — with a single site configured it is used automatically; with several, the default site is used unless you name one. Run list_sites for valid ids.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv2.0.0

TDQS

A4.5/5.0
Behavior5/5

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

Beyond the annotations, the description discloses valuable behavior: counts are capped to avoid stalls, SQLite support has unavailable sizes, the operation is read-only, and the companion plugin is required. These details help the agent anticipate limitations and prerequisites without contradicting the annotations.

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 dense but every clause adds a distinct, useful fact: output categories, cap behavior, engine compatibility, SQLite caveat, read-only nature, and plugin requirement. It is front-loaded with the main purpose and contains no filler.

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?

Given no output schema, the description thoroughly describes what will be reported, including edge cases such as orphaned rows, inactive plugin owners, and non-utf8mb4 tables. Prerequisites, platform caveats, and safety are all covered, making the tool safe and clear to invoke.

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?

The only parameter, site_id, is fully documented in the schema with 100% coverage. The description adds no additional parameter-specific details, so it adequately relies on the schema to explain selection behavior and defaults.

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 names a specific resource ('the WordPress database') and a clear purpose: a developer-oriented inspection view. It enumerates concrete outputs (tables, engine, collation, rows, plugin ownership, orphans, revisions, trash, utf8mb4 status), which separates it from sibling inspection tools like inspect_options or inspect_registry.

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 this tool: when a comprehensive, read-only database overview is needed. It includes important usage constraints like the count cap and SQLite limitations, though it does not explicitly name alternative tools for narrower database work.

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