Skip to main content
Glama

Export Media

export_media

Export a Drupal media library to a CSV or Excel file on disk, one row per media item, with optional filtering by media type.

Instructions

Export the media library to a CSV or Excel file on disk.

One row per media item: id, bundle, name, status, dates, owner, and the managed file's filename and URI when there is one (found through relationships, so renamed file fields still work). media_type limits the export to a bundle such as "image". Empty sites write nothing and say so.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNo
formatNocsv
media_typeNo
output_pathNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.3.1

TDQS

B3.2/5.0
Behavior3/5

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

With no annotations the description carries the full behavioral burden. It usefully discloses the edge case that empty sites write nothing and report so, and explains that the managed file URI is resolved through relationships so renamed fields still work. It omits permissions/auth needs, what happens if output_path is omitted or the file already exists, and how limit=0 behaves.

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-loads the action and output format in the first sentence, then adds only the column list, the relationship-resolution detail, and the media_type filter. Slightly dense but every sentence carries information; nothing is padding.

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

Completeness3/5

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

An output schema exists, so return values need not be re-explained, and the row contents are described. However, the unexplained limit parameter and missing output_path/overwrite semantics leave gaps for a four-parameter export tool with zero schema coverage and no annotations.

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 0%, so the description must compensate for all four parameters. It covers media_type (bundle filter, e.g. "image"), format (CSV or Excel), and implicitly output_path ("file on disk"), but says nothing about limit, which defaults to 0 and is left entirely unexplained.

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 (Export) and resource (the media library) plus the concrete output form (CSV or Excel file on disk), and enumerates the row columns, so the agent knows exactly what is produced. It never names or contrasts a sibling, so the differentiation from export_nodes/export_users/media_bulk_import is left implicit.

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?

There is no when-to-use guidance and no alternatives are mentioned, despite many overlapping siblings such as media_bulk_import, sync_media_files and export_nodes. The only routing hint is that media_type limits the export to one bundle, which is a filter note rather than usage guidance.

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