Skip to main content
Glama

add_end_keyway

Create a DIN 6885 keyway in a shaft end. Inputs define the end, shaft diameter, slot dimensions, and offset from the end face.

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?

Despite no annotations, the description fully discloses the tool's composition and critical non-obvious behavior: reverse_direction=True for the extrude cut. Also explains orientation assumptions, return values, and warnings.

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

Conciseness4/5

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

The description is long but well-structured with clear sections for workflow, args, returns, and caveats. Every sentence adds value, though it could be slightly more concise.

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 the tool's complexity (6 params, orientation constraints, non-obvious extrude direction), the description is thorough. It explains all return values, including derived metrics and warnings, which is essential since no output schema exists.

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?

All six parameters are described in detail with units, defaults, constraints, and context (e.g., standard DIN widths, derivation of keyway_start/end_x_mm). The schema coverage is 0%, so the description fully compensates.

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 the tool adds a DIN 6885-style axial keyway cut into a shaft end. Provides specific verb and resource, distinguishes from sibling tools like build_stepped_shaft and the primitive chain.

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 the tool operates on an active part with a shaft along world X, typically built with build_stepped_shaft. Provides a junior workflow example and explicitly tells when not to use (arbitrary orientation) with alternative.

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/MCP_CAD'

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