Skip to main content
Glama

correct_stock

Set a product's stock to the amount actually counted on the shelf, correcting drift from unrecorded usage or duplicate entries. Adjusts inventory up or down to match reality.

Instructions

Set stock to the amount actually counted on the shelf.

This is the "I looked, and there are three" fix, for when the tracked amount has drifted from reality — someone used something without recording it, or a purchase was entered twice. It books the difference either way, so it can correct upward as well as down. To record ordinary use, prefer consume_product; to record a purchase, prefer add_stock.

Args: product: Product name, description fragment, or barcode. actual_amount: The amount really there, in the product's stock unit. Zero is allowed and clears the product's stock. best_before_date: YYYY-MM-DD. Required when correcting upward, since the extra stock is a new entry and needs a date. location_id: Where the corrected stock is, if not the usual spot.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
productYes
location_idNo
actual_amountYes
best_before_dateNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.8/5.0
Behavior4/5

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

With no annotations provided, the description carries the full burden. It discloses that it books the difference in either direction, allows upward/downward correction, and that zero clears stock entirely. It also explains the best_before_date requirement for upward corrections. While it doesn't mention potential side effects like transaction logs or permission requirements, the core behavior is well explained. Minor gap but solid for a stock adjustment tool.

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?

Well-structured with a punchy opening, a helpful analogy, clear alternative routing, and a formatted parameter list. Every sentence earns its place, no fluff, and the most critical information (purpose, correction behavior, alternatives) is front-loaded before the parameter details.

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?

For a 4-parameter tool with no output schema and no annotations, the description is remarkably complete. It covers when to use, what it does, all parameter semantics, edge cases (zero, best-before requirement), and directs to alternatives. An agent would have everything needed to call this correctly without external help.

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%, but the description compensates fully. Each parameter gets meaningful explanation: product accepts name, fragment, or barcode; actual_amount specifies the stock unit and zero-clears behavior; best_before_date is format-specified and its required condition is explained; location_id clarifies its default semantics. This goes far beyond the bare type information in the schema.

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 first sentence 'Set stock to the amount actually counted on the shelf' is a precise verb+resource+scope statement. It clearly distinguishes from siblings by naming alternatives (consume_product, add_stock) for ordinary use and purchases, and its 'I looked, and there are three' analogy makes the purpose unmistakable.

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?

Explicitly states when to use: when the tracked amount has drifted from reality, with concrete examples (unrecorded use, double entry). It also gives clear when-not-to-use guidance by telling the agent to prefer consume_product for ordinary use and add_stock for purchases. No ambiguity remains.

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