Skip to main content
Glama
codersag

ls-dyna-mcp

by codersag

compare_early_results

Compares a short LS-DYNA run's early-time scalar history against a reference CSV, returning relative error and tolerance verdict so you can validate the model before committing to a long run.

Instructions

Early-time gate: compare a scalar history of a short run with a reference CSV (time,value) before committing to the long run. quantity: 'glstat:kinetic_energy' (glstat, or the binout glstat) or '::' for matsum, rcforc, sleout, spcforc, rwforc, nodout (for example 'matsum:1:kinen', 'nodout:5:x_vel'). The reference is interpolated at the simulation's output times inside [t_min, t_max] and multiplied by reference_scale (unit conversion; times must already be in the model's unit). Returns points compared, max and RMS relative error (%), the worst point, the first time the error exceeds tolerance_pct and a verdict within_tolerance / exceeds. A mismatch means diagnose the model (audit_deck, compare_decks): never tune parameters to match an experiment. No solver is run. Args: working_dir, reference_csv, quantity, t_min, t_max, tolerance_pct, reference_scale

Input Schema

NameRequiredDescriptionDefault
t_maxNo
t_minNo
quantityYes
working_dirYes
reference_csvYes
tolerance_pctNo
reference_scaleNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.9.2

TDQS

A4.6/5.0
Behavior5/5

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

No annotations exist, so the description carries the full burden and does: reference values are interpolated at the simulation's output times within [t_min, t_max], scaled by reference_scale for unit conversion with the warning that times must already be in the model's unit, and 'No solver is run' sets cost expectations. It also names the verdict vocabulary (within_tolerance / exceeds) and the first-exceedance time.

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?

The gate purpose is front-loaded in the first clause and the body is information-dense with little filler. The trailing 'Args: working_dir, reference_csv, ...' line merely restates parameter names already in the schema and earns no place.

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 annotations and an output schema present, the description covers workflow, units, failure handling and cost, which is nearly everything an agent needs. It omits where the simulation-side history is read from inside working_dir, a non-trivial prerequisite for correct invocation.

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% across 7 parameters, and the description compensates strongly: it documents quantity syntax with three concrete examples ('glstat:kinetic_energy', 'matsum:1:kinen', 'nodout:5:x_vel'), the reference_csv column layout (time,value), what t_min/t_max bound, and the purpose of reference_scale and tolerance_pct. Only working_dir is left to inference.

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?

Uses a specific verb ('compare') on a specific pair of resources (a scalar history from a short run vs. a reference CSV), framed as an 'Early-time gate'. The scope ('before committing to the long run') distinguishes it from sibling analysis tools such as compare_decks or read_glstat.

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?

Gives a clear trigger ('before committing to the long run') and explicit routing on failure ('diagnose the model (audit_deck, compare_decks): never tune parameters to match an experiment'). It never states the precondition that a completed short run's results must already exist in working_dir, nor a when-not-to-use case, so it stops 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.