Skip to main content
Glama
hostinger

hostinger-api-mcp

Official
by hostinger

Upload and attach a product image

ecommerce_uploadAndAttachAProductImageV1

Fetch or attach a product image from a URL or upload key in a single call. Optionally set it as the product's thumbnail. The image is virus-scanned, validated, and saved to CDN.

Instructions

Fetch a raster image (JPEG, PNG, GIF or WebP, max 15MB) from a URL and attach it to a product in a single call. Image downloads require HTTPS on port 443 without embedded credentials. At most one redirect is allowed, and its destination must meet the same requirements. Private or reserved network destinations, unsupported URLs and longer redirect chains are rejected. The image is virus-scanned and validated by content, then stored on the CDN. Set is_thumbnail to make it the product's primary image.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
store_idYesThe ID of the store the product belongs to.
image_urlNoPublicly reachable URL of a raster image (JPEG, PNG, GIF or WebP), maximum 15MB. Fetching the image requires HTTPS on port 443 without embedded credentials. At most one redirect is allowed; its destination must meet the same URL requirements. Private or reserved network destinations, unsupported URLs and longer redirect chains are rejected. The image is fetched, virus-scanned and validated by content, then stored on the CDN. SVG is not accepted. Provide either this or object_name.
product_idYesThe ID of the product to attach the image to.
object_nameNoKey returned by the upload-url endpoint. Provide this instead of image_url to attach an uploaded image.
is_thumbnailNoWhen true, the image becomes the product's thumbnail (primary image). When omitted, it becomes the thumbnail only if the product does not have one yet.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv1.58.0
    • changedInput schema / properties / image_url / description
      Previous value: -"Publicly reachable URL of the raster image (JPEG, PNG, GIF or WebP), maximum 15MB. The image is\nfetched, virus-scanned and validated by content, then stored on the CDN. SVG is not accepted.\nProvide either this or object_name."New value: +"Publicly reachable URL of a raster image (JPEG, PNG, GIF or WebP), maximum 15MB. Fetching\nthe image requires HTTPS on port 443 without embedded credentials. At most one redirect\nis allowed; its destination must meet the same URL requirements. Private or reserved\nnetwork destinations, unsupported URLs and longer redirect chains are rejected. The image\nis fetched, virus-scanned and validated by content, then stored on the CDN. SVG is not\naccepted. Provide either this or object_name."
  2. Addedv1.42.0

TDQS

A4.5/5.0
Behavior5/5

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

Beyond the annotations (readOnlyHint=false, destructiveHint=false), the description discloses substantial behavior: URL fetch requirements (HTTPS, port 443, no credentials), redirect limits, rejection of private/reserved networks, virus scanning, content validation, CDN storage, and thumbnail semantics. This gives the agent a strong and accurate behavioral model of the operation.

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?

The description is compact and front-loaded, starting with the core action and then layering constraints and effects. Each sentence contributes useful information without repetition or filler.

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?

The description is complete for an action-oriented tool: it states inputs, constraints, rejection conditions, processing pipeline, storage outcome, and thumbnail behavior. No output schema exists, so the absence of return-value details does not create a significant gap.

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 the schema already documents each parameter thoroughly. The description adds background behavior like virus scanning and CDN storage, but for parameter-specific meaning it mostly restates what the schema already provides, such as the is_thumbnail primary-image behavior and URL constraints.

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 opens with a specific verb-resource pair: 'Fetch a raster image... and attach it to a product in a single call.' It names allowed formats and size, and makes clear this is the combined fetch-and-attach operation, distinguishing it from upload-only or delete-only product image tools.

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 gives clear context for when to use this tool: when a URL (or pre-uploaded object) should be attached to a product. It does not explicitly name a sibling alternative or state a when-not-to-use case, but the 'single call' phrasing and the object_name/image_url distinction in the schema provide practical routing guidance.

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

Deploy Server

Other Tools