Skip to main content
Glama

GymFlexa Gym Management

Update a stock quantity

set_inventory_quantity
DestructiveIdempotent

Use this when someone asks to correct or update how much of a stock item the gym 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

A4.2/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=false, destructiveHint=true, and idempotentHint=true, so the safety profile is largely covered. The description still adds real value beyond that: it discloses the return shape (previous and new quantity) and states the set-versus-adjust semantics ('the number given replaces the stored one'), which prevents a common off-by-delta error. The stale-edit refusal behavior exists but is only documented in the schema field, not here.

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 with the use condition front-loaded, then the result, then the exclusion — no filler, no restatement of the tool name.

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?

An output schema exists, so return-value explanation is not strictly required, and the description nonetheless covers the outcome. For a destructive mutation it is nearly complete; the only omission is that a mismatched expectedLastEditTime causes a refusal, which an agent must read from the schema field rather than the description.

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 (including the optimistic-concurrency expectedLastEditTime) are already documented at the field level. The description echoes the replace semantics of `quantity` but adds no format, unit, or reconciliation guidance beyond the schema. Baseline 3 is appropriate.

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 names a specific operation on a specific resource ('correct or update how much of a stock item the gym has') and adds an explicit negative boundary ('Not for adding a new stock item'), which separates it from creation flows. Combined with the name and title, an agent can tell exactly what this does without opening the schema.

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?

It gives a clear trigger condition ('when someone asks to correct or update') and an exclusion ('Not for adding a new stock item'). It stops short of naming the sibling/alternative to use for the excluded case (e.g., a create-inventory tool or list_inventory_items, which is only referenced inside the schema), so the routing is clear but not fully closed.

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