Skip to main content
Glama
trhonpavel
by trhonpavel

Create or update customer group

save_customer_group
Idempotent

Create or rename a customer group, then add or remove customers from it via the Medusa Admin API.

Instructions

Without group_id creates a group (name required); with group_id renames it. Can add/remove customers.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameNo
group_idNo
metadataNoMerged into existing metadata; an empty string deletes a key
add_customersNoCustomer IDs to add
remove_customersNoCustomer IDs to remove

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.3.0

TDQS

A3.7/5.0
Behavior3/5

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

Annotations already cover the safety profile (readOnly=false, idempotent=true, destructive=false, openWorld=true), so the bar is lower. The description usefully adds that behavior branches on group_id and that members can be added/removed, but it does not disclose permission requirements, what happens to membership on rename, or whether removing customers has side effects.

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?

Two short sentences, zero filler, with the mode-switching rule front-loaded before the secondary capability. Every clause earns its place.

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 5-parameter, no-required-params mutation tool with no output schema, the description covers the critical decision logic (create vs update, name requirement). It falls short only on permissions, error/partial-update behavior, and the metadata merge semantics, which the schema partially covers.

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 60%, and the description compensates by tying group_id to the update path and clarifying that name is only required in the create path. add/remove customers are described loosely ('Can add/remove customers') while metadata is left entirely to its schema description.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb+resource (create/rename a customer group) and distinguishes its two modes via the presence or absence of group_id. It is less explicit about how it differs from siblings like save_customer or list_customer_groups, but the create-vs-update framing is clear.

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?

The description implies when each mode applies (no group_id = create, group_id = rename), which is genuinely useful, but it never names alternatives or states prerequisites/exclusions against sibling tools such as save_customer or delete_customer_group.

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