Skip to main content
Glama

Add Rack

add_rack

Add a linear gear rack solid with standard full-depth teeth, configurable module and tooth count, to mesh with a matching spur gear and size rail travel.

Instructions

Add a linear gear rack (a spur gear's straight counterpart) as a solid.

A rack is a gear of infinite radius: straight-flanked teeth on a rail. Standard full-depth tooth form (addendum = module, dedendum = 1.25module, tooth height = 2.25module, flanks at pressure_angle from vertical).

teeth: number of teeth (>= 1). module: mm (sets tooth size; circular pitch = module * pi). height: extrusion thickness mm along +Y (the rack's face width; default 6). width: mm, rail base-band thickness below the tooth root line (default 10). pressure_angle: deg, flank angle from vertical (default 20; 0 < pa < 45). placement: optional [x, y, z] mm translation of the rack origin. name: object label (default "Rack").

The profile lies in the XZ plane: root line at z=0, base band from z=-width to z=0, teeth from z=0 to z=2.25*module, extruded along +Y by height.

Returns {handle, name, volume (mm^3), pitch (mm/tooth = modulepi), module, teeth, tooth_height (2.25module mm), length (teethmodulepi mm)}. A spur gear MESHES with this rack when their pitch values match (gear module*pi == rack pitch); length sizes the rail for the travel.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "teeth": "<teeth>",
      "module": "<module>"
    },
    "name": "add_rack"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameNoRack
teethYes
widthNo
heightNo
moduleYes
placementNo
workspaceNoRun this call in this named workspace
pressure_angleNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.5.7
    • addedInput schema / properties / workspace
      Added value: +{
      +  "default": "",
      +  "description": "Run this call in this named workspace",
      +  "title": "Workspace",
      +  "type": "string"
      +}
  2. First observed

TDQS

A4.4/5.0
Behavior4/5

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

Annotations declare a non-readonly, non-destructive, closed-world creation call; the description goes beyond that by disclosing the return payload (handle, volume, pitch, length), the coordinate frame (profile in XZ, extruded along +Y), and default values for optional geometry. It does not mention document/workspace prerequisites or that a solid is added to the active document, which is a minor gap.

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?

Front-loaded one-line definition followed by a compact geometry primer and a per-parameter block — a good structure for a parametric CAD tool. Slightly long, and the tooth-form algebra (addendum/dedendum/tooth height) partially duplicates information already expressed via `module` and in the return value description.

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

Completeness4/5

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

With no output schema, the description correctly spells out the returned fields and their units, plus the pitch-matching rule needed to mate the rack to a gear. The main omission is the surrounding document context (which document/workspace the solid lands in and whether one must be active).

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 description coverage is only 13% (only `workspace` is documented), so the description must carry the load — and it does: it defines teeth, module (circular pitch = module*pi), height (face width along +Y), width (base band below root line), pressure_angle (flank angle from vertical, 0 < pa < 45), placement (translation of origin), and name. Units and defaults are given for each. Only `workspace` is left unexplained.

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?

Specific verb + resource ('Add a linear gear rack ... as a solid') with a parenthetical that defines the geometry relative to a spur gear. It also implicitly distinguishes itself from the sibling add_gear by naming the meshing relationship, so an agent can tell which primitive to reach for.

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

Usage Guidelines4/5

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

The closing note gives concrete selection logic: a spur gear meshes with this rack when `pitch` values match, and `length` sizes the rail for travel. That is actionable context for choosing between rack and gear. It stops short of explicit when-not guidance (e.g. versus add_primitive for a plain bar), so a 4 rather than 5.

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

Deploy Server

Other Tools