set_relation
Record or remove spatial relationships between entities in the world model to establish topological links like on, inside, or next_to without changing entity poses.
Instructions
Record or remove a spatial relationship between two entities. Actions: add, remove. Relations: on, inside, next_to, above, below, near, contains, occluded_by, connected_to, facing, holding, part_of, custom. This mutates the relation graph only, not entity poses. Returns {ok, relation}. Use set_relation instead of update_entity when establishing topological links (on, inside, contains) rather than setting entity coordinates.
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": {
"source_id": "<source_id>",
"relation": "<relation>",
"target_id": "<target_id>"
},
"name": "set_relation"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| action | No | Action to perform (default: add) | |
| offset | No | Relative offset vector from source to target | |
| project | No | Optional project identifier | |
| distance | No | Optional measured distance between entities | |
| metadata | No | Additional relation metadata | |
| relation | Yes | Type of spatial relation | |
| source_id | Yes | Source entity ID | |
| target_id | Yes | Target entity ID | |
| bidirectional | No | If true, automatically sets inverse relationship on target |