Skip to main content
Glama
Eminemminem

BlenderMCP

by Eminemminem

generate_hyper3d_model_via_text

Create 3D models in Blender using text descriptions. Generate assets with built-in materials and import them directly into your scene.

Instructions

Generate 3D asset using Hyper3D by giving description of the desired asset, and import the asset into Blender. The 3D asset has built-in materials. The generated model has a normalized size, so re-scaling after generation can be useful.

Parameters:

  • text_prompt: A short description of the desired model in English.

  • bbox_condition: Optional. If given, it has to be a list of floats of length 3. Controls the ratio between [Length, Width, Height] of the model.

Returns a message indicating success or failure.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
text_promptYes
bbox_conditionNo

Implementation Reference

  • Primary handler function decorated with @mcp.tool(), defining parameters (schema), registering the tool, and implementing the core logic: processes bbox_condition, sends 'create_rodin_job' command to Blender addon, returns task UUID and subscription key or error.
    @mcp.tool() def generate_hyper3d_model_via_text( ctx: Context, text_prompt: str, bbox_condition: list[float]=None ) -> str: """ Generate 3D asset using Hyper3D by giving description of the desired asset, and import the asset into Blender. The 3D asset has built-in materials. The generated model has a normalized size, so re-scaling after generation can be useful. Parameters: - text_prompt: A short description of the desired model in **English**. - bbox_condition: Optional. If given, it has to be a list of floats of length 3. Controls the ratio between [Length, Width, Height] of the model. Returns a message indicating success or failure. """ try: blender = get_blender_connection() result = blender.send_command("create_rodin_job", { "text_prompt": text_prompt, "images": None, "bbox_condition": _process_bbox(bbox_condition), }) succeed = result.get("submit_time", False) if succeed: return json.dumps({ "task_uuid": result["uuid"], "subscription_key": result["jobs"]["subscription_key"], }) else: return json.dumps(result) except Exception as e: logger.error(f"Error generating Hyper3D task: {str(e)}") return f"Error generating Hyper3D task: {str(e)}"
  • Supporting utility function used by the handler to normalize and validate the bbox_condition parameter into a list of integers scaled to 0-100.
    def _process_bbox(original_bbox: list[float] | list[int] | None) -> list[int] | None: if original_bbox is None: return None if all(isinstance(i, int) for i in original_bbox): return original_bbox if any(i<=0 for i in original_bbox): raise ValueError("Incorrect number range: bbox must be bigger than zero!") return [int(float(i) / max(original_bbox) * 100) for i in original_bbox] if original_bbox else None
  • Related helper tool to check if Hyper3D integration is enabled before using the generate tool.
    def get_hyper3d_status(ctx: Context) -> str: """ Check if Hyper3D Rodin integration is enabled in Blender. Returns a message indicating whether Hyper3D Rodin features are available. Don't emphasize the key type in the returned message, but sliently remember it. """ try: blender = get_blender_connection() result = blender.send_command("get_hyper3d_status") enabled = result.get("enabled", False) message = result.get("message", "") if enabled: message += "" return message except Exception as e: logger.error(f"Error checking Hyper3D status: {str(e)}") return f"Error checking Hyper3D status: {str(e)}"
  • Docstring providing input schema description and usage instructions for the tool.
    """ Generate 3D asset using Hyper3D by giving description of the desired asset, and import the asset into Blender. The 3D asset has built-in materials. The generated model has a normalized size, so re-scaling after generation can be useful. Parameters: - text_prompt: A short description of the desired model in **English**. - bbox_condition: Optional. If given, it has to be a list of floats of length 3. Controls the ratio between [Length, Width, Height] of the model. Returns a message indicating success or failure. """

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/Eminemminem/blender-mcp'

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