Skip to main content
Glama
danielproxd2

MCP_CAD

by danielproxd2

add_end_keyway

Cut a DIN 6885 axial keyway into a shaft end. Specify end, shaft diameter, keyway dimensions, and offset from end to position the cut.

Instructions

Cuñero — DIN 6885-style axial keyway cut into a shaft end.

Junior workflow: "agrega un cuñero al extremo izquierdo de la flecha, ancho 6mm, largo 20mm, profundidad 3mm, 5mm adentro del extremo". Operates on the active part — assumes a shaft along world X already exists (typically just built with build_stepped_shaft). Composes: create_reference_plane("top", offset = D/2) -> tangent plane on top of the shaft create_sketch() -> slot sketch create_slot(...) -> keyway profile extrude_cut(depth, reverse_direction=True) -> cut INTO body

CRITICAL — reverse_direction=True is non-obvious here. The default extrude_cut direction goes AWAY from the body for offset-plane sketches: the tangent plane's outward normal is +Y, but the shaft body is below the plane at Y < D/2. reverse_direction=True flips the cut so it removes material going from the plane DOWN into the shaft. Without it the cut is a no-op (cuts empty space above the cylinder).

Args: end: "start" (the X=0 end — keyway sits at axial_offset from the min-X face) or "end" (the far +X end — keyway sits at axial_offset from the max-X face). End position resolved best-effort via get_bounding_box on the active part. diameter_at_end_mm: Diameter of the shaft at the end being cut. Used to compute the tangent-plane offset (= D/2). Must be greater than keyway_depth_mm + 1.0 (need at least 1mm of remaining material below the cut). keyway_width_mm: Slot width perpendicular to the shaft axis. Standard DIN 6885 widths (Ø range → width): Ø6-8 → 3mm, Ø10-12 → 4mm, Ø13-17 → 5mm, Ø18-22 → 6mm, Ø22-30 → 8mm, Ø30-38 → 10mm. Default 5mm (covers Ø13-17). keyway_length_mm: Slot total axial length (including rounded ends). Must be greater than width (slot is rectangle + 2 semicircles; degenerate when length ≤ width). Default 15mm. keyway_depth_mm: Cut depth from the shaft surface inward. Standard ~D/8 for power transmission. Default 2.5mm. axial_offset_from_end_mm: Distance from the shaft end face to the nearest slot edge. Default 5mm (typical clearance for keystock insertion).

Returns dict: cut: Feature info for the extrude_cut (cut_extrude). plane: Plane dict (name, parent_plane, offset_mm) for the tangent reference plane. input echoes (end, diameter_at_end_mm, keyway_*_mm, axial_offset_from_end_mm). keyway_start_x_mm, keyway_end_x_mm: DERIVED — world-X positions of the slot edges. Use these to verify the cut landed where you intended. shaft_bbox_mm: {"min", "max", "size"} — the bbox we resolved the axial position from. Reported so the caller can audit the best-effort end resolution (multi-feature parts — shaft plus flange disk, end cap, etc. — may have bbox X-extremes that aren't the shaft tip). warning: present (string) ONLY if the resolved keyway overlaps the bbox extent — non-fatal, surfaces the question to the caller without raising.

Caveat (orientation): assumes shaft axis = world +X, shaft cross- section centered on Y=Z=0. This matches build_stepped_shaft's contract. For shafts in arbitrary orientation, use the primitive chain (create_reference_plane → create_sketch → create_slot → extrude_cut(reverse_direction=True)) directly.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
endYes
keyway_depth_mmNo
keyway_width_mmNo
keyway_length_mmNo
diameter_at_end_mmYes
axial_offset_from_end_mmNo
Behavior5/5

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

Without annotations, description fully discloses internal steps, the critical reverse_direction flag, axis assumption, resolution of end position, and return fields including warnings. No contradictions.

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?

Well-structured with overview, workflow, critical note, parameter list, returns, and caveat. Every sentence adds value; front-loaded with purpose. Appropriate length for complexity.

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

Completeness5/5

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

Given no output schema and no annotations, description covers input, output, side effects, constraints, and verification fields. Complete for a tool with 6 parameters and internal steps.

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

Parameters5/5

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

Schema has 0% coverage, but description adds complete semantic meaning for all 6 parameters: defaults, constraints, standard DIN width table, and specific usage notes for each.

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?

Describes specific verb (add) and resource (axial keyway cut into shaft end), includes junior workflow example, and distinguishes from siblings like extrude_cut and build_stepped_shaft. No ambiguity.

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

Usage Guidelines5/5

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

Explicitly states when to use: after building a shaft with build_stepped_shaft, and provides a caveat for arbitrary orientation suggesting alternative primitive chain. Includes critical parameter behavior.

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/danielproxd2/solidworks-mcp'

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