Skip to main content
Glama

list_ifc_entities

Extract and filter IFC entities by type from Blender models, optionally limiting results to selected objects, and output as JSON for streamlined analysis.

Instructions

List IFC entities of a specific type. Can be filtered to only include objects currently selected in the Blender UI. Args: entity_type: Type of IFC entity to list (e.g., "IfcWall") limit: Maximum number of entities to return selected_only: If True, only return information about selected objects Returns: A JSON-formatted string listing the specified entities

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
entity_typeNo
limitNo
selected_onlyNo

Implementation Reference

  • The MCP tool handler implementation for 'list_ifc_entities'. This function registers the tool using @mcp.tool(), defines the input parameters (entity_type, limit, selected_only), connects to Blender via get_blender_connection(), sends the 'list_ifc_entities' command with parameters, and returns the JSON-formatted result or error message.
    @mcp.tool() def list_ifc_entities(entity_type: str | None = None, limit: int = 50, selected_only: bool = False) -> str: """ List IFC entities of a specific type. Can be filtered to only include objects currently selected in the Blender UI. Args: entity_type: Type of IFC entity to list (e.g., "IfcWall") limit: Maximum number of entities to return selected_only: If True, only return information about selected objects Returns: A JSON-formatted string listing the specified entities """ try: blender = get_blender_connection() result = blender.send_command("list_ifc_entities", { "entity_type": entity_type, "limit": limit, "selected_only": selected_only }) # Return the formatted JSON of the results return json.dumps(result, indent=2) except Exception as e: logger.error(f"Error listing IFC entities: {str(e)}") return f"Error listing IFC entities: {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