Skip to main content
Glama

Link Assets to Product

sirv_link_assets_to_product
Idempotent

Link up to 100 library assets to a product with an optional role such as main, gallery, lifestyle, detail, or swatch. Use it to organize product images before publishing.

Instructions

Link up to 100 library assets to one product, with an optional role: main, gallery, lifestyle, detail or swatch.

Use it to add images to one product. Do not use it to publish to a store: use sirv_push_image_to_shopify. To link the same assets to many products, use sirv_bulk_edit_products with linkAssets.

Inputs: productId and assetIds are required. Without role, the assets get no role.

Returns how many assets it linked.

Credits: free.

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": {
      "productId": "<productId>",
      "assetIds": "<assetIds>"
    },
    "name": "sirv_link_assets_to_product"
  }
}

Input Schema

NameRequiredDescriptionDefault
roleNoThe images' role on the product. Leave it out for no role
orgIdNoWorkspace id from sirv_list_organizations. Default: the workspace you signed in to
assetIdsYesIds of the library assets to link, 1 to 100
productIdYesProduct id, from sirv_list_products

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changedv0.1.1
    • changedInput schema / properties / assetIds / description
      Previous value: -"Asset IDs to link"New value: +"Ids of the library assets to link, 1 to 100"
    • changedInput schema / properties / orgId / description
      Previous value: -"Organization ID (uses default org if omitted)"New value: +"Workspace id from sirv_list_organizations. Default: the workspace you signed in to"
    • addedInput schema / properties / orgId / pattern
      Added value: +"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    • changedInput schema / properties / productId / description
      Previous value: -"Product ID"New value: +"Product id, from sirv_list_products"
    • changedInput schema / properties / role / description
      Previous value: -"Asset role"New value: +"The images' role on the product. Leave it out for no role"
  2. First observedv0.1.0

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare write, non-destructive, idempotent, closed-world behavior, so the description rightly spends its words elsewhere: the 100-asset cap, the consequence of omitting `role` (assets get no role), the return value (count of linked assets), and that the call is free. It stops short of saying whether existing links/roles on the product are replaced or appended, which is the main open behavioral question.

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 scope and limit, then routed with use/do-not-use lines, and closed with short labeled Inputs/Returns/Credits blocks. The Inputs line restates required fields the schema already enforces, which is the only slightly wasted sentence.

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?

For a write tool with full annotation coverage and no output schema, the definition covers the essentials: what it links, the cap, the role default, routing to alternatives, return summary, and cost. The remaining gap is whether previously linked assets keep or lose their roles when new ones are linked.

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% and the enum lists all five role values, so the description's restatement of role names and its 'without `role`, no role' note duplicate the schema rather than extend it. Baseline 3 applies when the schema carries parameter meaning; no extra format or constraint detail is added.

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 (link up to 100 library assets to one product) and immediately scopes the variants via the optional `role` values. It is clearly distinguishable from siblings such as sirv_push_image_to_shopify and sirv_bulk_edit_products, which are named explicitly.

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?

Gives a positive case (add images to one product), an explicit exclusion with the correct alternative (do not use to publish to a store: use sirv_push_image_to_shopify), and a second routing rule for the many-products case (sirv_bulk_edit_products with linkAssets). Nothing is left to inference.

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