Amba

Player Inventory

Track owned items and quantities per user with grant and consume operations.

The inventory system tracks what items each user owns, including quantities for consumable items.

Client API reference

MethodPathDescription
GET/client/inventoryGet current user's inventory
POST/client/inventory/:id/consumeUse a consumable item

Get inventory

GET /client/inventory
 
{
  "data": [
    { "catalog_item_id": "item_dark_theme", "item_key": "theme_dark", "quantity": 1, "item_type": "durable" },
    { "catalog_item_id": "item_extra_life", "item_key": "extra_life", "quantity": 3, "item_type": "consumable" }
  ]
}

MCP tools

ToolDescription
amba_grant_itemGrant an item directly to a user (bypasses purchase)
amba_get_user_inventoryView a user's inventory

Example: Grant starter items

Agent: "Give all new users a starter pack"

amba_grant_item({
  project_id: "proj_xxx",
  app_user_id: "user_xxx",
  catalog_item_id: "item_starter_theme",
  quantity: 1
})

Database tables

TablePurpose
user_inventoryPer-user item ownership with quantities
purchase_historyFull purchase and grant audit trail

On this page