Skip to main content
Glama

upload_asset

Add PNG, JPEG, GIF, WEBP, or PDF files (max 5 MB) to the Paperboy CMS media library from a public URL or base64 bytes, then use the returned asset in image fields.

Instructions

Add a file (PNG, JPEG, GIF, WEBP or PDF, max 5 MB) to the media library from a public URL or from base64 bytes, and return the asset — set its documentId on an image field with set_field. For files on YOUR machine prefer create_upload_link: base64 through a tool call costs roughly 1 token per 2-3 bytes.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
altNoAlt text
urlNoPublic http(s) URL of the file itself (not a web page showing it)
siteNoSite slug or id to act in (multisite). Omit to use this server's default site. Call list_sites to see what exists — an empty tree or search usually means the wrong site, not missing content.
filenameNoDisplay name in the media library, e.g. 'hero.jpg'
dataBase64NoThe file's bytes, base64-encoded (a data: URL prefix is accepted)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already declare the safety profile (readOnlyHint=false, destructiveHint=false, openWorldHint=true, idempotentHint=false), so the bar is lower; the description still adds real context beyond them — file type allowlist, 5 MB size limit, the ~1 token per 2-3 bytes cost of base64 transport, and the fact that an asset record is created and returned. It does not cover duplicate-filename behavior, permissions/authentication needs, or idempotency semantics.

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 core action and constraints, then the set_field follow-up, then the competing-tool advice. No filler, and the parenthetical size and token figures are compact rather than verbose.

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?

For a create-style tool with no output schema, the description supplies the critical facts an agent needs: accepted formats, size ceiling, the two input modes, the cost tradeoff, and how to consume the returned asset. It stops short of describing error behavior (e.g. an oversized or unreachable URL) or what happens on filename collision.

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 adds value by framing `url` and `dataBase64` as the two mutually-alternative ingestion modes and explaining the token cost tradeoff that should drive the choice between them; it says nothing extra about `alt`, `filename`, or `site` beyond the 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?

States a precise verb+resource (add a file to the media library), enumerates supported formats (PNG, JPEG, GIF, WEBP, PDF) and the 5 MB cap, names both supported sources (public URL or base64), and describes the return value. It also distinguishes itself from the close sibling create_upload_link by naming it explicitly for the local-file case.

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 routing: use this tool for remote URLs or base64 bytes, prefer create_upload_link when the file lives on the caller's machine, then use set_field with the returned documentId to bind the asset. The when/when-not conditions and the downstream follow-up step are all spelled out.

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