Skip to main content
Glama

Mango Inventory

Check item availability

check_item_availability
Read-only

Check whether an item is currently available: status, who holds it, where it is, how many tickets are open on it, how many of its maintenance checks are overdue and how many active orders request it. Status defect or in_repair, an open ticket other than a maintenance check that is not yet due, overdueMaintenance > 0 or requestedInOrders > 0 each make assign_item answer requiresAcknowledgment when it sets a holder. For quantity-tracked items the result also carries totalQuantity and distribution: one row per stocked level, locations AND people holding stock, with { locationId, name, kind: location|person, quantity, available, reserved?, minStock?, isLow? }, the same row shape transfer_stock and adjust_stock return after a write. available = quantity minus what active orders reserved, floored at 0; isLow compares AVAILABLE against that level's threshold, so a full shelf with heavy reservations IS low. minStock and isLow appear together and only where a threshold exists: an absent isLow means no threshold is set there, not that the level is healthy. reserved is absent when 0; person rows carry neither (orders deliver to places, and person-held stock cannot carry a threshold). locationId is the id adjust_stock, set_min_stock and transfer_stock take. Units inside containers (a bag, a vehicle compartment) are not in distribution: they come under packed, one row per container and compartment { containerId, containerName, containerPath?, compartmentName?, quantity, effectiveLocationName?, effectiveHolderName? } (absent when none), and totalQuantity counts them. Packed units are moved in the app's stock section; transfer_stock and adjust_stock work on places and people only.

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": {
      "itemId": "<itemId>"
    },
    "name": "check_item_availability"
  }
}

Input Schema

NameRequiredDescriptionDefault
itemIdYesItem id

Output Schema

NameRequiredDescriptionDefault
nameNoItem name
itemIdNoItem id
packedNoUnits inside containers (a bag, a vehicle compartment) — quantity-tracked items only, absent when none. Not in distribution; their place follows the container
statusNoCondition (see search_items)
availableNoStatus available AND nobody currently holds it
openTicketsNoOpen tickets on this item
distributionNoPer-holder stock — quantity-tracked items only. One row per stocked level, locations AND people, each carrying its resource id so no search_resources lookup is needed.
totalQuantityNoPool total — quantity-tracked items only. Counts places, people AND units inside containers
currentHolderNameNoWho holds it now
requestedInOrdersNoActive orders that requested this item but have not picked it
overdueMaintenanceNoOverdue maintenance checks; with any, assign_item answers requiresAcknowledgment when it sets a holder
currentLocationNameNoWhere it is now

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • changedOutput schema / properties / distribution / items / properties / available / description
      Previous value: -"Freely usable stock: quantity minus reserved, floored at 0. Always present — this is the number to act on"New value: +"Freely usable stock: quantity minus reserved, floored at 0. Always present"
    • changedOutput schema / properties / distribution / items / properties / locationName / description
      Previous value: -"DEPRECATED — the same string as `name`, kept only for clients whose tool list froze before the rename. Read `name`"New value: +"DEPRECATED — the same string as `name`, kept only for clients whose tool list froze before the rename"
    • changedOutput schema / properties / overdueMaintenance / description
      Previous value: -"Overdue maintenance checks — assign_item will ask to confirm"New value: +"Overdue maintenance checks; with any, assign_item answers requiresAcknowledgment when it sets a holder"
  2. First observed

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, destructiveHint=false and openWorldHint=false, so the safety profile is covered. The description adds real behavioral meaning beyond that: which conditions cause assign_item to demand acknowledgment, that an absent isLow means no threshold rather than a healthy level, that reserved is omitted at 0, and that person rows cannot carry thresholds. It does not discuss permissions or size limits, but for a read tool this is well above the annotation baseline.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Purpose is front-loaded in the first clause, but the body is a single extremely dense run-on sentence that packs row-shape definitions, edge cases and cross-tool references into one block. Since an output schema exists, much of the field-by-field enumeration (locationId, name, kind, quantity, available, reserved, minStock, isLow) restates structured data instead of adding interpretation.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a one-parameter read tool with full annotation coverage and an output schema, the description leaves nothing an agent needs in order to call it or interpret the result. It even resolves the ambiguous cases (reservations lowering available, packed units excluded from distribution) that the schema alone would not convey.

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?

There is a single parameter with 100% schema coverage ('Item id'), so the schema already carries the parameter documentation and the baseline is 3. The description never elaborates on itemId itself—where to obtain it or how it relates to containerId or locationId inputs elsewhere; the locationId sentence describes an output field, not an input.

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 opening clause states a specific verb and resource ('Check whether an item is currently available') and immediately enumerates what the answer contains: status, holder, location, open tickets, overdue maintenance, active orders. It also distinguishes itself from siblings by explaining how its output feeds assign_item's requiresAcknowledgment and mirrors the row shape that transfer_stock and adjust_stock return.

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?

Usage is only implied: an agent can infer this is the read-side companion to assign_item and the stock-mutation tools. There is no explicit 'use this instead of get_item / inventory_overview' routing, and no stated precondition such as checking availability before assigning. The note that packed units are moved in the app's stock section is routing context for a different capability, not for choosing this tool.

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