Skip to main content
Glama

Mango Inventory

Pack item into container

pack_item
DestructiveIdempotent

Pack an item into a container: a case, cart, box or vehicle that is itself an inventory item (e.g. the voltmeter into the experiment case). While packed, the item's location and holder FOLLOW the container: one assign_item call on the container moves or lends the whole kit, and item reads show the followed position as effectiveLocation/effectiveHolder. A container can have named compartments (a vehicle's «Fahrerhaus», «GR1»…«GR7»; get_item on the container lists them as compartments): compartment takes a name (case-insensitive) or an id; an unknown name is refused with unknownCompartment and the container's validNames. compartment: null puts the item directly in the container, outside any compartment (also from a compartment of the same container). Without compartment, re-packing into the same container keeps the item's compartment, and packing into another container puts it directly in it. Packing clears the item's own current location and holder, so an item someone holds is taken from them. Both sides must be serialized items in this organization: quantity-tracked stock goes into a container from the item's stock section in the app (it reads back as packed on get_item / check_item_availability). Containers nest up to three levels (compartments are not a level). Refused: lost/retired items, items reserved for an active order (also a container that holds such an item, since packing moves its contents too) and containers switched to «cannot hold items». Requires the manager role. Idempotent: re-packing into the same container and compartment changes nothing. unpack_item reverses it.

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>",
      "containerId": "<containerId>"
    },
    "name": "pack_item"
  }
}

Input Schema

NameRequiredDescriptionDefault
itemIdYesItem id to pack
compartmentNoCompartment of the container, by name (case-insensitive) or id; null = directly in the container, outside any compartment. Absent = the current compartment (same container) or directly in another container
containerIdYesItem id of the container to pack it into

Output Schema

NameRequiredDescriptionDefault
idNoItem id
nameNoItem name
statusNoCondition: available | in_repair | defect | lost | retired ("available" means not defect/lost/retired — the item may still be borrowed)
webUrlNoLink to this item in the web app, for a person to open. Absent when the deployment has no public address configured
isDraftNoPresent and true only for an unfinished draft capture
modelIdNoThe item's model — pass it as create_order lines[].modelId to order any instance of this model
categoryNoCategory name
quantityNoHow many this row stands for — only on quantity-tracked pools. To count a pool, SUM this; to count serialized items, count rows
containerNoThe container this item is packed into, if any
modelNameNoThe model's name
compartmentNoThe compartment of that container the item sits in (absent = directly in the container)
descriptionNoItem description
primaryCodeNoThe code printed on the item's asset tag — how a human tells two identical models apart. Absent when no code is attached
homeLocationNoWhere the item belongs
trackingModeNo"quantity" for a stock pool counted by amount. Absent = a serialized item, i.e. this row IS one physical thing
contentsCountNoDirect contents count — containers only
currentHolderNoPerson currently holding it
currentLocationNoWhere the item is now
effectiveHolderNoHolder followed through the container chain
effectiveLocationNoLocation followed through the container chain
responsiblePersonNoPerson responsible

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedInput schema / properties / compartment / description
      Previous value: -"Compartment of the container, by name (case-insensitive) or id; null = directly in the container, outside any compartment. Omit to keep the current compartment (same container) or to put it directly in another container"New value: +"Compartment of the container, by name (case-insensitive) or id; null = directly in the container, outside any compartment. Absent = the current compartment (same container) or directly in another container"
    • changedOutput schema / properties / webUrl / description
      Previous value: -"Link to this item in the web app — give it to your user so they can look at the record themselves. Absent when the deployment has no public address configured"New value: +"Link to this item in the web app, for a person to open. Absent when the deployment has no public address configured"
  2. First observed

TDQS

A4.9/5.0
Behavior5/5

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

Goes well beyond the annotations: it discloses that packing clears the item's own location and holder (so an item someone holds is taken from them), that the item's location/holder then follow the container via effectiveLocation/effectiveHolder, the three-level nesting limit, and that a container holding a reserved item is also refused because packing moves its contents. The stated idempotency matches idempotentHint=true and the mutation/clear semantics are consistent with destructiveHint=true.

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?

Content is front-loaded — the core action and its location-following consequence come first, then compartment rules, then refusals. Every sentence carries a rule, but the single dense paragraph packs multiple distinct policies together, so it is harder to scan than it could be; splitting compartment semantics from refusal rules would improve it without losing information.

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 destructive, permission-gated mutation with three parameters, the description covers prerequisites (manager role, both items serialized), side effects on holder/location, compartment resolution and error names, nesting limits, and the reversal tool. Return values are covered by the existing output schema, so nothing essential is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Even at 100% schema coverage, the description adds substantial meaning: `compartment` accepts a name (case-insensitive) or id, `null` means directly in the container (including when moving out of a compartment of the same container), and absent means keep the current compartment for the same container or go direct for a different one. It also constrains itemId/containerId to serialized items in the same organization and cites the `unknownCompartment`/`validNames` error contract.

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?

Opens with a specific verb and resource ('Pack an item into a container') and immediately defines the container as itself an inventory item, with a concrete example. The sibling relationship is explicit: 'unpack_item reverses it', and the stock-section alternative for quantity-tracked items is named, so an agent can route correctly without opening another schema.

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

Usage Guidelines5/5

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

Gives explicit when-to-use and when-not-to-use: quantity-tracked stock must be packed 'from the item's stock section in the app' rather than this tool, and unpack_item is the inverse. Refusal conditions (lost/retired, reserved for an active order, container marked cannot-hold-items) and the manager-role requirement are spelled out, which is exactly the guidance an agent needs before calling.

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