Skip to content

vendor_connectors.meshy.tools

AI framework tools for Meshy AI 3D generation.

This module provides tools for Meshy AI operations that work with multiple AI agent frameworks. The core functions are framework-agnostic Python functions, with native wrappers for each supported framework.

Text3dGenerateSchemaPydantic schema for the text3d_generate tool.
Image3dGenerateSchemaPydantic schema for the image3d_generate tool.
RigModelSchemaPydantic schema for the rig_model tool.
ApplyAnimationSchemaPydantic schema for the apply_animation tool.
RetextureModelSchemaPydantic schema for the retexture_model tool.
ListAnimationsSchemaPydantic schema for the list_animations tool.
CheckTaskStatusSchemaPydantic schema for the check_task_status tool.
GetAnimationSchemaPydantic schema for the get_animation tool.
_extract_result_fieldsExtract common fields from Meshy API result objects.
text3d_generateGenerate a 3D model from text description.
image3d_generateGenerate a 3D model from an image.
rig_modelAdd skeleton/rig to a static 3D model.
apply_animationApply animation to a rigged model.
retexture_modelApply new textures to an existing model.
list_animationsList available animations from the Meshy catalog.
check_task_statusCheck status of a Meshy task.
get_animationGet details of a specific animation.
get_langchain_toolsGet all Meshy tools as LangChain StructuredTools.
get_crewai_toolsGet all Meshy tools as CrewAI tools.
get_strands_toolsGet all Meshy tools as plain Python functions for AWS Strands.
get_toolsGet Meshy tools for the specified or auto-detected framework.
TOOL_DEFINITIONS

class vendor_connectors.meshy.tools.Text3dGenerateSchema

Section titled “class vendor_connectors.meshy.tools.Text3dGenerateSchema”

Bases: pydantic.BaseModel

Pydantic schema for the text3d_generate tool.

‘Field(…)’

‘Field(…)’

‘Field(…)’

‘Field(…)’

‘Field(…)’

class vendor_connectors.meshy.tools.Image3dGenerateSchema

Section titled “class vendor_connectors.meshy.tools.Image3dGenerateSchema”

Bases: pydantic.BaseModel

Pydantic schema for the image3d_generate tool.

‘Field(…)’

‘Field(…)’

‘Field(…)’

‘Field(…)’

class vendor_connectors.meshy.tools.RigModelSchema

Section titled “class vendor_connectors.meshy.tools.RigModelSchema”

Bases: pydantic.BaseModel

Pydantic schema for the rig_model tool.

‘Field(…)’

‘Field(…)’

class vendor_connectors.meshy.tools.ApplyAnimationSchema

Section titled “class vendor_connectors.meshy.tools.ApplyAnimationSchema”

Bases: pydantic.BaseModel

Pydantic schema for the apply_animation tool.

‘Field(…)’

‘Field(…)’

‘Field(…)’

class vendor_connectors.meshy.tools.RetextureModelSchema

Section titled “class vendor_connectors.meshy.tools.RetextureModelSchema”

Bases: pydantic.BaseModel

Pydantic schema for the retexture_model tool.

‘Field(…)’

‘Field(…)’

‘Field(…)’

‘Field(…)’

class vendor_connectors.meshy.tools.ListAnimationsSchema

Section titled “class vendor_connectors.meshy.tools.ListAnimationsSchema”

Bases: pydantic.BaseModel

Pydantic schema for the list_animations tool.

‘Field(…)’

‘Field(…)’

class vendor_connectors.meshy.tools.CheckTaskStatusSchema

Section titled “class vendor_connectors.meshy.tools.CheckTaskStatusSchema”

Bases: pydantic.BaseModel

Pydantic schema for the check_task_status tool.

‘Field(…)’

‘Field(…)’

class vendor_connectors.meshy.tools.GetAnimationSchema

Section titled “class vendor_connectors.meshy.tools.GetAnimationSchema”

Bases: pydantic.BaseModel

Pydantic schema for the get_animation tool.

‘Field(…)’

Extract common fields from Meshy API result objects.

Safely extracts status, model_url, and thumbnail_url from result objects, handling missing attributes gracefully.

Args: result: A Meshy API result object (Text3DResult, Image3DResult, etc.)

Returns: Dict with status, model_url, and thumbnail_url fields

vendor_connectors.meshy.tools.text3d_generate(prompt: str, art_style: str = ‘realistic’, negative_prompt: str = ”, target_polycount: int = 30000, enable_pbr: bool = True) → dict[str, Any]

Section titled “vendor_connectors.meshy.tools.text3d_generate(prompt: str, art_style: str = ‘realistic’, negative_prompt: str = ”, target_polycount: int = 30000, enable_pbr: bool = True) → dict[str, Any]”

Generate a 3D model from text description.

Args: prompt: Detailed text description of the 3D model (max 600 chars) art_style: One of: realistic, sculpture. For ‘sculpture’, set enable_pbr=False as sculpture style generates its own PBR maps. negative_prompt: Things to avoid in the generation target_polycount: Target polygon count enable_pbr: Enable PBR materials. API defaults to False; we default to True for better realistic renders. Set False for sculpture.

Returns: Dict with task_id, status, model_url, and thumbnail_url

vendor_connectors.meshy.tools.image3d_generate(image_url: str, topology: str = ”, target_polycount: int = 15000, enable_pbr: bool = True) → dict[str, Any]

Section titled “vendor_connectors.meshy.tools.image3d_generate(image_url: str, topology: str = ”, target_polycount: int = 15000, enable_pbr: bool = True) → dict[str, Any]”

Generate a 3D model from an image.

Args: image_url: URL to the source image topology: Mesh topology (“quad” or “triangle”), empty for default target_polycount: Target polygon count enable_pbr: Enable PBR materials

Returns: Dict with task_id, status, model_url, and thumbnail_url

Add skeleton/rig to a static 3D model.

Args: model_id: Task ID of the static model to rig wait: Whether to wait for completion (default True)

Returns: Dict with task_id and status

Apply animation to a rigged model.

Args: model_id: Task ID of the rigged model animation_id: Animation ID from the Meshy catalog (integer) wait: Whether to wait for completion (default True)

Returns: Dict with task_id, status, and glb_url

Apply new textures to an existing model.

Args: model_id: Task ID of the model to retexture texture_prompt: Description of the new texture/appearance enable_pbr: Enable PBR materials wait: Whether to wait for completion (default True)

Returns: Dict with task_id, status, and model_url

List available animations from the Meshy catalog.

Args: category: Optional category filter (Fighting, WalkAndRun, etc.) limit: Maximum number of results

Returns: Dict with count, total, and list of animations

Check status of a Meshy task.

Args: task_id: The Meshy task ID task_type: Task type (text-to-3d, rigging, animation, retexture)

Returns: Dict with status, progress, and model_url if complete

Get details of a specific animation.

Args: animation_id: The animation ID number

Returns: Dict with animation details

vendor_connectors.meshy.tools.TOOL_DEFINITIONS

Section titled “vendor_connectors.meshy.tools.TOOL_DEFINITIONS”

None

Get all Meshy tools as LangChain StructuredTools.

Returns: List of LangChain StructuredTool objects for Meshy operations.

Raises: ImportError: If langchain-core is not installed.

Get all Meshy tools as CrewAI tools.

Returns: List of CrewAI BaseTool objects for Meshy operations.

Raises: ImportError: If crewai is not installed.

Get all Meshy tools as plain Python functions for AWS Strands.

Strands agents work with plain Python functions that have type hints. The functions are returned as-is since they already have proper signatures.

Returns: List of callable functions for Strands agents.

Get Meshy tools for the specified or auto-detected framework.

This is the recommended entry point - it auto-detects which AI framework is installed and returns tools in the appropriate format.

Args: framework: Framework to use. Options:

  • “auto” (default): Auto-detect based on installed packages
  • “langchain”: Force LangChain StructuredTools
  • “crewai”: Force CrewAI tools
  • “strands”: Force plain functions for Strands
  • “functions”: Force plain functions (alias for strands)

Returns: List of tools in the appropriate format for the framework.

Raises: ImportError: If the requested framework is not installed. ValueError: If an unknown framework is specified.

Example:

tools = get_tools()

# Force specific framework
tools = get_tools("langchain")
tools = get_tools("crewai")