get_selected_ifc_entities
Extract IFC building model data from manually selected objects in Blender for focused analysis and manipulation.
Instructions
Get IFC entities corresponding to the currently selected objects in Blender.
This allows working specifically with objects the user has manually selected in the Blender UI.
Returns:
A JSON-formatted string with information about the selected IFC entities
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- tools.py:281-298 (handler)MCP tool handler function that proxies the 'get_selected_ifc_entities' command to the Blender addon via socket connection, receives the result, formats it as JSON string, and handles errors. This is the primary implementation of the tool in the MCP server.@mcp.tool() def get_selected_ifc_entities() -> str: """ Get IFC entities corresponding to the currently selected objects in Blender. This allows working specifically with objects the user has manually selected in the Blender UI. Returns: A JSON-formatted string with information about the selected IFC entities """ try: blender = get_blender_connection() result = blender.send_command("get_selected_ifc_entities") # Return the formatted JSON of the results return json.dumps(result, indent=2) except Exception as e: logger.error(f"Error getting selected IFC entities: {str(e)}") return f"Error getting selected IFC entities: {str(e)}"