add_constraint
Add object-level or bone-level constraints in Blender to control motion, tracking, limits, and object relationships, with optional constraint properties.
Instructions
Add a constraint to an object or bone.
Args: object_name: Name of the object (armature for bone constraints). bone_name: Name of the bone (empty string for object-level constraints). constraint_type: Constraint type. One of: IK, COPY_ROTATION, COPY_LOCATION, COPY_SCALE, COPY_TRANSFORMS, TRACK_TO, DAMPED_TRACK, LOCKED_TRACK, LIMIT_ROTATION, LIMIT_LOCATION, LIMIT_SCALE, STRETCH_TO, FLOOR, CLAMP_TO, TRANSFORM, MAINTAIN_VOLUME, CHILD_OF, PIVOT, ARMATURE, LIMIT_DISTANCE, SPLINE_IK, ACTION, FOLLOW_PATH, SHRINKWRAP, GEOMETRY_ATTRIBUTE. properties: Optional dict of the constraint's own settings, e.g. target (an object name), subtarget (a bone name), influence, chain_count, owner_space. Only settings Blender declares on that constraint type are accepted. For a full IK setup use setup_ik_chain.
Returns: Dict with the created constraint's name and type.
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": {
"object_name": "<object_name>"
},
"name": "add_constraint"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| bone_name | No | ||
| properties | No | ||
| object_name | Yes | ||
| constraint_type | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||