Skip to main content
Glama

Add an image to a Pro draft

upload_pro_image
Idempotent

Store an image (PNG, JPEG, WebP or SVG) in a Pro draft and get its src for an image layer ({"op":"set","layer":"hero","props":{"src":""}}). Send small images as data (base64 or a data URL, up to 3 MB); for a file on disk, leave data out and the answer is the curl command that uploads it.

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": {
      "draftId": "<draftId>",
      "editToken": "<editToken>"
    },
    "name": "upload_pro_image"
  }
}

Input Schema

NameRequiredDescriptionDefault
dataNoThe image as base64 or a data URL.
fileNoWithout data: the file's path, to write it into the curl command.
draftIdYesThe draft's id (draftId).
editTokenYesThe editToken the draft came with.
contentTypeNoIts type, when data is plain base64.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare non-read-only, idempotent and non-destructive, so the safety profile is covered; the description adds the genuinely useful behavior beyond that: a 3 MB ceiling on inline data and a mode switch where omitting data yields an upload command instead of an upload. It does not mention permission or editToken failure behavior, but that is a minor gap given the annotation coverage.

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?

Two sentences, front-loaded with the core action and formats, then the two operating modes. The embedded layer JSON snippet earns its place by showing the agent exactly how to use the returned src, though the second sentence is densely packed and reads slightly compressed.

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?

With no output schema, the description carries the burden of explaining returns, and it does: a src value in one mode and a curl command in the other. Formats, size limit, and both call modes are covered; only auth/permission failure semantics are left implicit.

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 baseline is 3, but the description adds real meaning beyond the schema: the 3 MB limit that governs the data parameter and the conditional logic where leaving data out makes file meaningful and changes the response shape. It clarifies how data and file interact rather than merely restating field docs.

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?

States a specific verb and resource (store an image in a Pro draft) plus the accepted formats and the result an agent gets back (a src for an image layer, shown in a sample layer snippet). It reads clearly, but it never names or distinguishes itself from the sibling media_upload_command, which appears to overlap with the curl-command mode described here.

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?

Gives concrete operating conditions: inline base64/data URL for small images up to 3 MB, and omit data for a file on disk to receive the curl command that performs the upload. That is clear context for choosing between the two modes, though no explicit exclusions or sibling alternatives are stated.

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