Skip to main content
Glama

create_product

Add a new product to the grocery catalog for items never stocked before. Creates the product record, flags possible duplicate names, and leaves stock entries for a separate step.

Instructions

Add a new product to the catalog, for something never stocked before.

This only creates the product record — call add_stock next to record an amount on hand. Refuses rather than guessing if the name already matches an existing product; use add_stock for those instead. A near-duplicate name (e.g. "Applesauce" vs an existing "Apple Sauce") does not block creation, but comes back in possible_duplicates — check that list before assuming the new product is really new.

Args: name: Product name. See get_conventions for any naming rule this pantry follows. category: Product group name, exact match. See get_conventions. location_id: Usual storage location — either its id or its exact name. unit: Stock/purchase/consume unit name, e.g. "Piece", "Pack", "Gram". Must already exist in Grocy; see get_conventions. description: Short description identifying the exact item — brand, size, variant. min_stock: Optional minimum to keep on hand, in the same unit. Setting it is what makes below_min_stock and add_missing_to_shopping_list work for this product.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYes
unitNoPiece
categoryYes
min_stockNo
descriptionNo
location_idYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A5/5.0
Behavior5/5

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

With no annotations, the description carries the full behavioral burden and does so thoroughly. It discloses duplicate-name refusal, non-blocking near-duplicate behavior with possible_duplicates, and the downstream effect of setting min_stock on below_min_stock and add_missing_to_shopping_list. This goes well beyond a generic creation statement.

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?

The description is appropriately detailed for a six-parameter tool with no schema descriptions, and every sentence carries information. The core scoping statement is front-loaded first, followed by duplicate behavior, then the parameter list with meaningful guidance.

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

Completeness5/5

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

Given no annotations and no output schema, this description gives an agent everything needed to invoke the tool correctly: what it does, what it does not do, how duplicates are handled, which sibling to call next, and the semantics of every parameter. The mention of possible_duplicates also tells the agent what feedback to inspect in the result.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate for all six parameters, and it does. It explains category as exact match, location_id as id or exact name, unit as an existing Grocy unit, and min_stock's functional meaning in the same unit. These are constraints the JSON schema alone does not convey.

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 the exact action in the first sentence: 'Add a new product to the catalog, for something never stocked before.' It further distinguishes the tool from add_stock by saying 'This only creates the product record,' making it clear this is a creation-only operation rather than a stock adjustment.

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?

The description explicitly tells the agent to call add_stock next to record quantity on hand, and to use add_stock instead when a product name already exists. The near-duplicate warning also gives the agent a concrete follow-up action: check possible_duplicates before assuming the product is new.

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