Skip to main content
Glama

generate_ids

Create .ids files in Blender/Bonsai to define Information Delivery Specifications (IDS) with structured requirements for IFC building models.

Instructions

Creates an .ids file in Blender/Bonsai by calling the add-on handler 'generate_ids'.

Parameters:
  - title (str): Title of the IDS.
  - specs (list | JSON str): List of 'specs' containing 'applicability' and 'requirements'.
    Each facet is a dict with at least a 'type' field ("Entity", "Attribute", "Property",
    "Material", "Classification", "PartOf") and its corresponding attributes.
  - description, author, ids_version, date_iso, purpose, milestone: IDS metadata fields.
  - output_path (str): Full path to the .ids file to be created. If omitted, the add-on will generate a default name.

Returns:
  - JSON (str) with the handler result: {"ok": bool, "output_path": "...", "message": "..."} 
    or {"ok": False, "error": "..."}

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
titleYes
specsYes
descriptionNo
authorNo
ids_versionNo
purposeNo
milestoneNo
date_isoNo
output_pathNo

Implementation Reference

  • MCP tool handler for 'generate_ids'. Validates input parameters, parses specs if JSON string, constructs payload, sends 'generate_ids' command to Blender addon to create IDS file, returns JSON result or error.
    def generate_ids(
        title: str,
        specs: Union[List[dict], str],  # accepts a list of dicts or a JSON string
        description: str = "",
        author: str = "",
        ids_version: Union[str, float] = "",    # IDS version (Not IFC version)
        purpose: str = "",
        milestone: str = "",
        date_iso: str = None,
        output_path: str = None,    
    ) -> str:
        """
        Creates an .ids file in Blender/Bonsai by calling the add-on handler 'generate_ids'.
    
        Parameters:
          - title (str): Title of the IDS.
          - specs (list | JSON str): List of 'specs' containing 'applicability' and 'requirements'.
            Each facet is a dict with at least a 'type' field ("Entity", "Attribute", "Property",
            "Material", "Classification", "PartOf") and its corresponding attributes.
          - description, author, ids_version, date_iso, purpose, milestone: IDS metadata fields.
          - output_path (str): Full path to the .ids file to be created. If omitted, the add-on will generate a default name.
    
        Returns:
          - JSON (str) with the handler result: {"ok": bool, "output_path": "...", "message": "..."} 
            or {"ok": False, "error": "..."}
        """
    
        blender = get_blender_connection()
    
        # Allow 'specs' to be received as JSON text (convenient when the client builds it as a string)
        if isinstance(specs, str):
            try:
                specs = json.loads(specs)
            except Exception as e:
                return json.dumps(
                    {"ok": False, "error": "Argument 'specs' is not a valid JSON", "details": str(e)},
                    ensure_ascii=False, indent=2
                )
    
        # Basic validations to avoid sending garbage to the add-on
        if not isinstance(title, str) or not title.strip():
            return json.dumps({"ok": False, "error": "Empty or invalid 'title' parameter."},
                              ensure_ascii=False, indent=2)
        if not isinstance(specs, list) or not specs:
            return json.dumps({"ok": False, "error": "You must provide at least one 'spec' in 'specs'."},
                              ensure_ascii=False, indent=2)
    
        # Safe coercion of ids_version to str
        if ids_version is not None and not isinstance(ids_version, str):
            ids_version = str(ids_version)
    
        params: dict[str, Any] = {
            "title": title,
            "specs": specs,
            "description": description,
            "author": author,
            "ids_version": ids_version,   # ← the handler maps it to the 'version' field of the IDS
            "date_iso": date_iso,
            "output_path": output_path,
            "purpose": purpose,
            "milestone": milestone,
        }
    
        # Cleanup: remove keys with None values to keep the payload clean
        params = {k: v for k, v in params.items() if v is not None}
    
        try:
            # Assignment name must match EXACTLY the one in addon.py
            result = blender.send_command("generate_ids", params)
            # Returns JSON 
            return json.dumps(result, ensure_ascii=False, indent=2)
        except Exception as e:
            return json.dumps({"ok": False, "error": "Fallo al crear IDS", "details": str(e)},
                              ensure_ascii=False, indent=2)
Behavior3/5

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

No annotations are provided, so the description carries the full burden. It discloses that the tool creates a file (implying a write operation) and mentions the return format. However, it doesn't cover important behavioral aspects like error handling beyond the return structure, whether the operation is idempotent, what happens if the output_path already exists, or any performance/rate limit considerations. The description adds some value but leaves significant gaps for a file-creation tool.

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 for parameters and returns. It's appropriately sized for a tool with 9 parameters. Every sentence adds value, though the parameter explanations could be slightly more concise. The information is front-loaded with the core purpose first.

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

Completeness4/5

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

Given the complexity (9 parameters, file creation operation, no annotations, no output schema), the description does a good job. It explains the purpose, documents all parameters semantically, and describes the return format. The main gaps are lack of usage guidelines and incomplete behavioral transparency (missing error scenarios, file overwrite behavior, etc.). For a tool with this parameter complexity, it's quite complete but not perfect.

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

Parameters5/5

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

With 0% schema description coverage, the description compensates exceptionally well. It provides detailed semantic explanations for all 9 parameters: it explains what 'title' and 'specs' are (including the complex structure of specs with facet types), lists the 6 metadata parameters, and clarifies the behavior of 'output_path' (default naming if omitted). This goes far beyond what the bare schema provides.

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: 'Creates an .ids file in Blender/Bonsai by calling the add-on handler 'generate_ids''. It specifies the verb ('creates'), resource ('.ids file'), and context (Blender/Bonsai add-on). However, it doesn't explicitly differentiate this tool from its siblings (which are mostly IFC-related tools), though the '.ids file' creation is distinct enough in practice.

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, dependencies, or scenarios where this tool is appropriate versus other tools in the server (like execute_blender_code or export functions). The only implicit usage hint is the Blender/Bonsai context, but no explicit when/when-not guidance is provided.

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