Skip to main content
Glama

mechanism_kinematics

Computes closed-form planar mechanism kinematics for four-bar, slider-crank, and Gruebler linkages, validating link closure and reachable positions before simulation.

Instructions

Closed-form planar mechanism kinematics — exact, NO external solver (the static pre-check / gate for mechanism_simulate_submit). Pick mechanism:

  • 'fourbar': link lengths crank/coupler/rocker/ground -> {mobility_dof (=1), grashof: {condition, type, input_crank_fully_rotates, shortest}, reachable, n_reached, coupler_path [[x,y]...], reachable_bbox_mm}. config 'open'|'crossed'.

  • 'slider_crank': crank_mm/conrod_mm (+ wrist_offset_mm) -> {stroke_mm (exactly 2·R in-line, independent of conrod), x_tdc_mm, x_bdc_mm, inline_stroke_exact}.

  • 'gruebler': n_links (incl. ground) + joints ([{type}...]) -> {mobility_dof}.

Returns the per-mechanism dict above. Raises on an unknown mechanism or a link set that cannot close.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
crankNo
configNoopen
groundNo
jointsNo
planarNo
rockerNo
couplerNo
n_linksNo
n_stepsNo
crank_mmNo
conrod_mmNo
mechanismNofourbar
wrist_offset_mmNo

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 well: it discloses that results are exact with NO external solver, that it raises on an unknown mechanism or a non-closing link set, and what it returns. It does not explicitly state that the call is side-effect-free/read-only, which would complete the picture.

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 with the key framing (exact, no solver, gate for the sibling), then organized into per-mechanism bullets. The output-dict enumeration is dense but justified since there is no output schema; minor redundancy in restating the return dict at the end.

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?

For a 13-parameter tool with no annotations and no output schema, the description covers the three mechanism modes, their inputs, return shapes, and error behavior, which is substantial. The unaddressed `n_steps`/`planar` params and the absent read-only statement keep it from a 5.

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 largely does: it maps crank/coupler/rocker/ground to 'fourbar', crank_mm/conrod_mm/wrist_offset_mm to 'slider_crank', n_links/joints to 'gruebler', and documents `config` values. However, `n_steps` and `planar` are never explained, leaving two of thirteen parameters undocumented.

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?

States a specific verb and resource ('closed-form planar mechanism kinematics') and explicitly positions itself relative to a sibling ('the static pre-check / gate for mechanism_simulate_submit'). An agent can distinguish it from mechanism_simulate_submit without opening a schema.

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?

Clearly frames the tool as a gate/pre-check before mechanism_simulate_submit and tells the agent which `mechanism` value to pick for each analysis. It lacks explicit when-not-to-use guidance (e.g., when to skip straight to the simulate submit), so it falls short of a 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