Skip to main content
Glama

List media

wp_list_media
Read-onlyIdempotent

List files in the media library (attachments), newest first, or by relevance when search is given. Returns items: [{id, title, mime, url, date}] and pagination {total, total_pages}. Only files with the usual status "inherit" are listed, so files set to private are not, and only those the account may read. No match gives an empty list. Needs upload_files. Read-only; wp_get_media returns one file with its sizes, alt text and caption. Forwarded by AlphaBridge Connect to the one site this connection reaches.

Input Schema

NameRequiredDescriptionDefault
mimeNoMIME type or its main part, e.g. "image", "image/png" or "application/pdf". Default: all types.
pageNoPage number, starting at 1. Default 1.
searchNoSearch text, matched against title, caption and description.
per_pageNoFiles per page, 1–100; other values are clamped. Default 20.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed6 schema fields changed
    • changedInput schema / properties / mime / description
      Previous value: -"e.g. image, image/png, application/pdf."New value: +"MIME type or its main part, e.g. \"image\", \"image/png\" or \"application/pdf\". Default: all types."
    • addedInput schema / properties / page / default
      Added value: +1
    • addedInput schema / properties / page / description
      Added value: +"Page number, starting at 1. Default 1."
    • addedInput schema / properties / per_page / default
      Added value: +20
    • changedInput schema / properties / per_page / description
      Previous value: -"Max 100. Default 20."New value: +"Files per page, 1–100; other values are clamped. Default 20."
    • addedInput schema / properties / search / description
      Added value: +"Search text, matched against title, caption and description."
  2. First observed

TDQS

A4.3/5.0
Behavior5/5

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

Annotations already declare readOnly/idempotent/non-destructive, yet the description still adds genuinely new facts: default ordering, relevance re-ordering when search is supplied, the 'inherit' status filter that excludes private files, per-account read scoping, empty-list-on-no-match, and the required upload_files capability. That is real behavioral disclosure beyond the structured fields.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with purpose and ordering, then return shape, then constraints — a sensible order for a scanning agent. It is dense but every clause carries information, though the trailing AlphaBridge Connect forwarding note is boilerplate and one sentence stacks several unrelated constraints (status filter, permissions, empty result) into a single run-on.

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?

There is no output schema, and the description compensates by naming the returned item fields ({id, title, mime, url, date}) and pagination {total, total_pages}, plus empty-result behavior. Combined with the permission and filtering caveats, an agent has everything needed to call and interpret this tool.

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?

Schema coverage is 100%, so the baseline would be 3, but the description adds semantics the schema does not carry — that supplying `search` switches result ordering from newest-first to relevance. That is a meaningful behavioral consequence of a parameter choice rather than a restatement.

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 resource — 'List files in the media library (attachments)' — plus ordering behavior (newest first, relevance on search) and return shape. It explicitly separates itself from wp_get_media, but leaves the boundary with the sibling wp_list_uploads (and wp_list_media vs file-on-disk listings) unaddressed, which is the one ambiguity an agent could stumble on.

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?

Names the alternative explicitly: 'wp_get_media returns one file with its sizes, alt text and caption,' which is a clear routing rule for single-file lookups. It also states the prerequisite capability (upload_files). It stops short of explicit when-not conditions, e.g. when a caller should reach for wp_list_uploads or wp_search instead.

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