Skip to main content
Glama

FEM Add Constraint

fem_add_constraint

Adds structural or thermal FEM constraints to face/edge tags and resolves them against live geometry so references survive unrelated edits.

Instructions

Add a constraint by face/edge tag (Slice 1).

kind: structural: 'fixed' | 'force' | 'pressure' | 'displacement' thermal: 'temperature' | 'heatflux' | 'initial_temperature' refs: list of {handle, tag} dicts; 'tag' may be a face tag (f_...) or edge tag (e_...). Resolved against the live shape so refs survive unrelated geometry edits.

For 'force': force (N), optional direction {handle, edge|tag}. For 'pressure': pressure (MPa). For 'displacement': x/y/z (mm) or x_free/y_free/z_free. For 'temperature' / 'initial_temperature': temperature (°C / K). For 'heatflux': flux_type ('DFlux'|'Convection'|'Radiation'), and DFlux: flux (W/m²); Convection: ambient_temp (°C) + film_coef (W/m²K); Radiation: ambient_temp + emissivity.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "analysis": "<analysis>",
      "kind": "<kind>",
      "refs": "<refs>"
    },
    "name": "fem_add_constraint"
  }
}

Input Schema

NameRequiredDescriptionDefault
xNo
yNo
zNo
fluxNo
kindYes
nameNo
refsYes
forceNo
x_freeNo
y_freeNo
z_freeNo
analysisYes
pressureNo
reversedNo
directionNo
film_coefNo
flux_typeNo
workspaceNoRun this call in this named workspace
emissivityNo
temperatureNo
ambient_tempNo

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

B3.4/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=false and destructiveHint=false, so the mutation-but-safe profile is covered. The description usefully adds that refs are resolved against the live shape and survive unrelated geometry edits, but says nothing about failure modes for stale/invalid tags, idempotency, or whether constraints can be removed or replaced later.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Purpose is front-loaded in one line, then a kind table followed by per-kind parameter blocks — exactly the structure an agent needs for a polymorphic tool. No filler sentences; every line conveys either a valid value, a tag format, or a unit.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Parameter guidance is thorough and no output schema exists, so return values need no explanation. However, for a required-argument mutation tool in a multi-step FEM workflow, the description omits prerequisites, ordering, and what happens when a tag no longer resolves — which is the information an agent most needs before invoking it.

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?

With only 5% schema description coverage across 21 parameters, the description does the heavy lifting: it enumerates valid kind values, the {handle, tag} ref shape with f_/e_ prefixes, and which fields apply per constraint type with units (N, MPa, mm, °C/K, W/m²) and the three heatflux sub-forms. Gaps remain: 'analysis' (required), 'name', and 'reversed' are never explained, and the direction object's keys are only partly specified.

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?

States a specific verb and resource ('Add a constraint') and scopes it to FEM face/edge tags, which separates it from add_sketch_constraint in the sibling list. The parenthetical '(Slice 1)' is internal jargon that adds no meaning for an agent.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The kind list implies usage, but nothing says when to call this versus alternatives or in what order relative to fem_new_analysis, fem_set_material, fem_mesh, fem_run. It also never states the obvious prerequisite that a live shape and an existing analysis must already be in place.

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