Skip to main content
Glama

Mechanism Kinematics

mechanism_kinematics
Read-only

Compute exact closed-form planar mechanism kinematics for four-bar, slider-crank, and Gruebler mobility checks; use results as a static pre-check before submitting simulations.

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.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "mechanism_kinematics"
  }
}

Input Schema

NameRequiredDescriptionDefault
crankNo
configNoopen
groundNo
jointsNo
planarNo
rockerNo
couplerNo
n_linksNo
n_stepsNo
crank_mmNo
conrod_mmNo
mechanismNofourbar
workspaceNoRun this call in this named workspace
wrist_offset_mmNo

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.3/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and openWorldHint=false, so safety is covered; the description adds meaningful behavior beyond that — closed-form/exact computation with no external solver, per-mechanism return structure, and explicit failure behavior ('raises on an unknown mechanism or a link set that cannot close'). It omits notes on cost/runtime or how n_steps affects the sampled output.

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 one-line purpose and the sibling relationship, then organized as per-mechanism bullets with input→output mappings. It is information-dense but nearly every clause carries parameter or return-value meaning; slightly heavy notation (nested dict keys inline) reduces readability marginally.

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 14 optional params and no output schema, the description carries a heavy burden and mostly meets it by spelling out the returned keys per mechanism and the raise conditions. The missing pieces — what n_steps controls (sampling density for coupler_path) and what planar toggles — are the only real holes 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 only 7% across 14 params, so the description must compensate, and it largely does: it maps crank/coupler/rocker/ground, config 'open'|'crossed', crank_mm/conrod_mm/wrist_offset_mm, and n_links+joints to their respective mechanism branches, and clarifies semantics such as stroke being exactly 2·R independent of conrod. Gaps remain for n_steps and planar, which are never explained.

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+resource ('closed-form planar mechanism kinematics') with a clear scope qualifier ('exact, NO external solver') and enumerates exactly which three mechanism types it computes. It also names the sibling it complements (mechanism_simulate_submit), so an agent can distinguish it without opening the 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?

Explicitly positions itself as 'the static pre-check / gate for mechanism_simulate_submit', which tells the agent the correct call ordering relative to a sibling. It does not state explicit when-not conditions (e.g. use the simulate submit directly when dynamic response is needed), 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