Skip to main content
Glama

Honeyfield Marketing MCP

Strapi: Upload media

strapi_upload_media
Destructive

Datei in die Strapi-Medienbibliothek hochladen — per source_url (Server lädt sie, max. 25 MB) ODER file_base64 (nur für kleine Dateien, deren Bytes der Agent selbst erzeugt oder besitzt). Genau eines angeben. Chat-Anhänge und lokale Dateien des Kunden erreichen den Server nicht — dafür strapi_generate_upload_link verwenden. filename (mit Endung) und mime_type bei file_base64 angeben, sonst landet die Datei als 'upload' mit application/octet-stream in der Mediathek; bei source_url werden beide aus URL und Antwort abgeleitet. Liefert {success, uploaded: [{id, name, url, mime, size_kb}]}. Für Media-Felder (z. B. cover) reicht die id. Bild-Nodes in Blocks-Rich-Text brauchen das komplette File-Objekt (width, height, formats, hash, ext, documentId …) — full=True liefert es direkt in uploaded (alternativ später strapi_list_media(ids=[...], full=True)). Optional ref/ref_id/field, um die Datei direkt an ein Eintragsfeld zu hängen: ref = Content-Type-UID des Eintrags (Feld uid aus strapi_list_content_types — keine UID raten), ref_id = NUMERISCHE id des Eintrags (nicht die documentId), field z. B. 'cover'. Schlägt das Verknüpfen fehl (HTTP 500), liegt die Datei trotzdem in der Mediathek — nicht erneut hochladen. Sicherer Weg: ohne ref hochladen und die Media-ID per strapi_update_entry ins Feld schreiben (bleibt Draft-first). file_base64 hoechstens 25 MB (sonst {'error': 'too_large'}) — groessere Dateien per source_url oder Upload-Link. alternative_text / caption: Alt-Text und Bildunterschrift direkt beim Upload. Bilder, die im Frontend erscheinen, brauchen einen Alt-Text (Barrierefreiheit, Bild-SEO) — sonst nachträglich mit strapi_update_media setzen. source_url muss binnen 90 s vollständig geladen sein, sonst {"error": "download_timeout"}; {"error": "source_unreachable"}: Adresse nicht abrufbar. In beiden Fällen wurde in Strapi nichts angelegt. Antwortet Strapi nicht ({"error": "strapi_timeout"} bzw. "strapi_unreachable"), ist offen, ob die Änderung angekommen ist: erst nachsehen, nicht blind wiederholen. workspace: Slug des Kunden-Workspace (optional bei nur einem Workspace).

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

Input Schema

NameRequiredDescriptionDefault
refNo
fullNo
fieldNo
ref_idNo
captionNo
filenameNo
mime_typeNo
workspaceNo
source_urlNo
file_base64No
alternative_textNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.9/5.0
Behavior5/5

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

Goes well beyond the annotations (readOnlyHint=false, destructiveHint=true, openWorldHint=true): 25 MB caps, concrete error payloads (too_large, download_timeout, source_unreachable, strapi_timeout, strapi_unreachable), the 90-second download window, and the crucial side-effect detail that a failed ref-linking (HTTP 500) still leaves the file in the media library. It also explains the ambiguity after a Strapi timeout — check before repeating — which is exactly the kind of state information annotations cannot carry.

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?

Content is front-loaded and nearly every sentence carries operational detail, but the block is long and dense with no bullet or line-break structure, making it harder to scan under time pressure. Minor trims are possible (the return-shape line partly duplicates the output schema), so it stops just short of ideal.

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?

For an 11-parameter, zero-coverage, mutation-style tool this covers modes, size limits, metadata requirements, linking semantics and all known failure modes. An output schema exists, yet the brief note about {success, uploaded:[...]} and when full=True is needed adds genuine selection value rather than pure duplication.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0% with 11 parameters, so the description carries the full burden and does: ref = content-type UID (not to be guessed, from strapi_list_content_types), ref_id = numeric id not documentId, field = e.g. 'cover', full = returns the complete file object needed for block rich-text image nodes, filename/mime_type required with file_base64 else the file lands as 'upload' with application/octet-stream, and workspace = customer slug. Every parameter gets meaning the bare schema lacks.

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?

Opens with a specific verb and resource ("Datei in die Strapi-Medienbibliothek hochladen") and immediately names the two mutually exclusive input modes (source_url vs. file_base64). It also names the siblings it is not (strapi_generate_upload_link for chat attachments/local files, strapi_update_media for later alt-text fixes), so an agent can distinguish it without opening a schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly states when this tool cannot be used (chat attachments and local client files never reach the server → use strapi_generate_upload_link) and gives a decision rule between source_url and file_base64 based on size and file provenance. It also prescribes the safer alternative flow (upload without ref, then write the media ID via strapi_update_entry) and warns against blind retries on timeouts.

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