Skip to main content
Glama

Upload a file to the library

upload_media

On one site of the account, named in site. Put a picture into the library before a post shows it. Give the picture's own public address, or base64 with a filename and content type. A web page address gives the page's own picture (og:image), when it has one. Pictures, films, sound and PDF; up to 64 MB. For a file that you hold — one the person gave you, or one you made — use request_upload. Answers the library address and the Markdown to paste (alt), for create_post, replace_post and edit_post, a cover (set_feature_image) or a block.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "site": "<site>"
    },
    "name": "upload_media"
  }
}

Input Schema

NameRequiredDescriptionDefault
altNoWhat the picture shows, for the Markdown in the answer
urlNoThe picture's own public http(s) address
siteYesThe site to work on, as list_sites names it
base64NoThe file's bytes, base64
filenameNoWith base64: the file's name
content_typeNoWith base64: the MIME type

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Goes well beyond the annotations: 64 MB size ceiling, the supported media classes (pictures, films, sound, PDF), the og:image extraction behavior when a page URL is supplied, and the shape of the response (library address plus ready-to-paste Markdown). These are operational facts an agent could not derive from readOnlyHint=false / openWorldHint=true / idempotentHint=false.

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

Conciseness4/5

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

Dense but front-loaded: site scoping first, then input modes, then limits, then the alternative tool, then the return value. No filler sentences, though the telegraphic phrasing ('Pictures, films, sound and PDF; up to 64 MB') costs a little readability.

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?

With no output schema, the description carries the return contract itself (library address plus Markdown snippet) and ties it to the consuming tools. Combined with size limits, accepted types, the two input modes and the request_upload fallback, nothing an agent needs to call 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, but the description adds real meaning: a web page address yields that page's own og:image rather than the page itself, base64 needs a filename and content type, and alt feeds the generated Markdown. Only the site parameter is left to the schema, which already points at list_sites.

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 concrete verb and destination ('Put a picture into the library') scoped to one site, and immediately distinguishes itself from the sibling request_upload by naming the case where that tool is correct. The accepted media types and the og:image behavior further pin down what this tool actually does, so an agent can separate it from search_media, use_photo and request_upload without opening a 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?

Gives an explicit exclusion rule with the alternative named: files the agent already holds (user-supplied or generated) belong in request_upload. It also lists the concrete downstream uses (create_post, replace_post, edit_post, set_feature_image, blocks) and the precondition 'before a post shows it', leaving little to infer.

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