create_dovetail
Generate precise dovetail joints between two components in Sketchup by configuring angles, depth, width, and tail count for accurate 3D modeling.
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 handler function decorated with @mcp.tool() that implements the create_dovetail MCP tool. It connects to SketchUp via socket, forwards the joint creation parameters using JSON-RPC to SketchUp's 'create_dovetail' tool, and returns the result.@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)}"