Skip to main content
Glama

Upload media

upload_media

Upload a media file (image or video) from a URL or local file path. The file is stored in BulkPublish for use in posts. Supported formats: JPEG, PNG, WebP, GIF, MP4, MOV, WebM. Max 100MB. Provide either url OR filePath, not both. Use this when the user provides an image/video to attach to a post.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlNoPublic URL of the media file to upload.
filePathNoAbsolute path to a local file to upload (e.g. /Users/me/photo.png).
filenameNoOptional filename. If omitted, derived from the URL or file path.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
idNo
urlNo
fileNo
filenameNo
mimeTypeNo
sizeBytesNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "http://json-schema.org/draft-07/schema#",
      +  "additionalProperties": false,
      +  "properties": {
      +    "file": {
      +      "anyOf": [
      +        {
      +          "additionalProperties": {},
      +          "properties": {},
      +          "type": "object"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ]
      +    },
      +    "filename": {
      +      "anyOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ]
      +    },
      +    "id": {
      +      "anyOf": [
      +        {
      +          "anyOf": [
      +            {
      +              "type": "number"
      +            },
      +            {
      +              "type": "string"
      +            }
      +          ]
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ]
      +    },
      +    "mimeType": {
      +      "anyOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ]
      +    },
      +    "sizeBytes": {
      +      "anyOf": [
      +        {
      +          "anyOf": [
      +            {
      +              "type": "number"
      +            },
      +            {
      +              "type": "string"
      +            }
      +          ]
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ]
      +    },
      +    "url": {
      +      "anyOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ]
      +    }
      +  },
      +  "type": "object"
      +}
  2. First observed

TDQS

A4.4/5.0
Behavior4/5

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

Annotations indicate readOnlyHint=false (write operation) and openWorldHint=true (side effects). The description discloses the storage side effect ('The file is stored in BulkPublish'), supported formats, size limit, and the exclusivity constraint. It does not mention potential error scenarios or sync/async behavior, but it adds meaningful behavioral context beyond the annotations, such as the storage location and format/limit constraints.

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 concise sentences: first states the action and purpose, second lists supported formats and size, third gives the either/or constraint and usage guidance. No redundant phrasing, information is front-loaded, and every sentence contributes to understanding the tool.

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?

Given the presence of an output schema (for return values), the description covers purpose, input constraints, formats, and usage context. It does not detail the relationship with sibling tools like create_media_upload and finalize_media_upload, which might be part of a multi-step upload workflow. This is a slight gap for an agent deciding whether this tool is sufficient or if those steps are needed. Overall, it is largely complete but missing that orchestration context.

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 description coverage is 100%, so all parameters are documented in the schema. The description adds the exclusive-or constraint (url OR filePath) and reinforced the meaning of filename derivation from URL/path, which is partially in the schema. It also conveys format and size constraints that affect parameter choices, adding value 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?

The description states a specific verb ('Upload') and resource ('media file'), elaborates the input sources (URL or local path), and clarifies the file is stored in BulkPublish for later posts. It clearly differentiates from siblings like create_media_upload and finalize_media_upload by describing the entire upload action, and it explicitly ties to the use case of attaching media to a post.

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?

The description provides a clear when-to-use condition: 'Use this when the user provides an image/video to attach to a post.' It also gives an explicit constraint ('Provide either url OR filePath, not both'). However, it does not mention alternatives or the specific workflow involving create_media_upload and finalize_media_upload, which could be relevant for multipart uploads or larger files, leaving some ambiguity about when to choose this tool over those.

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