Skip to main content
Glama

Upload a photo or clip for a post

upload_media

Bring a photo or a short clip for a post (then pass its mediaId to create_post's media). Two ways: (1) url — a public https link to the file itself (a JPEG/PNG/WebP photo ≤ 10 MB, or an MP4/MOV/WebM clip ≤ 25 MB and ≤ 60 s with durationS and a posterUrl frame): Hunchful fetches it; (2) upload — if you can make HTTP requests, give its contentType and size (photos ≤ 10 MB, clips ≤ 50 MB with durationS and posterBase64), then PUT the bytes to the returned uploadUrl with exactly uploadHeaders before create_post; (3) base64 — if you can NOT reach the network (a sandbox, e.g. ChatGPT's or Claude's), send a photo's bytes inline as base64 (≤ 2 MB decoded — a JPEG at 1280 px or less; photos only, never the uploadUrl path). Only for what the person runs and may post in (as), only what they asked for, never someone else's picture without their right to it. Nothing is shown to anyone until a post with it passes the photo check; an unused upload is gone after 24 hours.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
hNo
wNo
asNoWhich of what the person runs — a key from list_identities, e.g. "forening:a1b2c3d4e5" or "channel:Xy12Ab34Cd", or its name, e.g. "Löparklubben". May be left out when only one fits.
urlNoA public https link to the file. Example: "https://example.com/photos/lag.jpg"
kindNoimage (default) or video.
base64NoInstead of url/upload: the photo's bytes as base64 (a data:image/…;base64, prefix is fine), ≤ 2 MB decoded. For clients without network access.
uploadNoInstead of url: you PUT the bytes yourself to the uploadUrl you get back.
durationSNovideo: its length in seconds (≤ 60). Example: 14.5
posterUrlNovideo + url: a https link to a still frame (JPEG/PNG/WebP).

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
asYes
kindYes
noteYes
statusYes
mediaIdYes
expiresAtYes
uploadUrlYes
uploadHeadersYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / base64
      Added value: +{
      +  "description": "Instead of url/upload: the photo's bytes as base64 (a data:image/…;base64, prefix is fine), ≤ 2 MB decoded. For clients without network access.",
      +  "maxLength": 2900000,
      +  "type": "string"
      +}
  2. Added

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already declare write, non-idempotent, non-open-world, non-destructive. The description adds real operational detail beyond that: the 24-hour expiry of unused uploads, the moderation gate ('nothing is shown to anyone until a post with it passes the photo check'), the PUT-to-uploadUrl step with exact headers, and per-path size/duration ceilings. It does not disclose auth/permission requirements or failure behavior, but the added context is substantial.

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?

Front-loaded with purpose, then the selection logic, then constraints; every sentence carries information for a genuinely multi-path tool. Minor flaw: it announces 'Two ways' and then enumerates three, which briefly mis-signals the structure.

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?

An output schema exists, so return values need no explanation, and the description supplies the format limits, lifecycle, and moderation/staleness behavior an agent needs to sequence this before create_post. The uncovered `h`/`w` parameters and absent auth/permission detail keep it short of a 5 for a 9-parameter tool.

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?

With schema coverage at 78% the baseline is 3, and the description pushes past it by explaining parameter interrelationships the schema states only locally: url + durationS + posterUrl for clips, upload + posterBase64, and the base64 path being photos-only. The only real gap is the bare `h`/`w` integers, which neither schema nor description explains.

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?

Names a specific verb+resource ('bring a photo or a short clip for a post') and immediately states the downstream integration ('then pass its mediaId to create_post's media'), which no sibling tool does. An agent can distinguish this from create_post, schedule_post, or edit_post 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 explicit routing rules: use url when you have a public link, upload when you can make HTTP requests, base64 when you cannot reach the network. It also states when-not ('never someone else's picture without their right to it', only what the person runs and asked for) and names the required follow-up call (create_post).

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.