Skip to main content
Glama

Hold a force and torque on a body until changed

wrench

Apply and hold a force and torque on a simulated body until changed; set both to zero to remove the applied load.

Instructions

Hold a force and torque on a body until changed; zeros remove it (Sim.apply_wrench). Example arguments: {"sim": "sim1", "name": "cube", "force": [0, 0, 5]}

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": {
      "name": "<name>"
    },
    "name": "wrench"
  }
}

Input Schema

NameRequiredDescriptionDefault
atNoa rod's end segment
simNoid of an open simulation (from build); default: build `scene`, else the last one built
nameYesbody or kinematic object name (from build's names)
seedNoseed of randomized values (same seed, same worlds)
forceNo[fx, fy, fz] N, world frame (or one per world)
sceneNoa library scene name (alloy list scenes), a .yaml/.json/.xml/.urdf/.usd path, Scene JSON, or a recipe {"objects": [{"add": "ground"}, {"add": "box", "name": "cube", "size": [0.1, 0.1, 0.1], "pos": [0, 0, 0.5], "mass": 1.0}]}
deviceNo'cpu', 'cuda' or 'cuda:<n>' (default: the GPU if there is one)
torqueNo[tx, ty, tz] N m about the centre of mass (or one per world)
worldsNoparallel worlds (default: the scene's)
libraryNoextra card library folders, searched first
profileNointegration profile
contactsNocontact pipeline
liquid_accuracyNoliquid particles: default 4 mm apart, super 2 mm (finer openings and streams, about 16x the cost), ultra 1.5 mm (about 50x); sets the scene's liquid_accuracy

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv0.1.8
    • changedInput schema / properties / liquid_accuracy / description
      Previous value: -"liquid particles: default 4 mm apart, super 2 mm (finer openings and streams, about 16x the cost); sets the scene's liquid_accuracy"New value: +"liquid particles: default 4 mm apart, super 2 mm (finer openings and streams, about 16x the cost), ultra 1.5 mm (about 50x); sets the scene's liquid_accuracy"
    • changedInput schema / properties / liquid_accuracy / enum
      Previous value: -[
      -  "default",
      -  "super"
      -]New value: +[
      +  "default",
      +  "super",
      +  "ultra"
      +]
    • changedInput schema / properties / scene / anyOf
      Previous value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "additionalProperties": false,
      -    "description": "a recipe: Scene.add_* calls as JSON",
      -    "properties": {
      -      "base": {
      -        "description": "start from this library scene or file",
      -        "type": "string"
      -      },
      -      "dt": {
      -        "description": "control period, s",
      -        "type": "number"
      -      },
      -      "friction": {
      -        "items": {
      -          "type": "object"
      -        },
      -        "type": "array"
      -      },
      -      "liquid_accuracy": {
      -        "description": "liquid particles 4 mm apart (default) or 2 mm (super)",
      -        "enum": [
      -          "default",
      -          "super"
      -        ]
      -      },
      -      "materials": {
      -        "items": {
      -          "type": "object"
      -        },
      -        "type": "array"
      -      },
      -      "objects": {
      -        "items": {
      -          "description": "keyword arguments of Scene.add_<add>: sizes in m (full edges), mass kg, pos [x, y, z], rpy radians, static true/false (alloy list adds); a robot's path is a file or a library robot name (alloy list robots)",
      -          "properties": {
      -            "add": {
      -              "enum": [
      -                "block_with_hole",
      -                "box",
      -                "capsule",
      -                "cloth",
      -                "cylinder",
      -                "ground",
      -                "heater",
      -                "liquid",
      -                "mesh",
      -                "object",
      -                "open_box",
      -                "open_cylinder",
      -                "pour",
      -                "push",
      -                "robot",
      -                "rod",
      -                "sphere"
      -              ]
      -            },
      -            "name": {
      -              "type": "string"
      -            }
      -          },
      -          "required": [
      -            "add"
      -          ],
      -          "type": "object"
      -        },
      -        "type": "array"
      -      },
      -      "randomize": {
      -        "items": {
      -          "type": "object"
      -        },
      -        "type": "array"
      -      },
      -      "set": {
      -        "items": {
      -          "description": "keyword arguments of Scene.set_<set>, e.g. {\"set\": \"heater\", \"name\": \"pan_floor\", \"temperature\": 353.15} or {\"set\": \"heat\", \"time_scale\": 60}",
      -          "properties": {
      -            "set": {
      -              "enum": [
      -                "friction",
      -                "heat",
      -                "heater",
      -                "inertia_floor",
      -                "joint_yield",
      -                "quasi_static_mass_scale",
      -                "temperature"
      -              ]
      -            }
      -          },
      -          "required": [
      -            "set"
      -          ],
      -          "type": "object"
      -        },
      -        "type": "array"
      -      },
      -      "worlds": {
      -        "minimum": 1,
      -        "type": "integer"
      -      }
      -    },
      -    "type": "object"
      -  },
      -  {
      -    "description": "Scene JSON (Scene.to_dict())",
      -    "type": "object"
      -  }
      -]New value: +[
      +  {
      +    "type": "string"
      +  },
      +  {
      +    "additionalProperties": false,
      +    "description": "a recipe: Scene.add_* calls as JSON",
      +    "properties": {
      +      "base": {
      +        "description": "start from this library scene or file",
      +        "type": "string"
      +      },
      +      "dt": {
      +        "description": "control period, s",
      +        "type": "number"
      +      },
      +      "friction": {
      +        "items": {
      +          "type": "object"
      +        },
      +        "type": "array"
      +      },
      +      "liquid_accuracy": {
      +        "description": "liquid particles 4 mm apart (default), 2 mm (super) or 1.5 mm (ultra)",
      +        "enum": [
      +          "default",
      +          "super",
      +          "ultra"
      +        ]
      +      },
      +      "materials": {
      +        "items": {
      +          "type": "object"
      +        },
      +        "type": "array"
      +      },
      +      "objects": {
      +        "items": {
      +          "description": "keyword arguments of Scene.add_<add>: sizes in m (full edges), mass kg, pos [x, y, z], rpy radians, static true/false (alloy list adds); a robot's path is a file or a library robot name (alloy list robots)",
      +          "properties": {
      +            "add": {
      +              "enum": [
      +                "block_with_hole",
      +                "box",
      +                "capsule",
      +                "cloth",
      +                "cylinder",
      +                "ground",
      +                "heater",
      +                "liquid",
      +                "mesh",
      +                "object",
      +                "open_box",
      +                "open_cylinder",
      +                "pour",
      +                "push",
      +                "robot",
      +                "rod",
      +                "sphere"
      +              ]
      +            },
      +            "name": {
      +              "type": "string"
      +            }
      +          },
      +          "required": [
      +            "add"
      +          ],
      +          "type": "object"
      +        },
      +        "type": "array"
      +      },
      +      "randomize": {
      +        "items": {
      +          "type": "object"
      +        },
      +        "type": "array"
      +      },
      +      "set": {
      +        "items": {
      +          "description": "keyword arguments of Scene.set_<set>, e.g. {\"set\": \"heater\", \"name\": \"pan_floor\", \"temperature\": 353.15} or {\"set\": \"heat\", \"time_scale\": 60}",
      +          "properties": {
      +            "set": {
      +              "enum": [
      +                "friction",
      +                "heat",
      +                "heater",
      +                "inertia_floor",
      +                "joint_yield",
      +                "quasi_static_mass_scale",
      +                "temperature"
      +              ]
      +            }
      +          },
      +          "required": [
      +            "set"
      +          ],
      +          "type": "object"
      +        },
      +        "type": "array"
      +      },
      +      "worlds": {
      +        "minimum": 1,
      +        "type": "integer"
      +      }
      +    },
      +    "type": "object"
      +  },
      +  {
      +    "description": "Scene JSON (Scene.to_dict())",
      +    "type": "object"
      +  }
      +]
  2. Addedv0.1.3

TDQS

A3.6/5.0
Behavior4/5

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

Annotations only declare it is a non-read-only, non-destructive, non-idempotent mutation. The description adds genuinely useful behavior beyond that: the wrench persists across steps until replaced, and zero vectors are the way to release the body. It does not discuss whether the sim must be running or how this interacts with other applied forces.

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?

Two compact clauses front-load the core behavior and clearing rule, followed by a concrete example call. Nothing is padded, though the parenthetical API reference is redundant for an agent.

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

Completeness3/5

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

For a 13-parameter tool whose schema is rich, the description covers the primary action and the clearing rule but says nothing about how the wrench relates to the simulation lifecycle (stepping, reset, close) or whether it can be applied before stepping begins. Adequate, not complete.

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 force/torque units (N, N m), frames, and per-world forms are already documented. The example arguments clarify the call shape and confirm the force array format, but add little beyond the schema – baseline 3 is appropriate.

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

Purpose4/5

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

States a specific action and target: applying a persistent force and torque to a named body, with the clearing behavior (zeros remove it) and the underlying API (Sim.apply_wrench) named. It is clear enough to distinguish from siblings like drive or controls, though it never explicitly contrasts with them.

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

Usage Guidelines3/5

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

The persistence semantics ('until changed') imply when this is appropriate versus a one-shot impulse, but there is no explicit when-to-use guidance, no mention of alternatives such as drive for joint actuation, and no stated prerequisites (e.g., that a simulation must be stepped afterward).

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