Skip to main content
Glama

Add ANY component to a saved R3 project

r3_component_add

Add one component of ANY registered type — a collider, a rigid body, a joint, a light, a material, a geometry … — to a saved R3 project, with its values and references set before it is created. 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_add_component is the same tool). Use r3_factory_run for a ready-made object (a cube, a physics sphere …).

type is the short type name, e.g. "ColliderCuboid" (an unknown type is refused with the list). values take r3_component_set's shapes: a plain value {"friction": 0.2}; a value component as the keys to set {"halfExtents": {"x": 2, "y": 0.5, "z": 1}}; a reference as the target's entityRef or id {"rigidBody": "rigidbody_dynamic_1"} — a component of THIS project, of a type the slot accepts; "name" names it (a name already used is kept as its label, and its entityRef gets a suffix, e.g. hull_2: the answer says so); "entity" puts it in an Entity (its value components join too). A type that cannot exist without an option (an Audio / AudioPositional / Texture's "url") takes it in values too, and is refused without it. A Code component's code is r3_code_write's. A VehicleWheel added with a mesh is measured from it (Configure from Mesh: radius, connectionPoint, axle), and a ColliderCuboid / Sphere / Cylinder / Capsule with a mesh (its own or its rigid body's) is fitted to it (Fit to Mesh: size, and position on the mesh's centre), only the values you did not pass; the answer says what (PHYSICS_USAGE.md → Vehicles).

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>",
      "type": "<type>"
    },
    "name": "r3_component_add"
  }
}

Input Schema

NameRequiredDescriptionDefault
typeYesThe component type, e.g. "ColliderCuboid", "RigidBodyFixed", "LightPoint".
valuesNoIts values, e.g. {"rigidBody": "rigidbody_dynamic_1", "halfExtents": {"x": 2}, "friction": 0.2}.
projectIdYesThe project to add to (r3_project_list).

Output Schema

NameRequiredDescriptionDefault
seqNo
typeYes
savedYes
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.
createdYes
physicsYes
entityRefYes
projectIdYes
componentIdYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. 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",
      -  "type",
      -  "componentId",
      -  "entityRef",
      -  "created",
      -  "saved",
      -  "answer"
      -]New value: +[
      +  "projectId",
      +  "type",
      +  "componentId",
      +  "entityRef",
      +  "created",
      +  "saved",
      +  "physics",
      +  "answer"
      +]
  2. 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",
      -  "type",
      -  "componentId",
      -  "entityRef",
      -  "created",
      -  "saved"
      -]New value: +[
      +  "projectId",
      +  "type",
      +  "componentId",
      +  "entityRef",
      +  "created",
      +  "saved",
      +  "answer"
      +]
  3. First observed

TDQS

A4.7/5.0
Behavior5/5

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

Goes well past the annotations: the component appears immediately in the project's live copy across every open tab with nothing to save, an unknown type is refused with the list of valid types, duplicate names are kept as labels with an entityRef suffix (hull_2), and option-dependent types are refused without their required option. It also discloses non-obvious side effects such as VehicleWheel measurements and Collider Fit to Mesh only filling values that were not passed.

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

Conciseness4/5

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

Purpose and the routing distinction are front-loaded, and nearly every clause carries information (aliasing, values shapes, mesh fitting). It is dense and parenthetical-heavy, with slight redundancy between "Kept at once in the project's live copy" and "no editor needed and nothing to save", which could be tightened.

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

Completeness5/5

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

For a high-complexity, open-world mutation tool with a nested free-form `values` object, the description covers the creation model, valid type names, reference resolution, naming collisions, and required-option refusals. An output schema exists, so the brief note that "the answer says what" suffices without explaining return values.

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

Parameters5/5

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

Though schema coverage is 100% (baseline 3), the description substantially enriches it: the three value shapes (plain value, value component as keys, reference via entityRef/id), the magic "name" and "entity" keys, the fact that references must target a component of this project of an accepted type, and concrete type-name examples. This is meaning the schema's generic additionalProperties object cannot convey.

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?

States a specific verb and resource ("Add one component of ANY registered type ... to a saved R3 project") and enumerates the component families covered. It also explicitly distances itself from r3_factory_run and declares r3_editor_add_component to be the same tool, so an agent can place it among siblings without opening a schema.

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?

Gives a clear routing rule (use r3_factory_run for ready-made objects like a cube or physics sphere) and points to r3_component_set for the value shapes and r3_code_write for Code components. It lacks an explicit statement of when NOT to use it, e.g. when a component already exists and should be modified via r3_component_set rather than added.

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