get_object_info
Retrieve detailed information about a specified object in a Blender scene. Use this tool to access essential data for efficient 3D modeling and scene manipulation.
Instructions
Get detailed information about a specific object in the Blender scene.
Parameters:
object_name: The name of the object to get information about
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| object_name | Yes |
Implementation Reference
- src/blender_mcp/server.py:253-269 (handler)The core handler function for the 'get_object_info' tool. It uses a persistent Blender connection to send a command requesting object information by name and returns the result as a formatted JSON string. Includes error handling and logging.def get_object_info(ctx: Context, object_name: str) -> str: """ Get detailed information about a specific object in the Blender scene. Parameters: - object_name: The name of the object to get information about """ try: blender = get_blender_connection() result = blender.send_command("get_object_info", {"name": object_name}) # Just return the JSON representation of what Blender sent us return json.dumps(result, indent=2) except Exception as e: logger.error(f"Error getting object info from Blender: {str(e)}") return f"Error getting object info: {str(e)}"
- src/blender_mcp/server.py:253-253 (registration)The @mcp.tool() decorator registers the get_object_info function as an MCP tool, making it available for invocation.def get_object_info(ctx: Context, object_name: str) -> str:
- src/blender_mcp/server.py:254-260 (schema)The function signature and docstring define the input schema: requires 'object_name' string parameter, returns str (JSON). The docstring provides usage description.""" Get detailed information about a specific object in the Blender scene. Parameters: - object_name: The name of the object to get information about """ try: