Skip to main content
Glama

Audit the media library

audit_media
Read-only

Scan the WordPress media library for images missing alt text and unused attachments, enabling accessibility fixes and reclaiming storage.

Instructions

Audit the media library for images missing alt text and for attachments not referenced by any content. Alt text is the highest-value accessibility fix on most sites, and unused media is where disk usage quietly accumulates.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoHow many attachments to examine.
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.
check_unusedNoAlso check which attachments no content references. Slower — it scans content bodies.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv2.0.0
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • removedInput schema / additionalProperties
      Removed value: -false
  2. First observedv1.0.0

TDQS

A4/5.0
Behavior4/5

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

The description discloses the specific behavior: checking for missing alt text and unreferenced attachments, consistent with readOnlyHint=true and destructiveHint=false. It adds detail beyond the annotations by naming the exact findings, though it does not describe the result format or potential performance impact beyond the schema note on check_unused.

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?

Two sentences with no waste: the first states the action and scope, the second gives the rationale. The core behavior is front-loaded and every sentence earns its place.

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?

Given the read-only annotations and fully described parameters, the tool is callable as-is. The main gaps are the lack of an output description and no explicit routing against check_accessibility, but these are not blocking for a simple read-only audit.

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%, and every parameter already has a meaningful description including defaults and trade-offs (e.g., check_unused is slower). The main description adds no parameter semantics, so the baseline 3 applies.

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 verb and resource ('Audit the media library') and enumerates two concrete checks: images missing alt text and attachments not referenced by any content. This clearly separates it from retrieval siblings like list_media and get_media by its analytic intent.

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

Usage Guidelines3/5

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

The description provides practical rationale for running the audit (accessibility value and disk usage), but it never names alternatives or states when not to use it. The agent must infer that list_media is for retrieval and that check_accessibility may overlap on the alt-text dimension.

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