Put many components into an Entity
r3_entity_assignPut many components of a project into one Entity in a single change, instead of r3_component_set {"entity": …} once per component. Name them in members (entityRefs or ids), or let match find them ({"prefix": "ship1_"} on the entityRef, {"type": "Mesh"}, or both). Each one's value components (position, rotation, scale, colours) follow it, as with r3_component_set; a component in another entity moves (the plan says from where). Without planId it only PLANS and changes nothing: the members, what follows each, what a match skipped (Entities and project infrastructure never join one) and what is refused (not found, a name several components share, two members that would share one entityRef inside the entity). With that planId it applies the plan as ONE undoable change every open R3 tab sees, writing only the entity of each, all or nothing: if anything it touches changed since, nothing is written and the new plan is returned.
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": {
"projectId": "<projectId>",
"entity": "<entity>"
},
"name": "r3_entity_assign"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| match | No | Find the components instead of naming them: prefix, type, or both (both must hold). | |
| entity | Yes | The Entity to put them in: its entityRef or id (r3_project_load lists it). | |
| planId | No | The plan being applied, from this tool without planId (same members / match). Leave it out to plan. | |
| members | No | The components to put in it, by entityRef or id. Or use match. | |
| projectId | Yes | The project, from r3_project_load. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| seq | Yes | ||
| answer | Yes | This answer in words: what was done, what R3 measured, decided or refused, and what to do next. The same text as the result's text block. Read it: the fields beside it are the data, this is the guidance. | |
| entity | Yes | ||
| planId | Yes | ||
| applied | Yes | ||
| changes | Yes | ||
| created | Yes | ||
| members | Yes | ||
| skipped | Yes | ||
| refusals | Yes | ||
| projectId | Yes | ||
| applicable | Yes | ||
| environment | Yes |