Skip to main content
Glama

list_media

Retrieve and filter WordPress media library attachments by media type, MIME type, title, pagination, and sort order to locate files for content workflows.

Instructions

List media attachments in the WordPress media library with optional filtering

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "list_media"
  }
}

Input Schema

NameRequiredDescriptionDefault
pageNoPage number (default: 1)
orderNoSort order
searchNoSearch media by title
orderbyNoOrder by field
per_pageNoNumber of items per page (default: 10, max: 100)
mime_typeNoFilter by MIME type (e.g., 'image/jpeg')
media_typeNoFilter by media type

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

B3.1/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. 'List' implies a read-only, non-destructive operation, which is helpful, but the definition says nothing about return shape, pagination behavior, or permission requirements. The pagination parameters in the schema hint at paged results, but the description does not confirm or explain them.

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?

A single front-loaded sentence with no filler. It is efficient, though its brevity leaves real gaps rather than being tightly informative.

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

Completeness2/5

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

Seven optional parameters, three enums, defaults buried in the schema, no output schema, and no annotations. For a list endpoint of that complexity, the description should at least cover pagination and result-shape expectations; one sentence does not do enough.

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%, with per-parameter descriptions for page, order, search, orderby, per_page, mime_type, and media_type plus enums for three of them. The description adds only the generic notion of 'optional filtering' and no syntax or semantics beyond what the schema already conveys, so baseline 3 applies.

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 media attachments in the WordPress media library', plus the qualifier 'with optional filtering'. That is clear enough to distinguish it from get_media, delete_media, and upload_media by name alone, though the description never explicitly names those siblings as alternatives.

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?

The only usage signal is 'with optional filtering', which implies you can browse or narrow the list. There is no guidance on when to use this versus get_media for a single item, versus search_site, and no statement about prerequisites or expected volume.

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