Skip to main content
Glama
trhonpavel
by trhonpavel

Delete product

delete_product
DestructiveIdempotent

Permanently removes a product and its variants from Medusa; requires exact product title confirmation and can also delete unreserved inventory items.

Instructions

DELETES the product with all its variants. Irreversible – get explicit confirmation from the user before calling. 'confirm_title' must match the product title exactly. By default the inventory items of its variants are deleted too (only those with nothing reserved).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
product_idYes
confirm_titleYesThe exact product title, as a safeguard against deleting the wrong product
delete_inventory_itemsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.4/5.0
Behavior5/5

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

Annotations already declare destructiveHint=true, but the description adds substantially: the irreversible nature, the cascade to all variants, and the non-obvious caveat that inventory items are only deleted when nothing is reserved. That is exactly the behavioral context an agent cannot get from the structured fields.

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, front-loaded with the destructive action and the confirmation requirement; every clause carries information with no padding.

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 destructive tool with no output schema, the description covers confirmation, irreversibility, and cascade semantics. It omits what happens when confirm_title does not match (error vs. silent refusal) and whether the inventory caveat can be overridden, but the essentials are present.

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 coverage is only 33%, so the description must compensate. It does explain the confirm_title safeguard and the default behavior of delete_inventory_items, but product_id is undocumented in both places and the exactness requirement for confirm_title largely repeats the schema text. Adequate but with a real gap.

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 (DELETES) and resource (product with all its variants), and the scope of the cascade is included. This clearly separates it from update_product among the siblings.

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 instructs the agent to obtain user confirmation before calling and explains the confirm_title safeguard condition, which is real usage guidance. It does not name update_product as the non-destructive alternative, so it stops short of full when-not-to-use routing.

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