Skip to main content
Glama
zhuylanz

@lapage/strapi-mcp

by zhuylanz

strapi_upload_media_from_file

Upload a local file path to Strapi Media Library, optionally linking it to a content entry and field.

Instructions

Create a Strapi Media Library item by uploading a local file path from this machine.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
refNoOptional related content type UID, for example api::article.article.
fieldNoOptional relation field when attaching media to an entry.
refIdNoOptional related entry id/document id depending on Strapi version.
filePathYesAbsolute or working-directory-relative file path readable by the MCP server process.
filenameNoFilename to use in Strapi. Defaults to the local basename.
mimeTypeNo
Behavior3/5

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

With no annotations, the description carries the burden of disclosure. It states the primary side effect (creating a media item via upload) and the key behavior of reading a local file from the machine. However, it does not mention permissions, failure modes, or the optional ability to attach media to an entry via ref/field/refId, leaving some transparency gaps.

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?

A single sentence, front-loaded with the verb 'Create,' and includes the crucial distinction 'local file path from this machine.' There is no filler or redundancy; every word contributes meaning.

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?

For a tool with six parameters and no output schema, the description gives the essential purpose but lacks guidance on when to use optional relation parameters (ref, field, refId) or how the upload interacts with Strapi entries. It is sufficient for basic understanding but leaves room for more comprehensive autonomous use.

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 83%, with all parameters except mimeType described in the schema. The description reinforces filePath's meaning ('local file path from this machine') but does not explain relationships among ref, field, refId, or filename defaulting. Since the schema does most of the parameter documentation, a baseline score of 3 is appropriate.

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?

The description clearly states the action (Create), the resource (Strapi Media Library item), and the specific method (uploading a local file path from this machine). This distinguishes it from the sibling tool strapi_upload_media_from_url, which uploads from a URL.

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?

The description implies when to use this tool (when a local file path is available) by mentioning 'local file path from this machine,' which contrasts with URL-based uploads. However, it does not explicitly name alternative tools or list exclusions, leaving the agent to infer from sibling tool names.

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/zhuylanz/lapage-strapi-mcp'

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