Skip to main content
Glama

Upload a small brand image

upload_brand_asset
Idempotent

Uploads a small PNG, JPEG, WebP or GIF image into a brand's stored images, up to 512 KiB before base64 encoding, and returns the new asset or a pending status. For local files; register_brand_asset_url suits larger images already hosted at a public URL. Does not analyze the image or make it primary. Needs a user sign-in connection, not an API key.

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": {
      "brand_id": "<brand_id>",
      "asset_type": "<asset_type>",
      "idempotency_key": "<idempotency_key>",
      "data_base64": "<data_base64>",
      "content_type": "<content_type>"
    },
    "name": "upload_brand_asset"
  }
}

Input Schema

NameRequiredDescriptionDefault
tagsNoOptional list of up to 20 short tags.
brand_idYesBrand id from list_brands: the brand that receives the image.
asset_typeYesWhat the image is for: product, lifestyle, model, logo or reference.
data_base64YesThe image file as standard base64 without a data: prefix; at most 512 KiB once decoded.
descriptionNoOptional description of what the image shows, up to 2,000 characters.
content_typeYesMIME type matching the image bytes.
idempotency_keyYesCaller-chosen unique value for this upload (1 to 200 characters), not a value from a preview. A repeat with the same value and arguments returns the original asset; a different image needs a new value.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -{
      -  "$schema": "https://json-schema.org/draft/2020-12/schema",
      -  "additionalProperties": false,
      -  "properties": {
      -    "asset": {
      -      "anyOf": [
      -        {
      -          "additionalProperties": false,
      -          "description": "asset value in this response.",
      -          "properties": {
      -            "asset_type": {
      -              "anyOf": [
      -                {
      -                  "description": "asset type value in this response.",
      -                  "enum": [
      -                    "product",
      -                    "lifestyle",
      -                    "model",
      -                    "logo",
      -                    "reference"
      -                  ],
      -                  "type": "string"
      -                },
      -                {
      -                  "type": "null"
      -                }
      -              ],
      -              "description": "asset type value in this response."
      -            },
      -            "brand_id": {
      -              "anyOf": [
      -                {
      -                  "description": "Reference for the selected brand.",
      -                  "type": "string"
      -                },
      -                {
      -                  "type": "null"
      -                }
      -              ],
      -              "description": "Reference for the selected brand."
      -            },
      -            "created_at": {
      -              "anyOf": [
      -                {
      -                  "description": "created at value in this response.",
      -                  "type": "string"
      -                },
      -                {
      -                  "type": "null"
      -                }
      -              ],
      -              "description": "created at value in this response."
      -            },
      -            "description": {
      -              "anyOf": [
      -                {
      -                  "description": "description value in this response.",
      -                  "type": "string"
      -                },
      -                {
      -                  "type": "null"
      -                }
      -              ],
      -              "description": "description value in this response."
      -            },
      -            "id": {
      -              "anyOf": [
      -                {
      -                  "description": "id value in this response.",
      -                  "type": "string"
      -                },
      -                {
      -                  "type": "null"
      -                }
      -              ],
      -              "description": "id value in this response."
      -            },
      -            "is_primary": {
      -              "anyOf": [
      -                {
      -                  "description": "is primary value in this response.",
      -                  "type": "boolean"
      -                },
      -                {
      -                  "type": "null"
      -                }
      -              ],
      -              "description": "is primary value in this response."
      -            },
      -            "metadata": {
      -              "anyOf": [
      -                {
      -                  "additionalProperties": false,
      -                  "description": "metadata value in this response.",
      -                  "properties": {
      -                    "content_type": {
      -                      "anyOf": [
      -                        {
      -                          "description": "content type value in this response.",
      -                          "type": "string"
      -                        },
      -                        {
      -                          "type": "null"
      -                        }
      -                      ],
      -                      "description": "content type value in this response."
      -                    },
      -                    "file_size": {
      -                      "anyOf": [
      -                        {
      -                          "description": "file size value in this response.",
      -                          "type": "number"
      -                        },
      -                        {
      -                          "type": "null"
      -                        }
      -                      ],
      -                      "description": "file size value in this response."
      -                    },
      -                    "original_name": {
      -                      "anyOf": [
      -                        {
      -                          "description": "original name value in this response.",
      -                          "type": "string"
      -                        },
      -                        {
      -                          "type": "null"
      -                        }
      -                      ],
      -                      "description": "original name value in this response."
      -                    }
      -                  },
      -                  "type": "object"
      -                },
      -                {
      -                  "type": "null"
      -                }
      -              ],
      -              "description": "metadata value in this response."
      -            },
      -            "tags": {
      -              "anyOf": [
      -                {
      -                  "description": "tags value in this response.",
      -                  "items": {
      -                    "description": "tags value in this response.",
      -                    "type": "string"
      -                  },
      -                  "type": "array"
      -                },
      -                {
      -                  "type": "null"
      -                }
      -              ],
      -              "description": "tags value in this response."
      -            },
      -            "updated_at": {
      -              "anyOf": [
      -                {
      -                  "description": "updated at value in this response.",
      -                  "type": "string"
      -                },
      -                {
      -                  "type": "null"
      -                }
      -              ],
      -              "description": "updated at value in this response."
      -            },
      -            "url": {
      -              "anyOf": [
      -                {
      -                  "description": "url value in this response.",
      -                  "type": "string"
      -                },
      -                {
      -                  "type": "null"
      -                }
      -              ],
      -              "description": "url value in this response."
      -            }
      -          },
      -          "type": "object"
      -        },
      -        {
      -          "type": "null"
      -        }
      -      ],
      -      "description": "asset value in this response."
      -    },
      -    "replayed": {
      -      "anyOf": [
      -        {
      -          "description": "replayed value in this response.",
      -          "type": "boolean"
      -        },
      -        {
      -          "type": "null"
      -        }
      -      ],
      -      "description": "replayed value in this response."
      -    },
      -    "retry_after_seconds": {
      -      "anyOf": [
      -        {
      -          "description": "retry after seconds value in this response.",
      -          "type": "number"
      -        },
      -        {
      -          "type": "null"
      -        }
      -      ],
      -      "description": "retry after seconds value in this response."
      -    },
      -    "status": {
      -      "description": "Upload progress or completion state.",
      -      "type": "string"
      -    }
      -  },
      -  "type": "object"
      -}New value: +null
  2. Changed7 schema fields changed
    • changedInput schema / properties / asset_type / description
      Previous value: -"Purpose of this brand image: product, lifestyle, model, logo or reference."New value: +"What the image is for: product, lifestyle, model, logo or reference."
    • changedInput schema / properties / brand_id / description
      Previous value: -"Brand reference from list_brands (e.g. the returned brand id)."New value: +"Brand id from list_brands: the brand that receives the image."
    • changedInput schema / properties / content_type / description
      Previous value: -"MIME type of the image bytes."New value: +"MIME type matching the image bytes."
    • changedInput schema / properties / data_base64 / description
      Previous value: -"Image file bytes encoded as base64."New value: +"The image file as standard base64 without a data: prefix; at most 512 KiB once decoded."
    • changedInput schema / properties / description / description
      Previous value: -"Short description of this item."New value: +"Optional description of what the image shows, up to 2,000 characters."
    • changedInput schema / properties / idempotency_key / description
      Previous value: -"Confirmation key from the cost preview; valid for 15 minutes."New value: +"Caller-chosen unique value for this upload (1 to 200 characters), not a value from a preview. A repeat with the same value and arguments returns the original asset; a different image needs a new value."
    • changedInput schema / properties / tags / description
      Previous value: -"Short labels for organizing this image."New value: +"Optional list of up to 20 short tags."
  3. First observed

TDQS

A4.7/5.0
Behavior5/5

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

Annotations cover the safety profile (readOnlyHint=false, destructiveHint=false, idempotentHint=true), and the description adds context those annotations cannot express: an auth requirement distinguishing user sign-in from API key, the pre-encoding size ceiling, that the result may be a pending status rather than a completed asset, and that the upload is neither analyzed nor promoted to primary.

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?

Four compact sentences with the core action and limits front-loaded, then the alternative tool, then exclusions, then the auth prerequisite. Every sentence carries distinct information and none repeats another.

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 7-parameter mutation tool with no output schema, the description covers what gets created, the possible pending outcome, size/format limits, the sibling alternative, and the auth mode. An agent has everything needed to decide whether to call it and how.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so every parameter including brand_id, asset_type, content_type, tags and idempotency_key is already documented in the schema. The description's size-limit phrasing restates the data_base64 constraint and adds no new meaning about individual parameters, so the baseline of 3 applies.

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 ('Uploads a small PNG, JPEG, WebP or GIF image into a brand's stored images') and immediately scopes it with size and format limits. It separates itself from the sibling register_brand_asset_url by naming that tool and the condition (larger images already hosted at a public URL).

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 routes to the alternative for the case this tool does not cover ('For local files; register_brand_asset_url suits larger images already hosted at a public URL'). It also lists exclusions ('Does not analyze the image or make it primary') and a prerequisite ('Needs a user sign-in connection, not an API key'), leaving little for the agent to infer.

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.