Skip to main content
Glama
trhonpavel
by trhonpavel

Set variant price

set_variant_price
Idempotent

Updates a Medusa product variant's base price for one currency while preserving all other prices. Use it to change a variant price without affecting price rules.

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).

Input Schema

TableJSON 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.2/5.0
Behavior4/5

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

Annotations already declare idempotent=true, destructive=false, openWorld=true, so the safety profile is covered. The description adds real behavioral value beyond them: other prices are preserved (no collateral mutation) and the amount is in major units, preventing the classic 4999-vs-49.99 error.

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 short sentences, each earning its place: the action, the preservation guarantee, and the unit convention. The critical unit warning is front-loaded after the action rather than buried.

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 mutation tool with no output schema, the description covers the action, side effects, and the most error-prone parameter convention. It is slightly thin on the identifier parameters and gives no error/permission expectations, but is otherwise adequate.

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% (only currency_code documented), so the description must compensate, and it does for the highest-risk parameter by explaining amount units with a concrete example. It says nothing, however, about product_id or variant_id semantics.

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 states a precise verb+resource ('Sets the base price ... of a variant') and narrows scope with '(no price rules)' and 'in one currency', so an agent knows exactly what is being modified. No sibling tool covers pricing, so this is unambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage is implied by the scope note ('base price, no price rules'), which tells the agent this is not for rule-based pricing, but there is no explicit when-to-use or exclusion statement. With no pricing sibling to route between, the gap is modest.

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