Skip to main content
Glama
mhyrr
by mhyrr

create_mortise_tenon

Generate precise mortise and tenon joints in Sketchup using predefined parameters for width, height, depth, and offsets, enabling accurate woodworking designs and structural connections.

Instructions

Create a mortise and tenon joint between two components

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
depthNo
heightNo
mortise_idYes
offset_xNo
offset_yNo
offset_zNo
tenon_idYes
widthNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The @mcp.tool()-decorated handler function that implements the create_mortise_tenon tool. It handles input parameters, logs the call, proxies the command to SketchUp via JSON-RPC, and returns the result or error.
    @mcp.tool()
    def create_mortise_tenon(
        ctx: Context,
        mortise_id: str,
        tenon_id: str,
        width: float = 1.0,
        height: float = 1.0,
        depth: float = 1.0,
        offset_x: float = 0.0,
        offset_y: float = 0.0,
        offset_z: float = 0.0
    ) -> str:
        """Create a mortise and tenon joint between two components"""
        try:
            logger.info(f"create_mortise_tenon called with mortise_id={mortise_id}, tenon_id={tenon_id}, width={width}, height={height}, depth={depth}, offsets=({offset_x}, {offset_y}, {offset_z})")
            
            sketchup = get_sketchup_connection()
            
            result = sketchup.send_command(
                method="tools/call",
                params={
                    "name": "create_mortise_tenon",
                    "arguments": {
                        "mortise_id": mortise_id,
                        "tenon_id": tenon_id,
                        "width": width,
                        "height": height,
                        "depth": depth,
                        "offset_x": offset_x,
                        "offset_y": offset_y,
                        "offset_z": offset_z
                    }
                },
                request_id=ctx.request_id
            )
            
            logger.info(f"create_mortise_tenon result: {result}")
            return json.dumps(result)
        except Exception as e:
            logger.error(f"Error in create_mortise_tenon: {str(e)}")
            return f"Error creating mortise and tenon joint: {str(e)}"
  • The @mcp.tool() decorator registers the create_mortise_tenon function as an MCP tool.
    @mcp.tool()
  • Function signature defines the input schema with type hints for parameters.
    def create_mortise_tenon(
        ctx: Context,
        mortise_id: str,
        tenon_id: str,
        width: float = 1.0,
        height: float = 1.0,
        depth: float = 1.0,
        offset_x: float = 0.0,
        offset_y: float = 0.0,
        offset_z: float = 0.0
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states 'Create' which implies a write/mutation operation, but it doesn't describe what happens upon creation (e.g., whether it modifies existing components, requires specific permissions, or has side effects). This leaves significant gaps in understanding the tool's behavior beyond the basic action.

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

Conciseness5/5

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

The description is a single, clear sentence that efficiently conveys the core purpose without unnecessary words. It's appropriately sized and front-loaded, making it easy to understand at a glance.

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?

Given the complexity (8 parameters, 0% schema coverage, no annotations, but with an output schema), the description is incomplete. It doesn't address parameter meanings, usage context, or behavioral details, relying solely on the output schema for return values. For a mutation tool with many undocumented parameters, this is inadequate.

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?

Schema description coverage is 0%, meaning none of the 8 parameters have descriptions in the schema. The tool description doesn't mention any parameters, failing to compensate for this gap. It doesn't explain what 'mortise_id' or 'tenon_id' refer to, or the purpose of dimensions like 'depth' and offsets, leaving parameters undocumented.

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

Purpose4/5

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

The description clearly states the action ('Create') and the specific resource ('a mortise and tenon joint between two components'), which is more specific than just restating the tool name. However, it doesn't explicitly differentiate from sibling joint creation tools like 'create_dovetail' or 'create_finger_joint' beyond naming the joint type.

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?

The description provides no guidance on when to use this tool versus alternatives like 'create_dovetail' or 'create_finger_joint', nor does it mention prerequisites such as needing existing components or specific contexts. It simply states what the tool does without usage context.

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

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/mhyrr/sketchup-mcp'

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