Skip to main content
Glama

upload_media

Upload files to Strapi media library from a public URL or base64 data. Supports images, documents, and videos with alt text and caption.

Instructions

Upload a file to the Strapi media library from a URL or base64-encoded data. Supports images, documents, videos, and any file type allowed by Strapi. Provide either a public file_url or base64 content along with a descriptive file name. The uploaded file can then be linked to content entries via relation fields.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
captionNoCaption or description for the media file.
alt_textNoAlternative text for accessibility. Recommended for all images.
file_urlNoPublic URL of the file to download and upload to Strapi (e.g., 'https://example.com/image.jpg'). Either file_url or file_base64 must be provided.
file_nameNoFile name including extension (e.g., 'photo.jpg', 'document.pdf'). Used for storage and display.upload
file_base64NoBase64-encoded file content to upload. Use this when you have the file data directly rather than a URL.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior3/5

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

Annotations already indicate readOnlyHint=false and destructiveHint=false. Description adds file type support and linking behavior but omits details like overwrite policy or size limits.

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

Conciseness5/5

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

Four well-structured sentences, front-loaded with action, no redundancy, every sentence adds value.

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?

Covers input sources, file types, and linking purpose. Output schema exists so return format is handled. Adequate for a file upload tool.

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 coverage is 100% with good descriptions. Description reinforces mutual exclusivity but adds no new param meaning beyond schema.

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?

Clearly states the action (upload), resource (Strapi media library), and input methods (URL or base64). Distinguishes from siblings like delete_media and list_media.

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?

Explicitly says to provide either file_url or file_base64 with file_name. Implies mutual exclusivity. Lacks explicit 'when not to use' but adequate given siblings.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/alex2zimmermann-ux/strapi-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server