Skip to main content
Glama

DodoDentist Dental Clinic

Update a stock quantity

set_inventory_quantity
DestructiveIdempotent

Use this when someone asks to correct or update how much of a stock item the practice has. Returns the item with its previous and new quantity; the number given replaces the stored one. Not for adding a new stock item.

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": {
      "inventoryItemId": "<inventoryItemId>",
      "quantity": "<quantity>",
      "expectedLastEditTime": "<expectedLastEditTime>"
    },
    "name": "set_inventory_quantity"
  }
}

Input Schema

NameRequiredDescriptionDefault
quantityYesThe quantity now in stock, in the item unit. It replaces the stored quantity; work out the total first when the user gives a change.
inventoryItemIdYesId of the stock item, from list_inventory_items.
expectedLastEditTimeYesThe lastEditTime from list_inventory_items. An item changed since then is refused.

Output Schema

NameRequiredDescriptionDefault
itemYes
statusYes
previousQuantityYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true, idempotentHint=true and readOnlyHint=false, so the safety profile is covered. The description adds genuine behavioral context beyond that: it discloses that the response contains the item with its previous and new quantity, and it clarifies set-semantics ('the number given replaces the stored one'). It does not mention the stale-write refusal, but that is documented in the expectedLastEditTime parameter.

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?

Three short sentences, front-loaded with the triggering situation before semantics and exclusion. Nothing is wasted, though the return-value sentence is arguably redundant given an output schema exists.

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 full schema coverage, annotations, and an output schema, the description covers the necessary ground: when to use it, that it overwrites rather than increments, and what comes back. Only the stale-timestamp failure mode is left to the schema, which is a minor gap rather than a blocking one.

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 description coverage is 100%, so the schema already carries id format, quantity range, and the optimistic-concurrency meaning of expectedLastEditTime. The description only restates replacement semantics ('the number given replaces the stored one'), which the quantity parameter description also says - baseline 3 applies.

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 names a specific verb and resource - correcting/updating the stored quantity of a stock item - which an agent can map directly to set_inventory_quantity. It also rules out scope ('Not for adding a new stock item'), though no sibling tool actually creates inventory items, so the differentiation is against an absent tool rather than a real sibling.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

'Use this when someone asks to correct or update how much of a stock item the practice has' gives a concrete triggering condition, and the final sentence supplies an explicit exclusion. There is no pointer to list_inventory_items for obtaining the id and lastEditTime, but the schema's parameter descriptions already make that connection.

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