get_ifc_relationships
Retrieve all relationships for an IFC building model entity by providing its GlobalId, returning structured JSON data for analysis.
Instructions
Get all relationships for a specific IFC entity.
Args:
global_id: GlobalId of the IFC entity
Returns:
A JSON-formatted string with all relationships the entity participates in
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| global_id | Yes |
Implementation Reference
- tools.py:403-424 (handler)MCP tool handler implementation for 'get_ifc_relationships'. Forwards the request to the Blender addon via send_command with the global_id parameter, and returns the JSON-formatted result or error message.@mcp.tool() def get_ifc_relationships(global_id: str) -> str: """ Get all relationships for a specific IFC entity. Args: global_id: GlobalId of the IFC entity Returns: A JSON-formatted string with all relationships the entity participates in """ try: blender = get_blender_connection() result = blender.send_command("get_ifc_relationships", { "global_id": global_id }) # Return the formatted JSON of the results return json.dumps(result, indent=2) except Exception as e: logger.error(f"Error getting IFC relationships: {str(e)}") return f"Error getting IFC relationships: {str(e)}"