Skip to main content
Glama

get_ifc_spatial_structure

Extract the hierarchical spatial structure of IFC models (site, building, storey, space) in JSON format for analysis and integration with Blender through the Bonsai-mcp server.

Instructions

Get the spatial structure of the IFC model (site, building, storey, space hierarchy). Returns: A JSON-formatted string representing the hierarchical structure of the IFC model

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • MCP tool handler for 'get_ifc_spatial_structure'. Connects to Blender via socket, sends the command to retrieve IFC spatial structure (site/building/storey/space hierarchy), formats result as indented JSON, handles errors.
    @mcp.tool() def get_ifc_spatial_structure() -> str: """ Get the spatial structure of the IFC model (site, building, storey, space hierarchy). Returns: A JSON-formatted string representing the hierarchical structure of the IFC model """ try: blender = get_blender_connection() result = blender.send_command("get_ifc_spatial_structure") # Return the formatted JSON of the results return json.dumps(result, indent=2) except Exception as e: logger.error(f"Error getting IFC spatial structure: {str(e)}") return f"Error getting IFC spatial structure: {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/JotaDeRodriguez/Bonsai_mcp'

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