Skip to main content
Glama

List media

list_media
Read-only

List WordPress media library items with filters for search, type, date, and author. Paginate results to find specific attachments or audit missing alt text.

Instructions

List items in the media library with search, type filtering, date filtering and pagination.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pageNoWhich page of results to return.
afterNoUploaded after this ISO 8601 date.
orderNoSort direction.desc
authorNoUser ID of the author.
beforeNoUploaded before this ISO 8601 date.
parentNoOnly attachments attached to this content ID.
searchNoMatch against title, caption, alt text and filename.
orderbyNoWhich field to sort by.date
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.
per_pageNoHow many results per page.
mime_typeNoFilter by exact MIME type, e.g. "image/png".
media_typeNoFilter by broad media type.
missing_alt_textNoReturn only images with empty alt text — useful for an accessibility or SEO sweep. Filters within the requested page, so walk every page (or use audit_media) for a complete list.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed9 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
    • addedInput schema / properties / author / maximum
      Added value: +9007199254740991
    • addedInput schema / properties / author / minimum
      Added value: +-9007199254740991
    • changedInput schema / properties / media_type / enum
      Previous value: -[
      -  "image",
      -  "video",
      -  "audio",
      -  "application",
      -  "text",
      -  "file"
      -]New value: +[
      +  "image",
      +  "video",
      +  "audio",
      +  "application",
      +  "text"
      +]
    • changedInput schema / properties / missing_alt_text / description
      Previous value: -"Return only images with empty alt text — useful for an accessibility or SEO sweep."New value: +"Return only images with empty alt text — useful for an accessibility or SEO sweep. Filters within the requested page, so walk every page (or use audit_media) for a complete list."
    • addedInput schema / properties / page / maximum
      Added value: +9007199254740991
    • addedInput schema / properties / parent / maximum
      Added value: +9007199254740991
    • addedInput schema / properties / parent / minimum
      Added value: +-9007199254740991
  2. First observedv1.0.0

TDQS

A3.8/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true and destructiveHint=false, covering the safety profile. The description adds the high-level filtering/pagination behavior, but does not disclose nuances such as the missing_alt_text parameter's 'filters within the requested page' caveat (though that is in the schema) or any rate limiting or result count limits. With annotations covering the main risk, the description adds modest value.

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 sentence with no redundancy. The key capabilities are front-loaded and structured logically, making it highly scannable for an agent.

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 tool's moderate complexity (13 optional params, no output schema) and that annotations cover safety (read-only, non-destructive), the description provides a sufficient high-level summary. Special parameter behaviors (like missing_alt_text's pagination caveat) are already in the schema, so nothing essential for correct invocation is missing.

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%, so all 13 parameters are documented. The description aggregates them into 'search, type filtering, date filtering and pagination', which adds an overview but no new detail over the schema. Baseline 3 is appropriate when the schema carries the explanatory weight.

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 clearly states the verb 'List', the resource 'media library', and enumerates the key capabilities (search, type filtering, date filtering, pagination). This distinguishes it from sibling tools like get_media (retrieve a single item) or create_media (write operation), even without naming them.

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 implies a list operation with filtering options, but provides no explicit guidance on when to choose this over alternatives (e.g., get_media for a single item, audit_media for a completeness sweep) or any exclusions. For a straightforward list tool this is adequate but not explicit.

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