Add bots
bots_addAdds a specified number of bots to the loaded server realm; set maxplayers above 1 for free slots and re-add them after map loads.
Instructions
Adds n bots in the server realm (player.CreateNextBot), named _. Bots need free player slots: in singleplayer (map_load maxplayers 1) there are none, so load the map with e.g. maxplayers: 4 first; otherwise error no_slots. Bots do not survive a map load (map_load removes them: add them again after it; checked live). Result: {added: [entity summaries], count}. Needs a loaded map (map_load): the server and client realms do not exist at the main menu.
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": {
"n": "<n>"
},
"name": "bots_add"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| n | Yes | Number of bots. | |
| name | No | Name prefix (default mcpbot). | |
| instance | No | Optional. Instance identifier (see instances_list). If present and different from the local instance, the call is relayed by the coordinator to that instance. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| next | No | ||
| note | No | ||
| added | Yes | ||
| count | Yes | ||
| warning | No | ||
| next_call | No | ||
| answered_by | No | ||
| truncated_note | No | ||
| version_warning | No |