Skip to main content
Glama

upload_product_image

DestructiveIdempotent

Attach an image to an existing product using base64 data or a public URL. Returns the created image record for later management.

Instructions

Attach an image to an existing product. Provide exactly one of image_base64 (with content_type) or image_url.

Use this after create_product returns a product ID. For replacing a previously-uploaded image, delete the old one with delete_product_image first. Marked destructive because subsequent edits to the image set are visible publicly.

Args: api_key: Partle API key (prefix pk_). product_id: ID of the product to attach the image to. image_base64: Raw image data, base64-encoded. When set, content_type is required (e.g. image/jpeg). content_type: MIME type of the base64 payload. Required with image_base64. One of: image/jpeg, image/png, image/gif, image/webp. image_url: URL the server should fetch the image from. Use this when the image is already hosted somewhere public — saves base64 overhead.

Returns: The created ProductImage record with its id (use for deletion) and storage path.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
api_keyYes
product_idYes
image_base64No
content_typeNo
image_urlNo
Behavior5/5

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

Contradicts no annotations. Adds context: marks destructive because edits are publicly visible, describes return value (ProductImage record with id and path), and explains the two input methods (base64 vs URL) and their 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?

Well-structured with Args and Returns sections. Every sentence adds value. Front-loaded with purpose. No unnecessary words.

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 tool with 5 parameters and no output schema, the description covers all necessary context: prerequisites (create_product), alternatives, parameter details, return value, and behavioral notes (destructive).

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

Parameters5/5

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

Schema coverage is 0%, but description provides complete parameter semantics: api_key format (pk_ prefix), product_id intention, image_base64 requires content_type, content_type lists allowed MIME types, image_url for hosted images.

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 starts with 'Attach an image to an existing product', clearly stating the action and resource. It distinguishes from sibling tools like delete_product_image by describing when to use each.

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 states when to use this tool (after create_product returns a product ID) and when to use alternatives (delete_product_image for replacement). Also specifies to provide exactly one of image_base64 or image_url.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/rubenayla/partle'

If you have feedback or need assistance with the MCP directory API, please join our Discord server