Skip to main content
Glama

stock_item_update

Idempotent

Update a stock_item you own (optionally compare-and-set via expected_updated_at).

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": {
      "id": "<id>"
    },
    "name": "stock_item_update"
  }
}

Input Schema

NameRequiredDescriptionDefault
idYesThe stock_item id.
nameNo
unitNo
notesNo
categoryNo
quantityNo
is_activeNo
expiry_dateNo
sell_price_centsNo
cost_per_unit_centsNo
expected_updated_atNoOptional compare-and-set guard: the updated_at you last read. Mismatch returns CONFLICT with the current value.
low_stock_thresholdNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

B3.1/5.0
Behavior3/5

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

Annotations already declare non-destructive, idempotent, non-readOnly behavior; the description adds the ownership authorization constraint and the optimistic-concurrency option, which is genuine value. However, it never says whether this is a partial/merge update (unspecified fields left alone) or what happens to is_active/quantity semantics, which matters for a 12-field mutation.

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?

A single front-loaded sentence with no filler; the parenthetical correctly attaches the concurrency option to the main action. It is perhaps too terse for the parameter surface, but no sentence is wasted.

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?

A 12-parameter mutation tool with no output schema and near-zero schema descriptions should carry more of the burden: field semantics, partial-update behavior, and conflict handling are absent. Only the ownership check and CAS option are covered.

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 17% (2 of 12 params), so the description must compensate and does not. It mentions expected_updated_at but says nothing about the ambiguous fields, notably is_active typed as integer, expiry_date as a free-form string, or the *_cents pricing units.

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?

States a specific verb and resource ('Update a stock_item') plus a scope constraint ('you own'), which distinguishes it from stock_item_create/delete/read. It does not differentiate from stock_item_adjust, which also mutates stock state, so a sibling distinction is missing.

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?

Ownership requirement and the optional compare-and-set path are implied, but there is no guidance on when to choose this tool over stock_item_adjust (quantity/count changes) or stock_item_read+update flows. The CONFLICT behavior is only hinted at via 'optionally compare-and-set'.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources