# Container.setItem

Sets the number of items stacked in a given container slot.

**Kind:** Function

**Environments:** Game

## Game

``` { .lua .api-signature }
container:setItem( slot, itemUuid, quantity, instance? )
```

[Open the full Game reference](../Game-Script-Environment/Userdata/Container.md#setitem)

**Availability:** Server only

**Parameters:**

| Name | Type | Description |
| --- | --- | --- |
| `container` | [Container](../Game-Script-Environment/Userdata/Container.md) | The container. |
| `slot` | integer | The slot. |
| `itemUuid` | [Uuid](../Game-Script-Environment/Userdata/Uuid.md) | The uuid of the item. |
| `quantity` | integer | The number of items. |
| `instance` *(optional)* | integer | The instance id, if the item is a tool. (Optional) |

**Returns:**

| Type | Description |
| --- | --- |
| boolean | Indicates if the action is possible. |
