Skip to main content
Glama

findMedia

Content images, videos and documents (stock + uploads). MCP can READ + UPDATE metadata (alt-text, copyright, aiOrigin = "generated"/"edited" for AI images — set it for every image from an AI generator; it is written into all image sizes and shown in the credits; aiNotice = true additionally shows the EU "AI" icon on the image or video wherever it appears: use it for AI images/videos that look like real recordings of something real or plausible, not for drawings or stylised illustrations; never set by the system — when unsure, leave it out and tell the user) + DELETE (⚠ PERMANENT — the admin Trash does NOT catch MCP deletes); binaries come via the addMediaFromUrl tool, not raw upload (admin-only). Use id when referencing in upload-fields. VIDEOS: subtitles (per locale) = the id of a WebVTT (.vtt, text/vtt) media item — import the .vtt via addMediaFromUrl (url or upload: true), then updateMedia the video with "locale"; every block showing the video renders the captions in the page language. media collection. Drafts: no. Public read: yes via /api/agents. MCP capabilities: find, update, delete. ⚠ delete is PERMANENT (hard-delete; the admin Trash does NOT catch MCP deletes). Write ONE document at a time: wait for the response of each create/update/delete call before sending the next — parallel writes can fail with a database deadlock (HTTP 500, nothing saved; retry that call alone). Before writing public text here, call getWritingGuidelines with this collection and the locale (brand voice, writing rules, fixed terms, SEO rules, taken keywords, field rules). Fields: alt (localized, required), title (localized), caption (localized), description (textarea, localized), aiAutofillStatus (enum: pending|done|error (AI generation error)|skipped, redacted), poster (rel: media), subtitles (rel: media, localized), copyrightHolder, copyrightLicense (enum: all-rights-reserved|own-work|stock-licensed (Licensed (stock))|cc0 (CC0 (Public Domain))|cc-by|cc-by-sa|+2), copyrightUrl, aiOrigin (enum: generated (Created with AI)|edited (Edited with AI)), aiNotice (boolean).

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": "findMedia"
  }
}

Input Schema

NameRequiredDescriptionDefault
idNoOptional: specific document ID to retrieve. If not provided, returns all documents
pageNoPage number for pagination (default: 1)
sortNoField to sort by (e.g., "createdAt", "-updatedAt" for descending)
depthNoHow many levels deep to populate relationships (default: 0)
draftNoOptional: Whether the document should be queried from the versions table/collection or not.
joinsNoOptional: configure join field queries, or pass false to disable all join fields.
limitNoMaximum number of documents to return (default: 10, max: 100)
trashNoOptional: include soft-deleted documents when trash is enabled on the collection
whereNoOptional JSON string for where clause filtering (e.g., '{"title": {"contains": "test"}}')
localeNoOptional: locale code to retrieve data in (e.g., "en", "es"). Use "all" to retrieve all locales for localized fields
selectNoOptional: define exactly which fields you'd like to return in the response, e.g., {"title": true}
populateNoOptional: control which fields to include from populated relationship or upload documents.
paginationNoOptional: set to false to skip the count query overhead
fallbackLocaleNoOptional: fallback locale code to use when requested locale is not available

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed7 schema fields changed
    • addedInput schema / properties / joins
      Added value: +{
      +  "anyOf": [
      +    {
      +      "additionalProperties": {},
      +      "type": "object"
      +    },
      +    {
      +      "const": false,
      +      "type": "boolean"
      +    }
      +  ],
      +  "description": "Optional: configure join field queries, or pass false to disable all join fields."
      +}
    • addedInput schema / properties / pagination
      Added value: +{
      +  "description": "Optional: set to false to skip the count query overhead",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / populate
      Added value: +{
      +  "additionalProperties": {},
      +  "description": "Optional: control which fields to include from populated relationship or upload documents.",
      +  "type": "object"
      +}
    • addedInput schema / properties / select / additionalProperties
      Added value: +{}
    • changedInput schema / properties / select / description
      Previous value: -"Optional: define exactly which fields you'd like to return in the response (JSON), e.g., '{\"title\": true}'"New value: +"Optional: define exactly which fields you'd like to return in the response, e.g., {\"title\": true}"
    • changedInput schema / properties / select / type
      Previous value: -"string"New value: +"object"
    • addedInput schema / properties / trash
      Added value: +{
      +  "description": "Optional: include soft-deleted documents when trash is enabled on the collection",
      +  "type": "boolean"
      +}
  2. First observed

TDQS

A4.1/5.0
Behavior5/5

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

With no annotations supplied, the description carries the full burden and does so: it discloses that deletes are hard/permanent and bypass the admin Trash, that raw binary upload is not supported and must go through addMediaFromUrl, that writes must be serialized because parallel calls can deadlock with a 500 and nothing saved, that public read exists via /api/agents, and that `aiOrigin` propagates to all image sizes and into credits while `aiNotice` is never set by the system. These are exactly the non-obvious traits an agent cannot get from schema or annotations.

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

Conciseness3/5

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

The opening resource statement is front-loaded correctly, but the body is a single dense run-on with heavily nested parentheticals that make it hard to scan. There is real duplication: the warning that MCP deletes are permanent and bypass the admin Trash is stated twice in near-identical wording, which wastes space in an already crowded definition.

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?

For a 14-parameter, no-annotation, no-output-schema tool, the description covers the risky half (update/delete) thoroughly, including the deadlock retry rule, permissions on raw upload, and per-field write rules. The gap is the read half: nothing explains what a find returns or how the media results are shaped, though the rich schema and the fully documented field set partially offset that.

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 is 3, and the description clears that bar by adding the collection's field inventory (alt, title, caption, description, poster, subtitles, copyright fields, aiAutofillStatus, aiOrigin, aiNotice) which is genuinely useful for constructing `select`/`where`/`sort` values, plus the note that `id` is the reference key for upload fields and `locale` drives per-locale subtitles and caption rendering. It still leaves the tuning parameters (depth, joins, trash, draft, pagination) entirely to the schema.

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?

The description names the resource precisely ("Content images, videos and documents (stock + uploads)") and enumerates the operations that this single tool exposes ("MCP capabilities: find, update, delete"), which is enough to separate it from the find* siblings for pages, posts, tags and so on. It loses a point because the tool is named findMedia yet most of the text describes update/delete semantics, and the actual retrieval behavior of "find" is never characterized.

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?

There is concrete when-to guidance for the write path: set `aiOrigin` for every AI-generated image, use `aiNotice` only for AI media that looks like a real recording and leave it out when unsure, import .vtt via addMediaFromUrl before wiring `subtitles`, use `id` when referencing in upload fields, and call getWritingGuidelines before writing public text. What is missing is any guidance on the find path itself — no advice on when to query by `where` versus fetching a single `id`, or when to use this tool versus another media lookup.

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