Skip to main content
Glama

edit_stock_entry

Correct a single stock entry's best-before date, location, or amount. Use when one specific batch is wrong, leaving other details unchanged.

Instructions

Fix one stock entry: its date, its location, or its amount.

For correcting a best-before date that was estimated wrong, or a batch filed on the wrong shelf. Get the entry_id from list_stock_entries. Only the arguments given are changed; the rest of the entry is preserved.

Args: entry_id: From list_stock_entries. best_before_date: YYYY-MM-DD. location_id: Either an id or an exact location name. amount: New amount for this entry, in the product's stock unit. Prefer correct_stock for "the total is wrong" — this is for when one specific batch is wrong.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
amountNo
entry_idYes
location_idNo
best_before_dateNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.4/5.0
Behavior3/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 only provided arguments are changed and the rest of the entry is preserved, which is useful. However, it does not mention potential error cases (e.g., non-existent entry), whether the operation is irreversible, or what the response looks like. For a mutation tool this is a moderate gap, but the core behavior is communicated.

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 slightly longer than necessary but every sentence earns its place. It front-loads the purpose, then gives usage context and parameter details in a logical order. The only minor inefficiency is the arg list formatting, but it remains clear and scannable.

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?

Given no output schema and no annotations, the description covers the essential aspects: what the tool does, when to use it, how to source the required identifier, and parameter formats. It omits return-value details and error handling, but those are less critical for a mutation tool. Overall it is sufficient for an agent to call it correctly.

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?

The schema has zero description coverage, so the description fully compensates. It explains each parameter: `entry_id` is sourced from `list_stock_entries`, `best_before_date` uses YYYY-MM-DD format, `location_id` accepts either an id or an exact name, and `amount` is in the product's stock unit. This adds meaning far beyond the bare schema types.

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 opens with a specific verb and resource: 'Fix one stock entry' and immediately enumerates the exact fields it can modify (date, location, amount). It also distinguishes itself from the sibling `correct_stock` by stating this tool targets a single batch rather than a total. This makes the purpose unambiguous and clearly differentiated.

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 gives explicit when-to-use guidance: correcting an estimated best-before date or a misplaced batch. It also states when NOT to use it, recommending `correct_stock` for total-amount corrections, and tells the agent to obtain `entry_id` from `list_stock_entries`. This leaves no ambiguity about tool selection.

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