create_dovetail
Generate dovetail joints in Sketchup by defining components, dimensions, and angles for precise 3D modeling within the SketchupMCP server.
Instructions
Create a dovetail joint between two components
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| angle | No | ||
| depth | No | ||
| height | No | ||
| num_tails | No | ||
| offset_x | No | ||
| offset_y | No | ||
| offset_z | No | ||
| pin_id | Yes | ||
| tail_id | Yes | ||
| width | No |
Implementation Reference
- src/sketchup_mcp/server.py:448-492 (handler)The MCP tool handler function 'create_dovetail' that forwards parameters to Sketchup extension via socket/JSON-RPC to create a dovetail joint.@mcp.tool() def create_dovetail( ctx: Context, tail_id: str, pin_id: str, width: float = 1.0, height: float = 1.0, depth: float = 1.0, angle: float = 15.0, num_tails: int = 3, offset_x: float = 0.0, offset_y: float = 0.0, offset_z: float = 0.0 ) -> str: """Create a dovetail joint between two components""" try: logger.info(f"create_dovetail called with tail_id={tail_id}, pin_id={pin_id}, width={width}, height={height}, depth={depth}, angle={angle}, num_tails={num_tails}") sketchup = get_sketchup_connection() result = sketchup.send_command( method="tools/call", params={ "name": "create_dovetail", "arguments": { "tail_id": tail_id, "pin_id": pin_id, "width": width, "height": height, "depth": depth, "angle": angle, "num_tails": num_tails, "offset_x": offset_x, "offset_y": offset_y, "offset_z": offset_z } }, request_id=ctx.request_id ) logger.info(f"create_dovetail result: {result}") return json.dumps(result) except Exception as e: logger.error(f"Error in create_dovetail: {str(e)}") return f"Error creating dovetail joint: {str(e)}"