Skip to main content
Glama
trhonpavel
by trhonpavel

Set variant price

set_variant_price
Idempotent

Set a variant's base price for one currency without affecting other prices; use price lists for sale or customer-group pricing.

Instructions

Sets the base price (no price rules) of a variant in one currency. All other prices of the variant are preserved. The amount is in major currency units (e.g. 49.99 = 49.99 EUR). For sale or customer-group prices use price lists.

Input Schema

NameRequiredDescriptionDefault
amountYes
product_idYes
variant_idYes
currency_codeYesE.g. eur, usd

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=false, idempotentHint=true and destructiveHint=false. The description adds genuinely useful behavior the annotations do not: all other prices of the variant are preserved, so the agent knows this is a partial, non-clobbering write. It does not state permission requirements or what the response returns, keeping it below a 5.

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?

Three tight sentences with zero filler, and the core operation plus its scope constraint is front-loaded before the format note and the alternative routing. Every clause earns its place.

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 no-output-schema mutation tool, the description supplies the behavioral context an agent needs: scope of the write, preservation of sibling prices, unit format, and where to go for other price types. Nothing required to invoke it correctly is missing.

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 only 25% (just currency_code), so the description must compensate. It does for the most ambiguous field: 'amount is in major currency units (e.g. 49.99 = 49.99 EUR)', which clarifies the number type that the schema leaves bare. product_id and variant_id remain unexplained in both places, so the coverage is not complete.

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 (sets the base price of a variant) plus a scoping qualifier (one currency, base only, no price rules). It also differentiates itself from the price-list path, so an agent can distinguish it from siblings like save_price_list without opening a schema.

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?

Explicitly routes the agent elsewhere for a related but different need: 'For sale or customer-group prices use price lists.' That is a clear alternative-selection rule. It stops short of a full when/when-not treatment (e.g. what to do when the variant already has overlapping price rules), so it is strong but not exhaustive.

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