Skip to main content
Glama
zinin

sketchup-mcp2

by zinin

create_dovetail

Create a dovetail joint between two specified components. Control dimensions such as width, height, depth, angle, and number of tails using tail and pin identifiers.

Instructions

Create a dovetail joint between two components. Dimensions in mm.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tail_idYes
pin_idYes
widthNo
heightNo
depthNo
angleNo
num_tailsNo
offset_xNo
offset_yNo
offset_zNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The create_dovetail tool handler function. It is decorated with @mcp.tool() and delegates to _call() with the Ruby command name 'create_dovetail' and all parameters (tail_id, pin_id, width, height, depth, angle, num_tails, offset_x, offset_y, offset_z).
    @mcp.tool()
    async def create_dovetail(
        ctx: Context,
        tail_id: Annotated[str, Field(min_length=1)],
        pin_id: Annotated[str, Field(min_length=1)],
        width: Annotated[float, Field(gt=0)] = 50.0,
        height: Annotated[float, Field(gt=0)] = 50.0,
        depth: Annotated[float, Field(gt=0)] = 15.0,
        angle: Annotated[float, Field(gt=0)] = 15.0,
        num_tails: Annotated[int, Field(gt=0)] = 3,
        offset_x: float = 0.0,
        offset_y: float = 0.0,
        offset_z: float = 0.0,
    ) -> str:
        """Create a dovetail joint between two components. Dimensions in mm."""
        return await _call(
            ctx,
            "create_dovetail",
            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,
        )
  • Input parameter schema for create_dovetail. Parameters include tail_id (str, min_length=1), pin_id (str, min_length=1), width (float>0, default 50.0), height (float>0, default 50.0), depth (float>0, default 15.0), angle (float>0, default 15.0), num_tails (int>0, default 3), offset_x/y/z (float, default 0.0). All dimensions in mm.
    async def create_dovetail(
        ctx: Context,
        tail_id: Annotated[str, Field(min_length=1)],
        pin_id: Annotated[str, Field(min_length=1)],
        width: Annotated[float, Field(gt=0)] = 50.0,
        height: Annotated[float, Field(gt=0)] = 50.0,
        depth: Annotated[float, Field(gt=0)] = 15.0,
        angle: Annotated[float, Field(gt=0)] = 15.0,
        num_tails: Annotated[int, Field(gt=0)] = 3,
        offset_x: float = 0.0,
        offset_y: float = 0.0,
        offset_z: float = 0.0,
    ) -> str:
  • The @mcp.tool() decorator registers create_dovetail as a FastMCP tool. The 'mcp' instance is imported from sketchup_mcp.app (file src/sketchup_mcp/app.py, line 14)
    @mcp.tool()
  • The _call() helper function that all tools delegate to. It acquires a connection via get_connection(), calls send_command(name, kwargs), handles errors, and unwraps the MCP response format.
    async def _call(ctx: Context, name: str, **kwargs) -> str:
        """Dispatch a tool call to SketchUp and shape the response for Claude.
    
        - Connection errors → human-readable string, server keeps running.
        - SketchUpError → ``format_error`` string.
        - Successful MCP-shaped result ({content: [{text: "..."}]}) → just the text.
        - Any other dict result → ``json.dumps``.
        """
        try:
            sketchup = await get_connection()
        except ConnectionError as e:
            return f"SketchUp not running or extension not started: {e}"
        try:
            result = await sketchup.send_command(name, kwargs)
        except ConnectionError as e:
            # Cached connection was stale and reconnect inside send_command failed:
            # `_connect_or_raise` re-raises OSError as ConnectionError before the
            # send/recv try-block, so it escapes past the SketchUpError handler.
            return f"SketchUp not running or extension not started: {e}"
        except SketchUpError as e:
            return format_error(e, debug=config.LOG_LEVEL == "DEBUG")
        content = result.get("content") if isinstance(result, dict) else None
        if (
            isinstance(content, list)
            and content
            and isinstance(content[0], dict)
            and "text" in content[0]
        ):
            return content[0]["text"]
        return json.dumps(result)
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations provided, and the description only says 'Create a dovetail joint,' implying a model modification but disclosing no side effects, permissions, or potential destructive actions.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Very concise (one sentence) and front-loaded, but lacks structure for the tool's complexity. Additional detail would improve usability without making it verbose.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Despite having an output schema, the description is too sparse for a tool with 10 parameters and no annotations. It omits joint orientation, constraints, or parameter relationships.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 10 parameters and 0% schema description coverage, the description adds minimal value—only 'Dimensions in mm,' which applies broadly but does not explain individual parameters like tail_id, pin_id, or offset fields.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Clearly states it creates a dovetail joint between two components, which is specific and distinguishes it from other joinery tools. The mention of dimensions in mm adds precision.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance on when to use this tool over alternatives like create_mortise_tenon or create_finger_joint. Does not mention prerequisites or typical use cases.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other 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/zinin/sketchup-mcp2'

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