Skip to main content
Glama

reeflip

Save a category with its products

save_category

Makes a category, or with id changes that one, so that it has name and exactly product_ids, in that order. Send the whole list: products left out leave the category, though they stay products. To add or move one, read the category's products in order with list_category_products and send them back with the change. Two categories never share a name (category_name_taken), and a product that isn't the business's gets product_not_found.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "name": "<name>",
      "product_ids": "<product_ids>"
    },
    "name": "save_category"
  }
}

Input Schema

NameRequiredDescriptionDefault
idNoThe category to change; leave it out to make one.
nameYesThe category's name.
product_idsYesEvery product the category has, in order; an empty list empties it.

Output Schema

NameRequiredDescriptionDefault
idYes
nameYes
created_atYes
updated_atYes
product_countYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.5/5.0
Behavior4/5

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

Annotations declare a non-read-only, non-idempotent, non-destructive write, and the description adds the crucial behavioral detail those hints cannot convey: omitting a product silently removes it from the category, so this is a full replace of the association list. It also discloses uniqueness and ownership constraints that trigger errors. The one gap is that the tone understates the removal effect relative to `destructiveHint: false` – products are unlinked rather than deleted, which the description clarifies ('they stay products'), so it is a useful caveat rather than a contradiction.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The definition is dense and front-loaded, leading with the create/update distinction before the replace semantics and error cases. The opening clause is slightly convoluted ('changes that one, so that it has `name` and exactly `product_ids`, in that order'), but nothing is filler and every sentence carries operational information.

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 three-parameter mutation with full schema coverage and an output schema, the description covers what matters: replacement semantics, ordering, the read-modify-write loop, and both error conditions. No return-value explanation is needed since an output schema exists. The only shortfall is a missing note on size limits or ordering of operations when names change, but that is minor.

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 already 100%, so the baseline is 3, but the description adds meaning beyond the schema by stressing that `product_ids` order is significant and that the full list must be sent each time – semantics the schema cannot express. It also reinforces that an empty list empties the category and that `id` switches the operation from create to update.

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 specific verb and resource with upsert semantics spelled out: it makes a category, or with `id` changes that one. It also names the ordered product list as the payload, so an agent knows this is a full-replacement write rather than an incremental edit. It is clearly distinguishable from read tools like `list_category_products`, which it cites only as a prerequisite step.

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

Usage Guidelines5/5

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

It gives explicit when-to-use guidance: leave `id` out to create, include it to change, and send the whole product list. For the add/move case it prescribes a concrete workflow: read the current order with `list_category_products`, then resend with the change. It also documents the two failure modes (`category_name_taken`, `product_not_found`), which is exactly the kind of guidance that prevents wrong calls.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources