Skip to main content
Glama
codersag

ls-dyna-mcp

by codersag

add_keyword_commands

Insert raw LS-DYNA keyword snippets for cards without native Mechanical objects (e.g. *CONTROL_ENERGY, *DEFINE_CURVE) into a chosen model scope, with blank-line cleanup.

Instructions

Add a Keyword Snippet (Commands object) holding raw LS-DYNA keyword text, for cards Mechanical has no native object for (e.g. *CONTROL_ENERGY, *DEFINE_CURVE). Leading/trailing blank lines are stripped: trailing blanks are read as empty mandatory cards and break the solve. INCLUDE cards in the text may only name files inside the allowed folders (the solver itself would otherwise open them, e.g. a network path). Args: keywords (must start with a '' card such as *CONTROL_ENERGY; do NOT add *KEYWORD, the snippet goes inside the deck Mechanical writes); analysis_index; scope_path: where to insert it, as a dotted path from the Model, e.g. "Geometry.Children[0].Children[0]" for a body (*MAT, *EOS, *HOURGLASS) or "Connections" (contact types the system lacks). Empty = under the analysis (any keyword).

Input Schema

NameRequiredDescriptionDefault
keywordsYes
scope_pathNo
analysis_indexNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.9.2

TDQS

A3.9/5.0
Behavior4/5

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

With no annotations provided, the description carries the full behavioral burden and adds substantial context: blank-line stripping, why trailing blanks break the solve, *INCLUDE folder restrictions, and the prohibition on adding *KEYWORD. It still does not describe permissions, idempotency, or what the returned Commands object looks like, though an output schema exists.

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 description is front-loaded with the main action and purpose, then supplies caveats and parameter guidance. It is somewhat long, but each caveat is actionable and tied to real failure modes. Minor structural awkwardness comes from the inline 'Args:' block, but overall it is efficient.

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 complex deck-mutation tool with no annotations, the description covers the key operational risks and the insertion scope well. An output schema exists, so return-value detail is less necessary. The main gap is the unexplained analysis_index parameter, which leaves one part of invocation ambiguous.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/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 explain all three parameters. It gives strong semantics for keywords (must start with a '*' card, do not add *KEYWORD) and scope_path (dotted path examples and empty behavior), but analysis_index is only named and not explained. That is useful compensation but not complete.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb and resource: adding a Keyword Snippet (Commands object) containing raw LS-DYNA keyword text. It clearly scopes the tool to cards Mechanical has no native object for, such as *CONTROL_ENERGY and *DEFINE_CURVE. It does not explicitly distinguish this from sibling tools like build_keyword or create_lsdyna_system_snippet, so it stops short of a 5.

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?

It gives clear usage context: use this for cards that Mechanical has no native object for, and it explains where the snippet can be inserted via scope_path. It also provides important constraints around *INCLUDE file paths and not adding *KEYWORD. However, it does not explicitly say when to prefer this over alternatives such as build_keyword or describe_keyword.

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