Skip to main content
Glama

Upload a photo or clip for a post

upload_media

A photo or a short clip for a post; pass its mediaId to create_post. An image in this conversation goes as file. Otherwise url (public https), upload (you can make HTTP requests) or base64 (no network, photos ≤ 2 MB). Only what they asked for; nothing shows until a post passes the check.

Input Schema

NameRequiredDescriptionDefault
hNo
wNo
asNoWhich of what they run: its name or a key from list_identities. Left out when only one fits.
urlNoA public https link to the file. Example: "https://example.com/photos/lag.jpg"
fileNoAn image from this conversation (ChatGPT passes it here).
kindNoimage (default) or video.
base64NoThe photo as base64, ≤ 2 MB decoded.
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).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed7 schema fields changed
    • removedInput schema / $schema
      Removed value: -"http://json-schema.org/draft-07/schema#"
    • removedInput schema / additionalProperties
      Removed value: -false
    • changedInput schema / properties / as / description
      Previous value: -"Which 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."New value: +"Which of what they run: its name or a key from list_identities. Left out when only one fits."
    • changedInput schema / properties / base64 / description
      Previous value: -"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."New value: +"The photo as base64, ≤ 2 MB decoded."
    • removedInput schema / properties / file / additionalProperties
      Removed value: -false
    • removedInput schema / properties / upload / additionalProperties
      Removed value: -false
    • changedOutput schema / (root)
      Previous value: -{
      -  "$schema": "http://json-schema.org/draft-07/schema#",
      -  "additionalProperties": false,
      -  "properties": {
      -    "as": {
      -      "additionalProperties": false,
      -      "properties": {
      -        "key": {
      -          "type": "string"
      -        },
      -        "name": {
      -          "type": "string"
      -        }
      -      },
      -      "required": [
      -        "key",
      -        "name"
      -      ],
      -      "type": "object"
      -    },
      -    "expiresAt": {
      -      "type": [
      -        "string",
      -        "null"
      -      ]
      -    },
      -    "kind": {
      -      "type": "string"
      -    },
      -    "mediaId": {
      -      "type": "string"
      -    },
      -    "note": {
      -      "type": "string"
      -    },
      -    "status": {
      -      "enum": [
      -        "ready",
      -        "upload"
      -      ],
      -      "type": "string"
      -    },
      -    "uploadHeaders": {
      -      "anyOf": [
      -        {
      -          "additionalProperties": {
      -            "type": "string"
      -          },
      -          "type": "object"
      -        },
      -        {
      -          "type": "null"
      -        }
      -      ]
      -    },
      -    "uploadUrl": {
      -      "type": [
      -        "string",
      -        "null"
      -      ]
      -    }
      -  },
      -  "required": [
      -    "mediaId",
      -    "kind",
      -    "status",
      -    "as",
      -    "uploadUrl",
      -    "uploadHeaders",
      -    "expiresAt",
      -    "note"
      -  ],
      -  "type": "object"
      -}New value: +null
  2. Changed1 schema field changed
    • addedInput schema / properties / file
      Added value: +{
      +  "additionalProperties": false,
      +  "description": "An image from this conversation (ChatGPT passes it here).",
      +  "properties": {
      +    "download_url": {
      +      "type": "string"
      +    },
      +    "file_id": {
      +      "type": "string"
      +    },
      +    "file_name": {
      +      "type": "string"
      +    },
      +    "mime_type": {
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "download_url",
      +    "file_id"
      +  ],
      +  "type": "object"
      +}
  3. 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"
      +}
  4. Added

TDQS

A4.1/5.0
Behavior4/5

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

Beyond the annotations (readOnlyHint=false, destructiveHint=false, idempotentHint=false, openWorldHint=false), the description discloses a real behavioral trait: uploaded media is invisible until a post passes the check, so the upload alone does not surface anything. It also implies scope limitation ("Only what they asked for") and the base64/no-network and 2 MB constraints. It does not clarify re-upload or dedupe behavior, which matters given 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?

It is a single dense sentence with the resource and the create_post handoff front-loaded, and no filler. The telegraphic phrasing ("Only what they asked for") is compressed to the point of being slightly ambiguous, which costs a point.

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 10-parameter, zero-required, nested-object upload tool with no output schema, the description covers the essential decision surface: which transport to pick, size limits, and the create_post handoff. Remaining gaps (exact return shape, poster/dimension semantics) are already carried by the 80% schema coverage, so nothing critical 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?

With 80% schema coverage the baseline is 3, and the description earns more by explaining how to choose among the mutually exclusive inputs (file vs url vs upload vs base64) and by stating the capability prerequisites for each. It adds no detail for the numeric framing parameters (h, w, durationS) or the identity selector `as`, which remain schema-only.

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?

The description names the resource ("a photo or a short clip for a post") and its downstream role ("pass its mediaId to create_post"), which lets an agent place it relative to create_post/edit_post. The action verb itself only appears in the title ("Upload"), so the description alone is clear on object and purpose but not explicitly on the operation.

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

Usage Guidelines4/5

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

It gives concrete routing conditions for the four input transports: `file` for an image in this conversation, otherwise `url` (public https), `upload` (when the caller can make HTTP requests) or `base64` (no network, ≤2 MB). It also ties the output to create_post. It does not state when not to use this tool or how it differs from other media-settings siblings such as set_place_picture.

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.