Skip to main content
Glama

Fabrement

Upload media

fabrement-upload-media

Upload one file into the media library from EXACTLY ONE source — sourceUrl (preferred), filePath (on the WordPress machine) or base64 (≤512 KB) — and get {id, url, …} for a block's media attribute. altText is REQUIRED for images. list-media first: it may already exist. Rules: get-skill-doc {id:"site-assets-contract"} — read it before the first call.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
titleNoOptional media library title.
base64NoFile bytes as base64 (a "data:…;base64," prefix is accepted and stripped). Requires filename. Max 512 KB decoded. Last resort — prefer sourceUrl.
altTextNoREQUIRED for images: what the image shows, for screen readers and SEO. Ignored for non-images.
filePathNoAbsolute path to a file on the WordPress host. One source only.
filenameNoFilename to store it under, e.g. "hero-bg.webp". Defaults to the source filename; REQUIRED with base64 (it carries the extension).
sourceUrlNoRemote http(s) URL to download into the library. One source only.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesWith `url`, the {id, url} pair an image attribute stores; alone, the siteIcon update-site-settings takes.
urlYes
widthNoNull for documents, AV and usually SVG.
heightNo
altTextYes
filenameYesAfter sanitising and de-duplicating — need not match what was sent.
mimeTypeYesDetected from the real bytes, not the filename.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.7/5.0
Behavior4/5

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

With no annotations, the description carries the behavioral burden and does well: source mutual-exclusivity, the 512 KB decoded limit, altText required for images, and the {id, url} return for block media attributes. It stops short of covering auth/permission needs or duplicate/error handling, so it is not fully exhaustive.

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?

The action is front-loaded, then constraints and prerequisites follow. Capitalized emphasis is used sparingly and makes the scoping rules scannable; no sentence is filler.

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?

An output schema exists, so return values need not be spelled out, and the description complements it by naming the source options, the required altText, and the prerequisite contract doc. Nothing an agent needs to invoke this correctly is missing.

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; the description earns above that by adding the preference ordering among sources and the mutual-exclusivity rule, which the schema states per-field but never as a relationship. It adds real selection semantics beyond the field docs.

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?

States a specific verb+resource ('Upload one file into the media library') and immediately scopes the operation (single file, one of three named sources). An agent can tell it apart from fabrement-list-media and fabrement-delete-media without opening any 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?

Explicit guidance at every decision point: choose exactly one source, sourceUrl is preferred, list-media first to avoid duplicates, and read the site-assets-contract skill doc before the first call. This is when-to-use plus prerequisites and alternatives.

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