Skip to main content
Glama

get_ifc_georeferencing_info

Check if an IFC model in Bonsai/BlenderBIM has georeferencing data and retrieve coordinate reference system, map conversion, and site location information.

Instructions

Checks whether the IFC currently opened in Bonsai/BlenderBIM is georeferenced
and returns the key georeferencing information.

Parameters
----------
include_contexts : bool
    If True, adds a breakdown of the RepresentationContexts and operations.
    

Returns
--------
str (JSON pretty-printed)
    {
      "georeferenced": true|false,
      "crs": {
        "name": str|null,
        "geodetic_datum": str|null,
        "vertical_datum": str|null,
        "map_unit": str|null
      },
      "map_conversion": {
        "eastings": float|null,
        "northings": float|null,
        "orthogonal_height": float|null,
        "scale": float|null,
        "x_axis_abscissa": float|null,
        "x_axis_ordinate": float|null
      },
      "world_coordinate_system": {
        "origin": [x, y, z]|null
      },
      "true_north": {
        "direction_ratios": [x, y]|null
      },
      "site": {
        "local_placement_origin": [x, y, z]|null,
        "ref_latitude": [deg, min, sec, millionth]|null,
        "ref_longitude": [deg, min, sec, millionth]|null,
        "ref_elevation": float|null
      },
      "contexts": [...],              # only if include_contexts = true
      "warnings": [ ... ]             # Informational message
    }

Notes
-----
- This tool acts as a wrapper: it sends the "get_ifc_georeferencing_info"
  command to the Blender add-on. The add-on must implement that logic
  (reading IfcProject/IfcGeometricRepresentationContext, IfcMapConversion,
  TargetCRS, IfcSite.RefLatitude/RefLongitude/RefElevation, etc.).
- It always returns a JSON string with indentation for easier reading.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
include_contextsNo

Implementation Reference

  • The handler function implementing the MCP tool 'get_ifc_georeferencing_info'. It establishes a connection to the Blender addon, sends the corresponding command with the 'include_contexts' parameter, and returns a formatted JSON string with georeferencing information or an error message. The detailed schema for input/output is provided in the docstring.
    def get_ifc_georeferencing_info(include_contexts: bool = False) -> str:
        """
        Checks whether the IFC currently opened in Bonsai/BlenderBIM is georeferenced
        and returns the key georeferencing information.
    
        Parameters
        ----------
        include_contexts : bool
            If True, adds a breakdown of the RepresentationContexts and operations.
            
    
        Returns
        --------
        str (JSON pretty-printed)
            {
              "georeferenced": true|false,
              "crs": {
                "name": str|null,
                "geodetic_datum": str|null,
                "vertical_datum": str|null,
                "map_unit": str|null
              },
              "map_conversion": {
                "eastings": float|null,
                "northings": float|null,
                "orthogonal_height": float|null,
                "scale": float|null,
                "x_axis_abscissa": float|null,
                "x_axis_ordinate": float|null
              },
              "world_coordinate_system": {
                "origin": [x, y, z]|null
              },
              "true_north": {
                "direction_ratios": [x, y]|null
              },
              "site": {
                "local_placement_origin": [x, y, z]|null,
                "ref_latitude": [deg, min, sec, millionth]|null,
                "ref_longitude": [deg, min, sec, millionth]|null,
                "ref_elevation": float|null
              },
              "contexts": [...],              # only if include_contexts = true
              "warnings": [ ... ]             # Informational message
            }
    
        Notes
        -----
        - This tool acts as a wrapper: it sends the "get_ifc_georeferencing_info"
          command to the Blender add-on. The add-on must implement that logic
          (reading IfcProject/IfcGeometricRepresentationContext, IfcMapConversion,
          TargetCRS, IfcSite.RefLatitude/RefLongitude/RefElevation, etc.).
        - It always returns a JSON string with indentation for easier reading.
        """
        blender = get_blender_connection()
        params = {
            "include_contexts": bool(include_contexts)
        }
    
        try:
            result = blender.send_command("get_ifc_georeferencing_info", params)
            # Ensures that the result is serializable and easy to read
            return json.dumps(result, ensure_ascii=False, indent=2)
        except Exception as e:
            logger.exception("get_ifc_georeferencing_info error")
            return json.dumps(
                {
                    "georeferenced": False,
                    "error": "Unable to retrieve georeferencing information from the IFC model.",
                    "details": str(e)
                },
                ensure_ascii=False,
                indent=2
            )
Behavior4/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 effectively describes the tool's behavior: it checks georeferencing status, returns structured JSON data, acts as a wrapper for a Blender add-on command, and always returns pretty-printed JSON. However, it doesn't mention performance characteristics, error handling, or prerequisites like whether an IFC file must be loaded.

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

Conciseness4/5

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

The description is well-structured with clear sections (description, parameters, returns, notes) and front-loaded with the core purpose. Most sentences earn their place by explaining functionality, parameters, returns, or implementation details. The detailed return structure is necessary but makes it somewhat lengthy.

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

Completeness5/5

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

Given the tool's moderate complexity (1 parameter, no annotations, no output schema), the description is complete enough. It thoroughly documents the return format with detailed JSON structure, explains the parameter's effect, notes the wrapper implementation, and covers the tool's purpose. No output schema exists, so the detailed return documentation is essential and well-provided.

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 description adds significant meaning beyond the input schema. The schema only shows 'include_contexts' as a boolean with 0% description coverage, while the description explains that this parameter adds 'a breakdown of the RepresentationContexts and operations' and shows exactly where this data appears in the output ('contexts' field only if true). This compensates well for the low schema coverage.

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

Purpose5/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 specific verbs ('checks', 'returns') and resources ('IFC currently opened in Bonsai/BlenderBIM', 'key georeferencing information'). It distinguishes itself from siblings like 'georeference_ifc_model' (which sets georeferencing) by focusing on information retrieval rather than modification.

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

Usage Guidelines3/5

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

The description implies usage when georeferencing information is needed, but doesn't explicitly state when to use this tool versus alternatives like 'get_ifc_project_info' or 'get_ifc_spatial_structure'. It mentions the tool acts as a wrapper for the Blender add-on, suggesting it's for querying georeferencing data specifically, but lacks explicit guidance on alternatives or exclusions.

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