Skip to main content
Glama

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
NameRequiredDescriptionDefault
angleNo
depthNo
heightNo
num_tailsNo
offset_xNo
offset_yNo
offset_zNo
pin_idYes
tail_idYes
widthNo

Implementation Reference

  • 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)}"
Install Server

Other Tools

Related 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/BearNetwork-BRNKC/SketchUp-MCP'

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