Skip to main content
Glama

add_spring

Add a helical compression spring to a mechanical design by specifying wire diameter, outer diameter, free length, and coils. Returns spring rate and dimensions.

Instructions

Add a helical compression spring: a round wire swept along a cylindrical helix.

All lengths in mm; angles n/a. wire_diameter: wire (stock) diameter d, mm. outer_diameter: spring outer diameter OD, mm (must be > wire_diameter). free_length: uncompressed overall length along the axis, mm. coils: number of turns (active coils), may be fractional. kind: 'compression' (only supported mode in v1; end coils are not squared yet). placement: optional [x, y, z] mm translation of the spring's base.

Geometry: mean coil diameter D = outer_diameter - wire_diameter; coil pitch = free_length / coils. Spring rate is computed for STEEL (shear modulus G = 79.3 GPa) as k = Gd^4 / (8D^3*coils), reported in N/mm.

Returns {handle, name, volume (mm^3), mean_diameter (mm), free_length (mm), coils, kind, solid_height (mm, = coils*wire_diameter, the fully-compressed block height), spring_rate_n_per_mm (N/mm)}. Use free_length, solid_height and spring_rate_n_per_mm to spec the spring into a mechanism (available travel = free_length - solid_height; force = spring_rate_n_per_mm * deflection).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
kindNocompression
nameNoSpring
coilsYes
placementNo
free_lengthYes
wire_diameterYes
outer_diameterYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.3/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does disclose meaningful behavior: material assumption (STEEL, G=79.3 GPa), spring-rate formula, return fields, and limitations such as unsquared end coils. It does not discuss document state, permissions, or side effects, so it is strong but not exhaustive.

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 front-loaded with purpose, then organized into parameter meanings, geometry formula, and returned values. Despite its length, each section adds needed engineering context for a 7-parameter CAD insertion tool.

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?

There is no output schema and no annotations, so the description must carry both usage and return-value context. It does so by listing the exact return fields, their units, and how to use them in a mechanism, making the definition complete for correct invocation.

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

Parameters4/5

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

Schema description coverage is 0%, so the description must compensate, and it does for almost every parameter: units, definitions, constraints (OD > wire_diameter), placement format, and fractional coils are explained. The 'name' parameter is not described, leaving one minor gap.

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?

The description states a precise verb and resource: 'Add a helical compression spring: a round wire swept along a cylindrical helix.' It also specifies the supported mode ('compression' only in v1) and distinguishes the result from generic helix or other add_* mechanical components.

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

Usage Guidelines3/5

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

The description gives useful constraints such as 'kind: compression (only supported mode in v1)' and notes that end coils are not squared, but it does not explicitly say when to choose this tool over siblings like spring_check, helix, or add_gear. Usage is implied rather than guided.

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