Skip to main content
Glama

correct_stock

Override an item's stock estimate with a user-reported count or out-of-stock status, resetting the estimate clock for accurate inventory tracking. Record the purchase first.

Instructions

Ground truth from the user: what they can actually see. quantity=0 means "we're out". A correction outranks the interval model and resets the estimate's clock, so this is the one call that makes an estimate right rather than merely plausible.

Use it whenever the user volunteers stock in conversation ("we're out of milk", "still got two bags of rice"). The item must already be known — stock is inferred from purchases, so record the receipt first.

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": {
      "item": "<item>",
      "quantity": "<quantity>"
    },
    "name": "correct_stock"
  }
}

Input Schema

NameRequiredDescriptionDefault
itemYes
unitNo
quantityYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.2.0

TDQS

A4.3/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does disclose real behavior: the correction outranks the interval model and resets the estimate's clock, i.e. it changes future inference, not just a stored number. What it omits is the write's surface — whether it emits an event, what it returns, and what happens if the item is unknown despite the stated precondition.

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?

Two tight paragraphs: the core semantics first, then the trigger and precondition. Some editorial phrasing ("the one call that makes an estimate right rather than merely plausible") is flavor rather than instruction, but it is short enough not to crowd out the actionable content.

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 no annotations and no output schema, the description covers purpose, precedence over existing estimates, the zero-case, and a prerequisite. The remaining gaps are the undocumented `unit` parameter and the absence of any statement about the result or failure mode if the item truly isn't known.

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 0%, so the description must compensate and only partly does: it pins down `quantity` (numeric stock level, 0 = out, examples like "two bags") and constrains `item` to an already-known entity. The `unit` parameter is never mentioned, and there is no guidance on whether quantity replaces or adds to the current estimate.

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?

States a specific verb+resource: overwrite the stock estimate with user-reported ground truth, and explicitly contrasts it with the interval model that otherwise drives estimates. It also defines the semantic edge case (`quantity=0` means "we're out"), so an agent can tell this apart from consume_items, discard_item, or get_stock without opening a schema.

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?

Gives an explicit trigger ("whenever the user volunteers stock in conversation") with two concrete utterances, plus a hard precondition: the item must already exist, so the receipt must be recorded first. That is a when-to-use plus a when-not-yet rule, which is more than most definitions provide.

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