Skip to main content
Glama

Change a property on an R3 component

r3_component_set
Destructive

Set one or more properties on a component that already exists in a project — a material's roughness, a mesh's position, which material a mesh uses. Kept at once in the project's live copy: every R3 tab with the project open shows it now, no editor needed and nothing to save (r3_editor_set is the same tool). The answer says what was kept and its seq.

Components are addressed by entityRef (r3_project_load lists them); one several components share is refused with them: pass componentId (or the id as a reference). {"entity": "<an Entity's entityRef>"} puts it in that Entity (with its position, colours …); null takes it out.

Properties come in four shapes and the value you pass differs: • plain value — {"roughness": 0.25}, {"visible": false} • value component (position / rotation / scale / color / size …) — pass an OBJECT of just the keys to change: {"position": {"y": 2}} leaves x and z alone. Vector3 has x/y/z, Color has r/g/b/a (0..1), Scalar has value. An EMPTY slot (a rigid body's centerOfMass is empty until set) is made from the fields given: {"centerOfMass": {"z": -0.3, "mass": 8}}; the fields not named keep their defaults. Rotations are in RADIANS, not degrees: a quarter turn is Math.PI/2 ≈ 1.5708 (the R3 Inspector shows rotations in degrees: 90°). • reference to another component — pass that component's entityRef as a string: {"material": "material_cube_1"}, or null to clear it. • list of references (a mesh's materials) — pass an ARRAY of entityRefs: {"materials": ["mat_a", "mat_b"]}. The array REPLACES the whole list, in the order given — it does NOT append, so name every component you want in it; [] empties the list. The result reports the list before and after, so check that against what you intended.

Several properties in one call apply all-or-nothing. An unknown property is refused with the valid names (a typo never corrupts the project). Rename (name / entityRef) with r3_component_rename.

Giving a VehicleWheel its mesh or vehicle measures the wheel from that mesh, as the R3 editor does (Configure from Mesh: radius, connectionPoint, axle); a value named in the same call is kept. Giving a ColliderCuboid / Sphere / Cylinder / Capsule its mesh fits it to that mesh (Fit to Mesh: size, and position on the mesh's centre); giving it only a rigidBody fits the values still at their defaults. The answer says what was measured or fitted and what was kept (PHYSICS_USAGE.md → Vehicles).

Moving or scaling a Mesh keeps what the editor derives from it: a SCALE change re-fits every Cuboid / Sphere / Cylinder / Capsule collider fitted to that mesh (size and offset); moving or scaling a wheel's mesh re-measures the wheel; scaling a vehicle's chassis mesh also carries the wheels' suspensionRestLength and maxSuspensionTravel by the new / old scale on the up axis. The answer lists each.

A Mesh's rotation and quaternion are one orientation held twice: set ONE of them and the other follows (both in one call must agree, or the call is refused).

Changing the parent of a Mesh / Empty / Points / Line ({"parent": "root_empty"}, or null for the scene) keeps it where it is in the world, as the R3 editor's re-parent does: its position, rotation (and quaternion) and scale are rewritten to the values local to the new parent, and the answer lists them. A position, rotation / quaternion or scale given in the SAME call is the new LOCAL value under the new parent, taken as given (as if the parent changed first and that value were set after); the fields not given keep the world place. Under a NON-UNIFORMLY scaled parent a rotated part cannot keep its shape (it would shear): that re-parent is refused unless you give rotation and scale yourself.

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>",
      "properties": "<properties>"
    },
    "name": "r3_component_set"
  }
}

Input Schema

NameRequiredDescriptionDefault
entityRefNoWhich component to change, as reported by r3_project_load, e.g. "mesh_cube_1".
projectIdYesThe project the component is in, from r3_project_create or r3_project_load.
propertiesYesWhat to set: {"roughness": 0.25, "position": {"y": 2}, "material": "material_cube_1"}.
componentIdNoOr its id (r3_project_load) — exactly one of entityRef / componentId.

Output Schema

NameRequiredDescriptionDefault
seqNo
typeYes
answerYesThis 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.
landedNo
changesYes
createdYes
physicsYes
entityRefYes
keptWorldNo
projectIdYes
componentIdYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedOutput schema / properties / created
      Added value: +{
      +  "items": {
      +    "additionalProperties": false,
      +    "properties": {
      +      "componentId": {
      +        "type": "string"
      +      },
      +      "entity": {
      +        "type": [
      +          "string",
      +          "null"
      +        ]
      +      },
      +      "type": {
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "componentId",
      +      "type",
      +      "entity"
      +    ],
      +    "type": "object"
      +  },
      +  "type": "array"
      +}
    • changedOutput schema / required
      Previous value: -[
      -  "projectId",
      -  "entityRef",
      -  "type",
      -  "componentId",
      -  "changes",
      -  "physics",
      -  "answer"
      -]New value: +[
      +  "projectId",
      +  "entityRef",
      +  "type",
      +  "componentId",
      +  "changes",
      +  "physics",
      +  "created",
      +  "answer"
      +]
  2. Changed1 schema field changed
    • addedOutput schema / properties / changes / items / properties / cascaded
      Added value: +{
      +  "maximum": 9007199254740991,
      +  "minimum": -9007199254740991,
      +  "type": "integer"
      +}
  3. Changed1 schema field changed
    • addedOutput schema / properties / changes / items / properties / sharedWith
      Added value: +{
      +  "items": {
      +    "additionalProperties": false,
      +    "properties": {
      +      "entityRef": {
      +        "type": [
      +          "string",
      +          "null"
      +        ]
      +      },
      +      "property": {
      +        "type": "string"
      +      },
      +      "type": {
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "entityRef",
      +      "type",
      +      "property"
      +    ],
      +    "type": "object"
      +  },
      +  "type": "array"
      +}
  4. Changed3 schema fields changed
    • addedOutput schema / properties / changes / items / properties / changed
      Added value: +{
      +  "type": "boolean"
      +}
    • addedOutput schema / properties / changes / items / properties / heldKeys
      Added value: +{
      +  "additionalProperties": {
      +    "type": [
      +      "string",
      +      "number",
      +      "boolean",
      +      "null"
      +    ]
      +  },
      +  "propertyNames": {
      +    "type": "string"
      +  },
      +  "type": "object"
      +}
    • changedOutput schema / properties / changes / items / required
      Previous value: -[
      -  "property",
      -  "kind"
      -]New value: +[
      +  "property",
      +  "kind",
      +  "changed"
      +]
  5. Changed2 schema fields changed
    • addedOutput schema / properties / physics
      Added value: +{
      +  "items": {
      +    "additionalProperties": false,
      +    "properties": {
      +      "code": {
      +        "type": "string"
      +      },
      +      "collider": {
      +        "type": [
      +          "string",
      +          "null"
      +        ]
      +      },
      +      "message": {
      +        "type": "string"
      +      },
      +      "rigidBody": {
      +        "type": [
      +          "string",
      +          "null"
      +        ]
      +      }
      +    },
      +    "required": [
      +      "code",
      +      "collider",
      +      "rigidBody",
      +      "message"
      +    ],
      +    "type": "object"
      +  },
      +  "type": "array"
      +}
    • changedOutput schema / required
      Previous value: -[
      -  "projectId",
      -  "entityRef",
      -  "type",
      -  "componentId",
      -  "changes",
      -  "answer"
      -]New value: +[
      +  "projectId",
      +  "entityRef",
      +  "type",
      +  "componentId",
      +  "changes",
      +  "physics",
      +  "answer"
      +]
  6. Changed1 schema field changed
    • addedOutput schema / properties / keptWorld
      Added value: +{
      +  "additionalProperties": false,
      +  "properties": {
      +    "given": {
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    },
      +    "parent": {
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "position": {
      +      "additionalProperties": {
      +        "type": "number"
      +      },
      +      "propertyNames": {
      +        "type": "string"
      +      },
      +      "type": "object"
      +    },
      +    "quaternion": {
      +      "additionalProperties": {
      +        "type": "number"
      +      },
      +      "propertyNames": {
      +        "type": "string"
      +      },
      +      "type": "object"
      +    },
      +    "rotation": {
      +      "additionalProperties": {
      +        "type": "number"
      +      },
      +      "propertyNames": {
      +        "type": "string"
      +      },
      +      "type": "object"
      +    },
      +    "scale": {
      +      "additionalProperties": {
      +        "type": "number"
      +      },
      +      "propertyNames": {
      +        "type": "string"
      +      },
      +      "type": "object"
      +    }
      +  },
      +  "required": [
      +    "parent",
      +    "given"
      +  ],
      +  "type": "object"
      +}
  7. Changed2 schema fields changed
    • addedOutput schema / properties / answer
      Added value: +{
      +  "description": "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.",
      +  "type": "string"
      +}
    • changedOutput schema / required
      Previous value: -[
      -  "projectId",
      -  "entityRef",
      -  "type",
      -  "componentId",
      -  "changes"
      -]New value: +[
      +  "projectId",
      +  "entityRef",
      +  "type",
      +  "componentId",
      +  "changes",
      +  "answer"
      +]
  8. First observed

TDQS

A4.2/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations only declare destructive/non-idempotent/open-world; the description goes far beyond by disclosing that changes apply to the shared live project immediately for every open tab, that multi-property calls are all-or-nothing, that unknown properties are refused rather than silently dropped, that list values REPLACE rather than append, and that mesh scale/parent changes cascade into collider refits, wheel re-measures, and suspension tuning. It even names the failure mode (re-parent under a non-uniformly scaled parent is refused due to shear). That is precisely the context an agent needs before a destructive mutation.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The opening sentence is well front-loaded and bulleted property shapes are easy to scan, but the text runs long with dense back-to-back paragraphs on physics fitting and world-preserving re-parenting that risk truncation and bury later rules. The behavior described mostly earns its place, but a one-line summary of the cascade rules before the detail would cut length without losing meaning.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a destructive, high-blast-radius mutation over a nested free-form properties object, the description covers semantics, side effects, refusals, and cascades thoroughly, and an output schema exists so return values need not be explained. The remaining gap is operational: no mention of how to recover or validate after a refused partial-family call, and permission/auth expectations are left implicit.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the schema already documents entityRef, projectId, properties, and componentId, making 3 the baseline. The description does add real meaning beyond the schema — the four value shapes (plain, value-component partial object, single entityRef string, array of refs), radians vs. degrees, the {"entity": ...} wrapper, and empty-slot initialization — which argues upward, but the scoring baseline for fully documented params holds it at 3.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

"Set one or more properties on a component that already exists in a project" gives a specific verb, resource, and precondition, then anchors it with concrete examples (roughness, mesh position, material slot). It actively disambiguates from siblings: rename is routed to r3_component_rename and equality with r3_editor_set is stated. An agent knows exactly which tool this is versus r3_component_add or r3_component_read.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage context is explicit and rich: live application requires no editor and no save, entityRef comes from r3_project_load, and name/entityRef changes must go to r3_component_rename instead. What's absent is an explicit counter-case such as "use r3_component_add to create a component" or a note on verifying with r3_component_read, so the exclusion set is incomplete but the primary routing is clear.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources