Skip to main content
Glama

Add Spring

add_spring

Create a parametric helical compression spring with specified wire diameter, outer diameter, free length, and coil count. Returns spring rate, solid height, and volume to verify available travel and force for mechanism design.

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.6/5.0
Behavior5/5

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

The description goes well beyond the sparse annotations by disclosing key limitations: only 'compression' is supported, end coils are not squared yet, and spring rate assumes steel with a fixed shear modulus. It also explains exactly what the tool computes and returns, giving the agent solid behavioral expectations.

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 long but tightly organized into definition, parameter details, geometry formulas, and return values. Every sentence carries distinct technical value, and the core purpose is front-loaded.

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?

With no output schema, the description thoroughly documents the return object and explains how to use derived values like free_length, solid_height, and spring_rate_n_per_mm. All input constraints and behavioral assumptions are covered, so an agent can invoke the tool and interpret results correctly.

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 0%, but the description fully compensates by defining each parameter with units, constraints, defaults, and geometric meaning. It adds important relationships such as outer_diameter > wire_diameter, fractional coils, and placement coordinates, plus derived output semantics.

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 names a specific verb and resource: 'Add a helical compression spring' and immediately defines the geometric construction. It clearly distinguishes this tool from other add_* and spring_check siblings by scoping it to compression-spring creation.

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 makes it clear that this tool creates a compression spring and lists its constraints and supported mode, but it never explicitly names alternatives or states when to prefer another tool. Usage context is implied rather than directly contrasted with siblings.

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