add_entity
Adds a point entity (light, monster, item) to a map file and triggers a live reload in TrenchBroom.
Instructions
Add a point entity (e.g. a light, monster, item). Writes the file; TrenchBroom-HL reloads it automatically, but asks first - and defaults to KEEPING the editor version - if the document has unsaved edits.
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": {
"map_path": "<map_path>",
"classname": "<classname>"
},
"name": "add_entity"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| origin | No | Position [x y z]; omitted for non-positional entities | |
| map_path | Yes | Absolute path to the .map file | |
| classname | Yes | Entity class, e.g. "light" or "info_player_start" | |
| properties | No | Additional key/value properties |