Skip to main content
Glama
codersag

ls-dyna-mcp

by codersag

set_dynain_output

Adds an *INTERFACE_SPRINGBACK_LSDYNA keyword to make LS-DYNA write a dynain file with final deformed shape and stress state in ASCII, binary, both, or lsda format for restart or initial-state decks.

Instructions

Make the run write a dynain (final deformed shape and stress state) in the format you can use, by adding a *INTERFACE_SPRINGBACK_LSDYNA keyword snippet. Checked on the real solver: FTYPE 0 writes an ASCII dynain (which prepare_dynain can turn into an initial-state deck), 1 writes dynain.bin, 2 both, 3 dynain.lsda (the Workbench default, not convertible here). The Workbench setting 'Stress File for flexible parts' cannot choose ASCII through scripting, so leave it off (0) or the deck gets two springback cards. Args: psid (the part set to write; must exist unless part_ids_json is given), fmt (ascii | binary | both | lsda), part_ids_json (JSON list of part ids: a *SET_PART_LIST with this psid is added), analysis_index

Input Schema

NameRequiredDescriptionDefault
fmtNoascii
psidYes
part_ids_jsonNo[]
analysis_indexNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.9.2

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 load well: it discloses the side effect (a springback keyword card is injected), the FTYPE semantics verified on the real solver, the duplicate-card failure mode, and the psid/part_ids_json precondition. It stops short of saying whether the call is idempotent or what happens if a springback card already exists, which is the remaining gap for a mutation tool.

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 action and the produced artifact, then the format semantics, then the caveat, then args. Dense and mostly earned, though the Workbench-setting sentence is long and the trailing Args list repeats parameter names the schema already declares.

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?

An output schema exists, so return values need not be explained, and the description covers the mutation, format trade-offs, and preconditions. The only meaningful omission is the unexplained analysis_index and any note about which analysis/connection state the call assumes.

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: psid is explained (must exist unless part_ids_json given), fmt is enumerated with real semantics (ascii | binary | both | lsda mapped to FTYPE 0/1/2/3), and part_ids_json is explained as adding a *SET_PART_LIST with that psid. analysis_index is only named, with no meaning or default behavior described, leaving one of four parameters unexplained.

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 concrete verb and mechanism: 'Make the run write a dynain ... by adding a *INTERFACE_SPRINGBACK_LSDYNA keyword snippet', and names the specific artifact produced. It also positions itself relative to siblings by noting the ASCII dynain is what prepare_dynain can convert, so an agent can tell it apart from the keyword-authoring tools.

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 actionable selection guidance: the FTYPE/format table implies pick ascii if you plan to convert, lsda is 'not convertible here', and it warns to leave the Workbench 'Stress File for flexible parts' setting off or the deck gets two springback cards. It does not explicitly say when to prefer this over add_keyword_commands/create_lsdyna_system_snippet for the same card, but the usage context is clear.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.