Medusa
v0.4.0Medusa v2 store: orders, customers, products, inventory, sales reports and safe write actions.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
get_store_info Store overview
Returns regions (currencies), sales channels, stock locations, shipping options and profiles, and return/refund reasons. A good first call to learn the IDs other tools need.
list_orders List orders
Lists orders, newest first. Filters: full-text, date range (YYYY-MM-DD in the reporting timezone), customer, order/payment/fulfillment status.
| Parameter | Type | Description |
|---|---|---|
created_from | string | From date, e.g. 2026-09-01 |
created_to | string | To date (inclusive), e.g. 2026-09-30 |
customer_id | string | |
fulfillment_status | array | E.g. ['not_fulfilled'] = waiting to be fulfilled |
limit | integer | Number of records (max 200) |
offset | integer | Records to skip (pagination) |
payment_status | array | |
q | string | Full-text search – order number, email, name… |
status | array | Order status |
get_order Get order
Full order detail – line items, addresses, payments (with captures and refunds), fulfillments, tracking numbers and returns. Accepts an order ID (order_…) or the order number.
| Parameter | Type | Description |
|---|---|---|
order * | string | Order ID (order_…) or order number, e.g. 1042 |
create_fulfillment Create fulfillment
Creates a fulfillment for an order. Without 'items' it fulfills all remaining unfulfilled quantities. Without 'location_id' it uses the only stock location, if there is exactly one.
| Parameter | Type | Description |
|---|---|---|
order * | string | Order ID or order number |
items | array | Specific line items; defaults to everything remaining |
location_id | string | Stock location to ship from |
notify_customer | boolean |
create_shipment Mark as shipped
Marks a fulfillment as shipped and attaches a tracking number. Without 'fulfillment_id' it uses the only unshipped fulfillment.
| Parameter | Type | Description |
|---|---|---|
order * | string | Order ID or order number |
fulfillment_id | string | |
notify_customer | boolean | |
tracking_number | string | |
tracking_url | string |
mark_delivered Mark as delivered
Marks a fulfillment as delivered. Without 'fulfillment_id' it uses the only fulfillment that is not delivered yet.
| Parameter | Type | Description |
|---|---|---|
order * | string | Order ID or order number |
fulfillment_id | string |
cancel_fulfillment Cancel fulfillment
Cancels a fulfillment that has not been shipped yet, so its items can be fulfilled again. Without 'fulfillment_id' it uses the only unshipped fulfillment.
| Parameter | Type | Description |
|---|---|---|
order * | string | Order ID or order number |
fulfillment_id | string | |
notify_customer | boolean |
complete_order Complete order
Marks the order as completed.
| Parameter | Type | Description |
|---|---|---|
order * | string | Order ID or order number |
cancel_order Cancel order
CANCELS the order. Irreversible – get explicit confirmation from the user before calling. The order must not have active fulfillments.
| Parameter | Type | Description |
|---|---|---|
order * | string | Order ID or order number |
update_order Update order
Changes the order's email, shipping or billing address, or metadata (e.g. an internal note). Send only what should change; an address replaces the whole previous address.
| Parameter | Type | Description |
|---|---|---|
order * | string | Order ID or order number |
billing_address | object | Postal address |
email | string | |
metadata | object | Merged into existing metadata; an empty string deletes a key |
shipping_address | object | Postal address |
mark_order_paid Mark order as paid
Records a manual payment (e.g. a received bank transfer or cash on delivery) for the order's unpaid payment collection. Orders without one (e.g. converted draft orders) get a payment collection for the outstanding amount first.
| Parameter | Type | Description |
|---|---|---|
order * | string | Order ID or order number |
capture_payment Capture payment
Captures an authorized payment (charges the customer). Without 'amount' captures the full remaining amount. Without 'payment_id' uses the only payment that is not fully captured.
| Parameter | Type | Description |
|---|---|---|
order * | string | Order ID or order number |
amount | number | Major units; defaults to the full remaining amount |
payment_id | string |
refund_payment Refund payment
REFUNDS money to the customer through the payment provider. Irreversible – confirm the amount with the user before calling. Without 'payment_id' uses the only captured payment that can cover the amount. Refund reasons are listed by get_store_info.
| Parameter | Type | Description |
|---|---|---|
amount * | number | Major units, e.g. 249.50 |
order * | string | Order ID or order number |
note | string | |
payment_id | string | |
refund_reason_id | string |
create_return Create return
Requests a return of order items (the customer is sending them back). Without 'items' returns every shipped item. When the parcel arrives, call receive_return. Refund the money separately with refund_payment. Return reasons are listed by get_store_info.
| Parameter | Type | Description |
|---|---|---|
order * | string | Order ID or order number |
items | array | Defaults to every shipped item |
location_id | string | Where the goods return to; defaults to the only stock location |
note | string | Internal note |
notify_customer | boolean |
receive_return Receive return
Records that returned items arrived; they go back to stock. Without 'items' receives everything requested. Without 'return_id' uses the order's only open return.
| Parameter | Type | Description |
|---|---|---|
items | array | Defaults to every requested item |
note | string | Internal note |
notify_customer | boolean | |
order | string | Order ID or order number (to find the return) |
return_id | string |
edit_order Edit order items
Changes the items of an existing order: add products (by SKU or variant), change quantities, or remove items (quantity 0). dry_run (default true) previews the new items and totals and changes nothing; repeat with dry_run false to apply. The result says whether the customer owes money (mark_order_paid) or should get a refund (refund_payment).
| Parameter | Type | Description |
|---|---|---|
order * | string | Order ID or order number |
add_items | array | |
change_items | array | |
dry_run | boolean | |
note | string | Internal note |
create_draft_order Create draft order
Creates a draft order on behalf of a customer (phone or e-mail orders, B2B). Items by variant_id or SKU (of published products), optionally with a custom unit price. Shipping options are listed by get_store_info. Turn the draft into a real order with convert_draft_order.
| Parameter | Type | Description |
|---|---|---|
items * | array | |
billing_address | object | Postal address |
customer_id | string | |
email | string | Customer e-mail (required unless customer_id is given) |
notify_customer | boolean | |
promo_codes | array | |
region_id | string | Defaults to the only region |
shipping_address | object | Postal address |
shipping_amount | number | Custom shipping price; defaults to the option's price |
shipping_option_id | string |
convert_draft_order Convert draft order
Turns a draft order into a regular order (reserves stock). Record the payment afterwards with mark_order_paid.
| Parameter | Type | Description |
|---|---|---|
draft_order_id * | string |
list_customers List customers
Searches customers by name, email or company, optionally within a customer group.
| Parameter | Type | Description |
|---|---|---|
email | string | |
group_id | string | Only members of this customer group |
has_account | boolean | true = registered, false = guests |
limit | integer | Number of records (max 200) |
offset | integer | Records to skip (pagination) |
q | string | Full-text search – name, email, company |
get_customer Get customer
Customer detail with addresses, groups and order history (count, total spent, recent orders).
| Parameter | Type | Description |
|---|---|---|
customer_id * | string | Customer ID (cus_…) or e-mail |
list_customer_groups List customer groups
Customer groups (e.g. B2B, VIP) – used by price lists and promotions.
| Parameter | Type | Description |
|---|---|---|
limit | integer | Number of records (max 200) |
offset | integer | Records to skip (pagination) |
q | string |
save_customer Create or update customer
Without customer_id creates a customer (email required); with customer_id updates only the given fields. Can also add an address and add/remove the customer from groups.
| Parameter | Type | Description |
|---|---|---|
add_address | object | |
add_to_groups | array | Customer group IDs to join |
company_name | string | |
customer_id | string | |
email | string | |
first_name | string | |
last_name | string | |
metadata | object | Merged into existing metadata; an empty string deletes a key |
phone | string | |
remove_from_groups | array | Customer group IDs to leave |
save_customer_group Create or update customer group
Without group_id creates a group (name required); with group_id renames it. Can add/remove customers.
| Parameter | Type | Description |
|---|---|---|
add_customers | array | Customer IDs to add |
group_id | string | |
metadata | object | Merged into existing metadata; an empty string deletes a key |
name | string | |
remove_customers | array | Customer IDs to remove |
delete_customer_group Delete customer group
DELETES a customer group (the customers stay). Price lists and promotions targeting it stop applying. Confirm with the user first.
| Parameter | Type | Description |
|---|---|---|
group_id * | string |
list_products List products
Lists products with their variants (SKUs). Filter by full-text, status, collection, category or tag.
| Parameter | Type | Description |
|---|---|---|
category_id | string | |
collection_id | string | |
limit | integer | Number of records (max 200) |
offset | integer | Records to skip (pagination) |
q | string | |
status | array | |
tag_id | string |
get_product Get product
Product detail – variants, prices in all currencies, linked inventory items, options, categories, collection, tags, images and sales channels.
| Parameter | Type | Description |
|---|---|---|
product_id * | string | Product ID (prod_…) or handle |
create_product Create product
Creates a product with its variants and prices. For a simple product without options pass just 'prices' (and optionally 'sku', 'stock'). For variants define 'options' (e.g. Size: S, M, L) and one variant per combination. Defaults: status draft, the store's default sales channel, the default shipping profile. Category and collection IDs come from list_catalog.
| Parameter | Type | Description |
|---|---|---|
title * | string | |
category_ids | array | |
collection_id | string | |
description | string | |
discountable | boolean | |
handle | string | URL slug; derived from the title when omitted |
images | array | Image URLs |
location_id | string | Stock location for initial stock; defaults to the only one |
metadata | object | |
options | array | E.g. [{ title: 'Size', values: ['S','M','L'] }] |
prices | array | Simple product: prices of its single variant |
sales_channel_ids | array | |
shipping_profile_id | string | |
sku | string | Simple product: SKU of its single variant |
status | string | |
stock | integer | Simple product: initial stock |
subtitle | string | |
tags | array | Tag values; missing tags are created |
thumbnail | string | Image URL |
variants | array | |
weight | number | Grams |
update_product Update product
Updates product fields – texts, status, handle, images, collection, categories, tags, sales channels, metadata. Send only the fields that should change. Lists (category_ids, tags, images, sales_channel_ids) replace the previous list.
| Parameter | Type | Description |
|---|---|---|
product_id * | string | |
category_ids | array | |
collection_id | string | null | null removes the product from its collection |
description | string | |
discountable | boolean | |
handle | string | |
images | array | Image URLs – replaces all images |
metadata | object | Merged into existing metadata; an empty string deletes a key |
sales_channel_ids | array | |
shipping_profile_id | string | |
status | string | |
subtitle | string | |
tags | array | Tag values; missing tags are created |
thumbnail | string | |
title | string | |
weight | number |
delete_product Delete product
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).
| Parameter | Type | Description |
|---|---|---|
confirm_title * | string | The exact product title, as a safeguard against deleting the wrong product |
product_id * | string | |
delete_inventory_items | boolean |
add_product_images Add product images
Adds images to a product from public image URLs. By default they are downloaded and stored in the shop's own file storage (so the storefront does not depend on the source site). Optionally makes the first one the thumbnail.
| Parameter | Type | Description |
|---|---|---|
product_id * | string | |
urls * | array | |
set_thumbnail | boolean | Make the first new image the thumbnail |
store_copy | boolean | Upload a copy to the shop's storage instead of linking the URL |
create_variant Create variant
Adds a variant to an existing product, e.g. a new size. 'options' must name every product option; new option values are added automatically.
| Parameter | Type | Description |
|---|---|---|
prices * | array | |
product_id * | string | |
allow_backorder | boolean | Allow selling when out of stock |
barcode | string | |
ean | string | |
location_id | string | Stock location for initial stock; defaults to the only one |
manage_inventory | boolean | Track stock (default true) |
options | object | Option title -> value, e.g. { Size: 'M', Color: 'Red' } |
sku | string | |
stock | integer | Initial stocked quantity at location_id (or the only location) |
title | string | Defaults to the option values, e.g. 'M / Red' |
upc | string | |
weight | number | Grams |
update_variant Update variant
Updates variant fields – title, SKU, barcodes, inventory tracking, backorders, weight, metadata. For prices use set_variant_price.
| Parameter | Type | Description |
|---|---|---|
product_id * | string | |
variant_id * | string | |
allow_backorder | boolean | Allow selling when out of stock |
barcode | string | |
ean | string | |
manage_inventory | boolean | Track stock (default true) |
metadata | object | Merged into existing metadata; an empty string deletes a key |
sku | string | |
title | string | |
upc | string | |
weight | number | Grams |
delete_variant Delete variant
DELETES one variant of a product. Irreversible – confirm with the user first. 'confirm' must equal the variant's SKU (or its title when it has no SKU). By default its inventory item is deleted too (only when nothing is reserved).
| Parameter | Type | Description |
|---|---|---|
confirm * | string | The variant's exact SKU, or title when it has no SKU |
product_id * | string | |
variant_id * | string | |
delete_inventory_items | boolean |
set_variant_price Set variant price
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.
| Parameter | Type | Description |
|---|---|---|
amount * | number | |
currency_code * | string | E.g. eur, usd |
product_id * | string | |
variant_id * | string |
list_catalog Catalog structure
Product categories (with parent, so the tree can be rebuilt), collections, tags and product types – with IDs for other tools.
| Parameter | Type | Description |
|---|---|---|
q | string | Full-text filter applied to every section |
save_category Create or update category
Without category_id creates a product category (name required); with category_id updates only the given fields. Can also add or remove products.
| Parameter | Type | Description |
|---|---|---|
add_products | array | Product IDs to add |
category_id | string | |
description | string | |
handle | string | |
is_active | boolean | Visible in the storefront (new categories default to inactive in Medusa) |
is_internal | boolean | Hidden from the storefront |
metadata | object | Merged into existing metadata; an empty string deletes a key |
name | string | |
parent_category_id | string | null | null moves it to the top level |
rank | integer | Position among siblings |
remove_products | array | Product IDs to remove |
delete_category Delete category
DELETES a product category (products stay, they just lose the category). Confirm with the user first.
| Parameter | Type | Description |
|---|---|---|
category_id * | string |
save_collection Create or update collection
Without collection_id creates a collection (title required); with collection_id updates it. Can add or remove products (a product belongs to at most one collection).
| Parameter | Type | Description |
|---|---|---|
add_products | array | Product IDs to add |
collection_id | string | |
handle | string | |
metadata | object | Merged into existing metadata; an empty string deletes a key |
remove_products | array | Product IDs to remove |
title | string |
delete_collection Delete collection
DELETES a collection (products stay, they just leave the collection). Confirm with the user first.
| Parameter | Type | Description |
|---|---|---|
collection_id * | string |
list_inventory Inventory levels
Inventory items with stock per location (stocked, reserved, available). With low_stock_threshold returns only items at or below the threshold.
| Parameter | Type | Description |
|---|---|---|
limit | integer | Number of records (max 200) |
location_id | string | Only this stock location |
low_stock_threshold | integer | Only return items whose available quantity is less than or equal to this value |
offset | integer | Records to skip (pagination) |
q | string | Full-text search – title, SKU |
sku | string | Exact SKU |
set_stock_level Set stock level
Sets the stocked quantity of an item at a location. Provide either an absolute 'stocked_quantity' or a relative 'adjust_by' (+/-). Identify the item by inventory_item_id or SKU. Without location_id the item's only location is used. If the item is not stocked at the given location yet, it is added there.
| Parameter | Type | Description |
|---|---|---|
adjust_by | integer | E.g. +10 when restocking, -2 when writing off |
inventory_item_id | string | |
location_id | string | |
sku | string | |
stocked_quantity | integer |
list_price_lists List price lists
Price lists – sales (temporary discounted prices) and overrides (e.g. B2B prices for a customer group). With price_list_id returns that list including all its prices.
| Parameter | Type | Description |
|---|---|---|
limit | integer | Number of records (max 200) |
offset | integer | Records to skip (pagination) |
price_list_id | string | |
q | string | |
status | array |
save_price_list Create or update price list
Without price_list_id creates a price list (title required); with price_list_id updates it. 'set_prices' adds or changes the price of a variant in a currency; 'remove_variants' drops variants from the list. type 'sale' shows the original price struck through, 'override' simply replaces it. Plain dates use the reporting timezone.
| Parameter | Type | Description |
|---|---|---|
customer_group_ids | Only for these customer groups; [] or null = everyone | |
description | string | |
ends_at | string | null | Inclusive, e.g. 2026-11-30; null removes |
price_list_id | string | |
remove_variants | array | Variant IDs whose prices are removed from the list |
set_prices | array | |
starts_at | string | null | E.g. 2026-11-27; null removes |
status | string | Default for new lists: active |
title | string | |
type | string | Default for new lists: sale |
delete_price_list Delete price list
DELETES a price list – its prices stop applying immediately. Confirm with the user first.
| Parameter | Type | Description |
|---|---|---|
price_list_id * | string |
list_promotions List promotions
Discount codes and automatic promotions with their value, conditions, usage and validity.
| Parameter | Type | Description |
|---|---|---|
code | string | Exact code |
limit | integer | Number of records (max 200) |
offset | integer | Records to skip (pagination) |
q | string | Search in codes |
create_promotion Create promotion
Creates a discount code (or an automatic promotion): percentage or fixed amount off the order, specific products, or shipping. Free shipping = applies_to 'shipping', percentage 100. Restricting to products/categories/collections makes it apply to those items only. Plain dates are interpreted in the reporting timezone.
| Parameter | Type | Description |
|---|---|---|
code * | string | The code customers enter, e.g. AUTUMN20 |
discount_type * | string | |
value * | number | Percent (20 = 20 %) or amount in major units |
allocation | string | 'across' (default) splits the discount over the eligible items; 'each' applies it to every unit up to max_quantity |
applies_to | string | Defaults to 'items' when restricted to products/categories/collections, otherwise 'order' |
category_ids | array | |
collection_ids | array | |
currency_code | string | Required for a fixed amount, e.g. czk |
customer_group_ids | array | Only for customers in these groups |
ends_at | string | Inclusive, e.g. 2026-11-30 |
extra_rules | array | Advanced eligibility conditions |
is_automatic | boolean | Applies without entering the code |
max_quantity | integer | Required with allocation 'each' |
product_ids | array | |
starts_at | string | E.g. 2026-11-01 |
status | string | |
usage_limit | integer | Total number of uses (not for automatic promotions) |
update_promotion Update promotion
Changes a promotion: activate/deactivate (status), rename the code, change the value, usage limit or validity dates. Identify it by promotion_id or code.
| Parameter | Type | Description |
|---|---|---|
code | string | Current code, to find the promotion |
ends_at | string | null | null removes the end date |
new_code | string | |
promotion_id | string | |
starts_at | string | null | null removes the start date |
status | string | |
usage_limit | null removes the limit | |
value | number |
delete_promotion Delete promotion
DELETES a promotion – the code stops working. To pause it, prefer update_promotion with status 'inactive'. Confirm with the user first. A campaign created for its dates (named after the code) is deleted too.
| Parameter | Type | Description |
|---|---|---|
code | string | |
promotion_id | string |
sales_report Sales report
Sales for a period: orders, revenue and net revenue after refunds, average order value, units, unique customers, change against the previous period (or last year), a day/week/month series, top products, countries and discount codes. Amounts are per currency; canceled and draft orders are excluded. Clients that support MCP Apps show it as an interactive dashboard.
| Parameter | Type | Description |
|---|---|---|
from * | string | From date, e.g. 2026-09-01 |
to * | string | To date (inclusive), e.g. 2026-09-30 |
compare | string | |
group_by | string | |
include | array | Extra breakdowns |
only_paid | boolean | Only count paid orders |
timezone | string | IANA timezone used for date boundaries and buckets |
top_n | integer | How many top products (and variants) to return |
customer_report Customer report
Customer analytics for a period: new vs returning customers and their revenue, repeat purchase rate, top customers, and lapsed customers (bought repeatedly, but not for lapsed_days) worth winning back.
| Parameter | Type | Description |
|---|---|---|
from * | string | From date, e.g. 2026-09-01 |
to * | string | To date (inclusive) |
lapsed_days | integer | |
timezone | string | |
top_n | integer |
inventory_forecast Inventory forecast
Restock planning: for every SKU compares recent sales velocity with available stock – days of cover, status (out_of_stock, reorder_now, reorder_soon, ok) and a suggested order quantity to cover lead time plus coverage_days. Also lists slow movers (stock without sales). Clients that support MCP Apps show it as an interactive table.
| Parameter | Type | Description |
|---|---|---|
coverage_days | integer | How many days the restock should cover |
days | integer | Length of the sales history window |
include_ok | boolean | Also list SKUs that need nothing |
lead_time_days | integer | Days until a new order arrives |
limit | integer | |
location_id | string | Only this stock location |
to | string | Last day of the sales window, YYYY-MM-DD (default today) |
bulk_update_prices Bulk update prices
Changes the base prices of many variants at once in one currency: by percent (+10 / -15), by an amount, or to a fixed price, with optional price-ending rounding. Targets products by IDs, SKUs, category, collection, tag, status or search. dry_run (default true) only previews the changes; repeat with dry_run false to apply. Prices with rules (customer groups, quantities) are kept. For temporary sales prefer save_price_list or create_promotion.
| Parameter | Type | Description |
|---|---|---|
currency_code * | string | |
add_amount | number | E.g. 20 or -20 (major units) |
all_products | boolean | Must be true to target the whole catalog without other filters |
category_id | string | |
collection_id | string | |
dry_run | boolean | |
percent | number | E.g. 10 = +10 %, -15 = -15 % |
product_ids | array | |
q | string | Full-text filter |
rounding | string | none = 2 decimals; integer; end_9 = nearest whole number ending in 9 (199, 249); end_90 / end_99 = nearest x.90 / x.99 |
set_amount | number | Set every selected price to this amount |
skus | array | Only these variants |
status | array | |
tag | string | Tag value |
bulk_set_stock Bulk set stock
Sets stock for many SKUs in one go – e.g. after a delivery or a stock-take. Each row has an absolute stocked_quantity or a relative adjust_by. Items not yet stocked at the location are added there. dry_run (default true) previews before → after; repeat with dry_run false to apply.
| Parameter | Type | Description |
|---|---|---|
items * | array | |
dry_run | boolean | |
location_id | string | Default location for rows without one |
bulk_update_products Bulk update products
Changes many products at once: status (publish / unpublish), categories, collection, tags, sales channels, discountable, shipping profile. Targets products by IDs, category, collection, tag, status or search. dry_run (default true) previews; repeat with dry_run false to apply.
| Parameter | Type | Description |
|---|---|---|
add_category_ids | array | |
add_sales_channel_ids | array | |
add_tags | array | Tag values; missing tags are created |
all_products | boolean | Must be true to target the whole catalog without other filters |
category_id | string | |
collection_id | string | |
dry_run | boolean | |
product_ids | array | |
q | string | Full-text filter |
remove_category_ids | array | |
remove_sales_channel_ids | array | |
remove_tags | array | |
set_collection_id | string | null | null removes products from their collection |
set_discountable | boolean | |
set_shipping_profile_id | string | |
set_status | string | |
status | array | |
tag | string | Tag value |
medusa_request Medusa Admin API request
Calls any Medusa v2 Admin API endpoint directly – for anything the other tools do not cover (e.g. /admin/reservations, /admin/order-edits, /admin/exchanges, /admin/tax-rates, /admin/shipping-options). Prefer the dedicated tools when one fits. Amounts are in major units. Use 'fields' in the query to choose fields: '+field' adds to the defaults, '*relation' expands a relation. POST creates or updates, DELETE deletes – confirm changes with the user first. Writes to api-keys, users and invites are blocked.
| Parameter | Type | Description |
|---|---|---|
path * | string | Path starting with /admin/, e.g. /admin/reservations |
body | object | JSON body for POST |
method | string | |
query | object | Query parameters; nested objects become a[b]=c |