Skip to main content
Glama

Create or update category

loyverse_upsert_category
Idempotent

Create a new category or rename an existing one by passing its id, keeping your product catalogue organized.

Instructions

Create a category, or rename one by passing its id.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idNoOmit to create.
nameYes
colorNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.1

TDQS

A3.7/5.0
Behavior3/5

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

Annotations already carry the safety profile (readOnlyHint=false, destructiveHint=false, idempotentHint=true), lowering the bar. The description adds genuine context by disclosing the dual behavior — id triggers rename, absence triggers create — but leaves edge cases unaddressed, such as whether color can also be updated alongside a rename and what happens to items already linked to a renamed category.

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?

A single 11-word sentence that front-loads the primary action ('Create a category') before the alternative rename mode. Every word earns its place, with no filler, restatement of the title, or schema duplication.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple 3-parameter tool with no output schema and no nesting, the description adequately covers the two core operations an agent needs to call it. It falls short on the color parameter's semantics, whether color updates are possible in rename mode, and what the operation returns, though the tool's simplicity keeps these gaps moderate.

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% (only id has a description), so the description must compensate, and it partially does: 'rename one by passing its id' clarifies that id selects an existing category and that name is the replacement value. However, color has no description in either the schema or the tool description, leaving its role and whether it combines with id entirely to inference from the enum.

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 uses specific verbs bound to a specific resource: 'Create a category, or rename one by passing its id.' It crisply conveys the two upsert modes, which is exactly the detail an agent needs to tell this from loyverse_list_categories (reading) and from the other loyverse_upsert_* siblings (different entities), even without naming them.

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 rather than stated: call this to create a new category or rename an existing one, with id presence selecting the mode. The description never names alternatives or exclusions — it does not point to loyverse_list_categories for reading or loyverse_delete for removal — so an agent must infer the routing decision from the verb and resource.

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