Obtain an Entity Session Token for the player via PlayFab authentication (LoginWithCustomID or equivalent)
POST to https://[titleId].playfabapi.com/Inventory/AddInventoryItems with the player EntityKey, a list of items (each with ItemId and Amount), and an optional StackId for targeting specific stacks
Handle the idempotent NewStackValues parameter when the item amount should initialise a new stack rather than merge into an existing one
Check the response TransactionIds array to correlate grants with audit logs; a single inventory is capped at 10,000 stacks
Call this only from a trusted server context; never expose AddInventoryItems to unauthenticated clients
Known gotchas
AddInventoryItems is a title-admin-level call — calling it from the game client exposes your title secret key; always proxy through a server or CloudScript/Azure Function
Display Properties can only be set on a new stack creation via NewStackValues; updates to existing stacks require UpdateInventoryItems instead
Stack size is uncapped but the per-collection stack count limit applies; exceeding it returns an error rather than silently truncating
Give your agent this knowledge — and 200+ more routes
One MCP install gives any agent live access to the full route map, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp