Skip to main content
Glama
Antonytm

mcp-sitecore-server

by Antonytm

media-upload

Destructive

Upload a file into the Sitecore media library from a URL, local path, or base64 content; returns the created media item's ID, path, size, and MIME type.

Instructions

Uploads a file into the Sitecore media library via the SPE mediaUpload service and returns the created media item (ID, path, size, mime type). Overwrites an existing item at the destination unless skipExisting is set. Source is exactly one of sourceUrl (fetched by this server — use this to import from a live site), filePath (local to the machine running this MCP server), or content (base64). Requires in the CM's SPE services config.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
altNoAlt text to set on the media item after upload.
contentNoThe file bytes as base64. Suits small files only — prefer sourceUrl or filePath for anything sizable. Supply this, sourceUrl or filePath.
databaseNoThe database holding the media library. Defaults to master.master
filePathNoPath to a file on the machine running this MCP server. Refused over the HTTP transport unless MEDIA_LOCAL_FILE_ROOT names a directory to confine it to. Supply this, sourceUrl or content.
sourceUrlNohttp(s) URL to fetch the bytes from (e.g. an image on the site being migrated). Supply this, filePath or content.
skipUnpackNoWhen true, store an uploaded .zip as a single media item instead of unpacking it.
destinationYesMedia library path for the item, including the file name with extension (e.g. 'Project/Stride/Corporate/Migrated/team-photo.jpg' — the '/sitecore/media library/' prefix is optional), or the GUID of an existing media item to overwrite. The item is named after the file name up to its FIRST dot, with characters Sitecore will not accept in a name removed, so 'v1.2 asset.jpg' becomes an item called 'v1' — avoid dots in the name itself. The response reports the name the item actually got.
skipExistingNoWhen true, leave an existing item at the destination untouched instead of overwriting it.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.0.5

TDQS

A4.2/5.0
Behavior5/5

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

Adds real behavioral context beyond the annotations: overwrite-by-default with an explicit opt-out, the mutually exclusive source modes, the fact that filePath is refused over HTTP unless MEDIA_LOCAL_FILE_ROOT confines it, and the fields returned (ID, path, size, mime type) despite no output schema. This is exactly what a destructive upload tool needs to disclose.

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?

Three sentences, front-loaded with the action and return value, then the overwrite risk, then the source modes and prerequisite. No filler; every clause carries information an agent needs before invoking.

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 a write tool with no output schema, the description covers what it does, what it returns, what it overwrites, the source options, and the server-side prerequisite. Annotations already carry the destructive/open-world profile, so nothing essential is missing before calling it.

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 3 is the baseline, but the description adds cross-parameter framing the schema only states piecemeal: 'Source is exactly one of sourceUrl, filePath, or content', plus scenario guidance that sourceUrl is for importing from a live site. It reinforces rather than extends the destination naming semantics, which live entirely in 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?

States a specific verb and resource ('Uploads a file into the Sitecore media library') plus the mechanism ('via the SPE mediaUpload service') and the return shape. An agent immediately knows what happens. It stops short of 5 because a near-identical sibling, authoring-upload-media, exists and is never named or differentiated.

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

Usage Guidelines3/5

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

Gives actionable context — the SPE config prerequisite ('Requires <mediaUpload enabled="true">') and a scenario hint ('use this to import from a live site') — but never says when to choose this tool over authoring-upload-media or how it relates to media-download. Usage is implied rather than routed.

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