Skip to main content
Glama

DoctoFam Medical 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 clinic has. Returns the item with its previous and new quantity; the number given replaces the stored one. Not for adding a new stock item.

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.8/5.0
Behavior3/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 carried by structured data. The description adds useful semantics that the write is a replacement rather than an increment and that previous/new quantity are returned, but it does not cover the concurrency-refusal behavior (only the schema's expectedLastEditTime field does).

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?

Three short sentences, front-loaded with the trigger and the replacement semantics, with the exclusion at the end. No filler or repetition beyond the useful restatement that the value replaces rather than adjusts the stored quantity.

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?

Output schema exists, so return values need not be explained, yet the description still names them helpfully. For a three-parameter mutation with full annotation and schema coverage, this is close to complete; the only minor gap is not warning that a stale expectedLastEditTime causes rejection, which the schema covers on its own.

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 all three parameters are fully documented in the schema, including the 'work out the total first' derivation and the stale-edit refusal. The description only echoes the replacement semantics for quantity, adding little beyond structured fields; baseline 3 is appropriate.

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 (correct/update) and resource (quantity of a stock item in the clinic), and adds a scope exclusion ('Not for adding a new stock item'). It is unambiguous, though it does not name a real sibling tool (there is no create-inventory sibling in the list), so the differentiation is by concept rather than by tool name.

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?

Gives an explicit trigger ('Use this when someone asks to correct or update how much of a stock item the clinic has') and one explicit exclusion (creating a new stock item). It does not say what to do instead when the item is unknown or missing, which would be needed for a 5.

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