Skip to main content
Glama

get_ifc_spatial_structure

Extract the hierarchical spatial structure from IFC building models, including site, building, storey, and space relationships, to analyze architectural organization.

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

  • The main handler function for the 'get_ifc_spatial_structure' MCP tool. It connects to Blender via the global connection, sends the 'get_ifc_spatial_structure' command to the Blender addon, formats the result as JSON, and handles errors.
    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)}"
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the return format ('JSON-formatted string') and the hierarchical scope, but it lacks details on permissions, rate limits, error handling, or whether this is a read-only operation (implied by 'Get' but not explicit). For a tool with zero annotation coverage, this is insufficient.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is front-loaded with the core purpose in the first sentence and adds a concise 'Returns' section. Every sentence earns its place by clarifying the output format without redundancy, making it highly efficient and well-structured.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity (hierarchical data retrieval), no annotations, and no output schema, the description is minimally adequate. It explains what the tool does and the return format, but it lacks details on the JSON structure, error cases, or dependencies. This meets the minimum viable threshold but has clear gaps for a tool with no structured support.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 0 parameters with 100% coverage, so the schema fully documents the lack of inputs. The description adds no parameter information, which is appropriate here. A baseline of 4 is given since no parameters exist, and the description doesn't need to compensate for any gaps.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose with a specific verb ('Get') and resource ('spatial structure of the IFC model'), and it distinguishes the hierarchical focus from siblings like 'get_ifc_total_structure' or 'get_ifc_relationships'. However, it doesn't explicitly differentiate from 'list_ifc_entities' or 'get_selected_ifc_entities', which might also involve spatial elements, preventing a perfect score.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites, context (e.g., after loading a model), or comparisons to siblings like 'get_ifc_total_structure' for broader data or 'list_ifc_entities' for flat lists. This leaves the agent without explicit usage direction.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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