Skip to main content
Glama

Upload image or video

upload_asset

Upload an image or video to PinBridge and get an asset_id for create_pin.

    Use when the media was generated in this session or Pinterest cannot
    fetch it from a public URL; otherwise pass image_url to create_pin
    directly. Provide exactly one of file, content_base64 or source_url.
    For a file attached to or generated in the conversation use file, never
    a file path in content_base64. Videos must be uploaded assets.

    Returns id (use as asset_id), public_url, asset_type, content_type,
    size_bytes, created_at. Files are capped at 200 MB (plans cap lower).
    Plans differ in how many images can be uploaded each month and whether
    videos can be uploaded. Past a limit it fails with image_upload_limit,
    and an upload the plan does not include fails with feature_unavailable.
    Either way, a public image_url still works for create_pin. Also fails
    with validation_error for unsupported media, and invalid_image when the
    file is truncated or corrupted (re-encode the exact original bytes;
    never retype base64 by hand).
    

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": {
      "filename": "<filename>"
    },
    "name": "upload_asset"
  }
}

Input Schema

NameRequiredDescriptionDefault
fileNoAn image or video attached to or generated in the conversation, handed over by the client as a download link.
filenameYesFile name with extension, e.g. "hero.png".
asset_typeNoKind of media being uploaded.image
source_urlNoPublic http(s) URL the server downloads instead of content_base64; no redirects, private hosts are refused.
content_typeNoMIME type, e.g. "image/png"; inferred when omitted.
content_base64NoBase64-encoded file bytes (data: prefix allowed).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedInput schema / $defs
      Added value: +{
      +  "ChatFile": {
      +    "description": "A file handed over by the client as a download link.",
      +    "properties": {
      +      "download_url": {
      +        "description": "Temporary URL the server downloads the file from.",
      +        "title": "Download Url",
      +        "type": "string"
      +      },
      +      "file_id": {
      +        "description": "The client's id for the file.",
      +        "title": "File Id",
      +        "type": "string"
      +      },
      +      "file_name": {
      +        "description": "Original file name.",
      +        "title": "File Name",
      +        "type": "string"
      +      },
      +      "mime_type": {
      +        "description": "MIME type, e.g. \"image/png\".",
      +        "title": "Mime Type",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "download_url",
      +      "file_id"
      +    ],
      +    "title": "ChatFile",
      +    "type": "object"
      +  }
      +}
    • addedInput schema / properties / file
      Added value: +{
      +  "$ref": "#/$defs/ChatFile",
      +  "description": "An image or video attached to or generated in the conversation, handed over by the client as a download link.",
      +  "title": "File"
      +}
  2. Changed5 schema fields changed
    • addedInput schema / properties / asset_type / description
      Added value: +"Kind of media being uploaded."
    • addedInput schema / properties / content_base64 / description
      Added value: +"Base64-encoded file bytes (data: prefix allowed)."
    • addedInput schema / properties / content_type / description
      Added value: +"MIME type, e.g. \"image/png\"; inferred when omitted."
    • addedInput schema / properties / filename / description
      Added value: +"File name with extension, e.g. \"hero.png\"."
    • addedInput schema / properties / source_url / description
      Added value: +"Public http(s) URL the server downloads instead of content_base64; no redirects, private hosts are refused."
  3. Added

TDQS

A4.6/5.0
Behavior4/5

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

Annotations only declare the safety profile (not read-only, open-world, non-idempotent, non-destructive); the description adds substantial context beyond that: 200 MB cap, plan-based monthly image quotas and video availability, and the specific error codes (image_upload_limit, feature_unavailable, validation_error, invalid_image) with recovery advice. It does not cover concurrency or whether re-uploading the same bytes creates a duplicate asset, which is the main remaining gap for a non-idempotent write.

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 and the when-to-use decision, then the one-of constraint, then return values and failure modes. Dense and mostly waste-free, though the error-code paragraph is long enough to slightly dilute the key selection guidance.

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?

No output schema exists, yet the description enumerates the returned fields (id, public_url, asset_type, content_type, size_bytes, created_at) and covers limits, plan gating, and failure modes. An agent has everything needed to call it and interpret the result.

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: exactly one of file, content_base64 or source_url must be supplied, and file must be used for conversation-attached media rather than a path in content_base64. That mutual-exclusivity rule is not stated in 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 specific verb and resource (upload an image or video) plus the concrete outcome (get an asset_id for create_pin), which immediately distinguishes it from create_pin itself and from delete_asset.

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?

Explicitly names the conditions to use it (media generated in this session, or Pinterest cannot fetch from a public URL) and the alternative (pass image_url to create_pin directly). It also repeats the fallback after limit failures, so the agent knows the escape hatch.

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