Skip to main content
Glama

modify_object

Adjust location, rotation, scale, or visibility of objects in Blender scenes to refine 3D models and scenes.

Instructions

Modify an existing object in the Blender scene. Parameters: - name: Name of the object to modify - location: Optional [x, y, z] location coordinates - rotation: Optional [x, y, z] rotation in radians - scale: Optional [x, y, z] scale factors - visible: Optional boolean to set visibility

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYes
locationNo
rotationNo
scaleNo
visibleNo

Implementation Reference

  • The main handler function for the 'modify_object' MCP tool. It constructs parameters from inputs and sends a 'modify_object' command to the Blender connection via get_blender_connection(). The @mcp.tool() decorator registers it as an MCP tool. The function signature and docstring define the input schema.
    @mcp.tool() def modify_object( ctx: Context, name: str, location: List[float] = None, rotation: List[float] = None, scale: List[float] = None, visible: bool = None, ) -> str: """ Modify an existing object in the Blender scene. Parameters: - name: Name of the object to modify - location: Optional [x, y, z] location coordinates - rotation: Optional [x, y, z] rotation in radians - scale: Optional [x, y, z] scale factors - visible: Optional boolean to set visibility """ try: # Get the global connection blender = get_blender_connection() params = {"name": name} if location is not None: params["location"] = location if rotation is not None: params["rotation"] = rotation if scale is not None: params["scale"] = scale if visible is not None: params["visible"] = visible result = blender.send_command("modify_object", params) return f"Modified object: {result['name']}" except Exception as e: logger.error(f"Error modifying object: {str(e)}") return f"Error modifying object: {str(e)}"

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/VAST-AI-Research/tripo-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server