Skip to main content
Glama

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

NameRequiredDescriptionDefault
bone_nameNo
propertiesNo
object_nameYes
constraint_typeNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv3.0.0
    • changedInput schema / properties / constraint_type / enum
      Previous value: -[
      -  "ARMATURE",
      -  "CHILD_OF",
      -  "CLAMP_TO",
      -  "COPY_LOCATION",
      -  "COPY_ROTATION",
      -  "COPY_SCALE",
      -  "COPY_TRANSFORMS",
      -  "DAMPED_TRACK",
      -  "FLOOR",
      -  "IK",
      -  "LIMIT_LOCATION",
      -  "LIMIT_ROTATION",
      -  "LIMIT_SCALE",
      -  "LOCKED_TRACK",
      -  "MAINTAIN_VOLUME",
      -  "PIVOT",
      -  "STRETCH_TO",
      -  "TRACK_TO",
      -  "TRANSFORM"
      -]New value: +[
      +  "ACTION",
      +  "ARMATURE",
      +  "CHILD_OF",
      +  "CLAMP_TO",
      +  "COPY_LOCATION",
      +  "COPY_ROTATION",
      +  "COPY_SCALE",
      +  "COPY_TRANSFORMS",
      +  "DAMPED_TRACK",
      +  "FLOOR",
      +  "FOLLOW_PATH",
      +  "GEOMETRY_ATTRIBUTE",
      +  "IK",
      +  "LIMIT_DISTANCE",
      +  "LIMIT_LOCATION",
      +  "LIMIT_ROTATION",
      +  "LIMIT_SCALE",
      +  "LOCKED_TRACK",
      +  "MAINTAIN_VOLUME",
      +  "PIVOT",
      +  "SHRINKWRAP",
      +  "SPLINE_IK",
      +  "STRETCH_TO",
      +  "TRACK_TO",
      +  "TRANSFORM"
      +]
  2. Changed2 schema fields changedv1.7.0
    • addedInput schema / additionalProperties
      Added value: +false
    • addedInput schema / properties / constraint_type / enum
      Added value: +[
      +  "ARMATURE",
      +  "CHILD_OF",
      +  "CLAMP_TO",
      +  "COPY_LOCATION",
      +  "COPY_ROTATION",
      +  "COPY_SCALE",
      +  "COPY_TRANSFORMS",
      +  "DAMPED_TRACK",
      +  "FLOOR",
      +  "IK",
      +  "LIMIT_LOCATION",
      +  "LIMIT_ROTATION",
      +  "LIMIT_SCALE",
      +  "LOCKED_TRACK",
      +  "MAINTAIN_VOLUME",
      +  "PIVOT",
      +  "STRETCH_TO",
      +  "TRACK_TO",
      +  "TRANSFORM"
      +]
  3. First observedv0.1.0

TDQS

A4/5.0
Behavior4/5

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

No annotations, so the description carries the burden, and it adds real behavioral detail: properties accept only settings Blender declares on that constraint type, and it names setup_ik_chain for full IK chains. It does not describe failure modes (e.g. missing object/bone) or permission requirements, keeping it below 5.

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?

Front-loaded with a clear one-line summary before the structured args. Efficient overall, though the long constraint-type enumeration restates schema content and slightly bloats the text.

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 4-parameter mutation tool with no annotations, the description supplies scope, parameter intent, a key validation rule, an alternative tool, and even the return shape (though an output schema exists, so that is optional). Enough to call it correctly; only error/permission behavior is omitted.

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

Parameters4/5

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

Schema coverage is 0%, so the description must compensate, and it does: it maps object_name, bone_name (empty-for-object), constraint_type, and gives concrete property keys (target, subtarget, influence, chain_count, owner_space). The constraint_type list largely duplicates the schema enum, but the properties guidance is genuinely additive.

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 verb and resource ('Add a constraint to an object or bone') and clarifies the object-level vs bone-level scope. It also points to setup_ik_chain as the sibling for a related-but-different task, aiding differentiation.

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?

Explains the two usage modes explicitly ('bone_name empty string for object-level constraints') and names the alternative tool for a full IK setup. It stops short of a broader when-not-to-use-this guidance, but the key routing decision is covered.

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

Deploy Server

Other Tools