Skip to main content
Glama

grocy_stock_add

Add a specified amount of a product to stock using its product ID or barcode, with an optional dry-run preview before confirming the write.

Instructions

Add amount of a product to stock. POST /api/stock/products/{productId}/add or the by-barcode path. Provide product_id or barcode. Omit confirm for a dry-run.

Input Schema

NameRequiredDescriptionDefault
noteNo
priceNo
amountYes
barcodeNoProduct barcode. Provide this or product_id.
confirmNoSet to the boolean true to execute the write. Omit this field for a dry-run preview. false and the string true are rejected.
product_idNoProduct id. Provide this or barcode.
location_idNo
best_before_dateNo
stock_label_typeNo
transaction_typeNo
shopping_location_idNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.3/5.0
Behavior4/5

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

Annotations already declare a non-read-only, non-idempotent, non-destructive write. The description adds valuable behavior beyond the annotations by disclosing the dry-run preview mechanism: omit confirm to preview, include confirm to execute. It still omits permission requirements, side effects on stock history, and whether dry-run output is returned.

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 description is short and front-loaded, leading with the core action. The endpoint detail is somewhat implementation-focused, but it does support the by-barcode path explanation. No sentence is bloated.

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

Completeness2/5

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

This is a mutation tool with 11 parameters, no output schema, and only partial schema descriptions. The description omits key operational context such as amount semantics, stock effects, transaction_type behavior, and what the dry-run returns. It is not complete enough for an agent to invoke confidently beyond the simplest case.

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

Parameters2/5

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

Schema description coverage is only 27% across 11 parameters. The description explains the product_id/barcode alternative and confirm dry-run behavior, but it leaves most parameters undocumented: amount units, price, note, location_id, best_before_date, transaction_type, stock_label_type, and shopping_location_id. It does not compensate for the low schema coverage.

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?

The description states a specific verb and resource: 'Add amount of a product to stock.' It also names the underlying endpoint and the product_id/barcode selection, making the operation distinguishable from sibling stock operations like consume or transfer. However, it does not explicitly contrast with those siblings.

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?

It gives an important usage rule: 'Omit confirm for a dry-run.' It also says to provide product_id or barcode, but it does not say when to use this tool versus alternatives such as grocy_stock_consume, grocy_stock_transfer, or grocy_stock_inventory. Usage is implied rather than explicitly guided.

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