Skip to main content
Glama
EvgenVer

lira-sapr-mcp

by EvgenVer

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault

No arguments

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

This server publishes no instructions, or was last inspected before Glama recorded them.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{
  "listChanged": false
}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}

Tools

Functions exposed to the LLM to take actions

NameDescription
lira_statusA

Installed LIRA versions, the one this server uses, and whether it is connected.

When connected, also lists the API capabilities and input table names of that LIRA release, and the tools it cannot run. Does not start LIRA.

lira_list_modelsB

Models open in LIRA now: title, file path, model type, unsaved changes, active.

lira_open_modelB

Open a .lir model file in LIRA (starts LIRA if needed) and make it active.

lira_create_modelA

Create an empty model.

model_type is LIRA's system label (degrees of freedom per node): 1 = 2D XOZ truss (X, Z); 2 = 2D XOZ frame (X, Z, UY); 3 = grillage/plate XOY (Z, UX, UY); 4 = 3D truss (X, Y, Z); 5 = general 3D (X, Y, Z, UX, UY, UZ). LIRA's type library also has 6 and 15 (other schemes; see LIRA's documentation). title: up to 30 characters, no , . < > ( ) # ? * | \ / : save_as: optional .lir path to save the new model to right away.

lira_save_modelA

Save a model (default: the active one). save_as: new .lir path ("Save as").

Before overwriting an existing file for the first time in this session the server copies it into a backup folder next to the model; the result names the copy.

lira_close_modelA

Close a model (default: the active one).

Refuses to close a model with unsaved changes unless discard_changes is true. A model the server has only read is saved before closing (after a backup) in case it was edited in LIRA's window meanwhile.

lira_list_backupsA

Backups the server made of a model file (a .lir path or an open model; default the active one), newest first. They lie in the lira-mcp-backups folder next to the model; the server never deletes them.

lira_restore_backupA

Put a backup (path from lira_list_backups; default the newest) back in place of the model file. The current file is backed up first, so restoring the newest backup again undoes this. An open model is closed and opened again; it must have no unsaved changes unless discard_changes is true. Analysis results in LIRA's work folder still belong to the replaced version: analyse again.

lira_model_pictureA

A PNG picture of a model (default: the active one) as LIRA draws it: with its loads, numbers and colours as set in LIRA's window. view: isometric, xoz, xoy or current (LIRA's view is switched to it and fitted to the window). save_path: also write the PNG there (absolute .png path). LIRA's window must not be minimized.

lira_model_summaryA

Overview of a model (default: the active one): model type, LIRA's current input units, number of nodes and elements, elements per finite element type, stiffnesses, load cases and "results": whether LIRA keeps analysis results for it, when they were written, and a note when they belong to another version or same-named model. Start here before reading or changing a model. Table formats and FE type codes: resource lira://reference/tables.

lira_list_input_tablesA

Names of the input tables this LIRA release supports (starts LIRA if needed).

Typical: Nodes_Coordinates (number, X, Y, Z), Elements_TypeAndNodes (number, FE type, "node, node, ..."), Nodes_Restraints (node + 6 flags X Y Z UX UY UZ), Stiffnesses, Elements_Stiffnesses (element, stiffness number), LoadCases, DCL. Columns of every table, FE type codes and the text format: resource lira://reference/tables. Read a table first to see its value format.

lira_read_tableB

Rows of an input table (default model: the active one).

numbers: only these nodes/elements, as a list or "1-10 15". Values use LIRA's current units (see lira_model_summary). Empty cells are null. Large tables are paged with offset/limit; the result says how many rows there are in total.

lira_write_tableA

Write rows into an input table and apply them to the model.

Without numbers the rows replace the whole table: rows with new numbers add objects (e.g. nodes). With numbers only those objects' rows are replaced. LIRA checks the rows; on any error nothing changes and the errors are returned with 0-based row/column. The model file is backed up before its first change.

lira_read_loadsB

Loads of a model, from LIRA's text export.

Each load: case, target (node number if on_node, else element number), type (LIRA load type code; 0 = nodal force/moment, 6 = uniform load on a bar), direction (1 X, 2 Y, 3 Z; nodal moments 4 UX, 5 UY, 6 UZ), values (in the units of the text format, see the model's document 0 key 33).

lira_set_loadsA

Replace loads of a saved model: of load_cases only, or all loads when omitted.

loads: [{case, target, type, direction, values}] as returned by lira_read_loads. LIRA has no API for loads, so the server rebuilds the model through LIRA's text format, copies every input table back, verifies tables and loads, and only then overwrites the file (after a backup). If verification fails, nothing changes. Models whose combination norms differ from those LIRA gives a model rebuilt from text are refused: the rebuild would change their load case kinds. Data that is neither in input tables nor in the text format cannot be verified: check the model in LIRA after this call.

lira_import_text_modelA

Create a model from LIRA's text input format and save it as save_as (.lir).

The text format describes nodes, elements, stiffnesses, restraints and loads in numbered documents, e.g. ( 1/ elements ) ( 3/ stiffnesses ) ( 4/ coordinates ) ( 5/ restraints ) ( 6/ loads ) ( 7/ load values ). The best way to learn it is to export a similar model with lira_export_text.

lira_export_textC

The whole model in LIRA's text input format (documents 0-8 and more).

lira_add_nodesB

Add nodes [[X, Y, Z], ...] (in LIRA's geometry unit) after the last node; returns their numbers.

lira_add_elementsA

Add elements of one FE type after the last element; returns their numbers.

nodes: one node list per element, e.g. [[1, 2], [2, 3]] for bars. fe_type: LIRA's FE type code (10 universal space bar, 11 plate, 41/44 shells; see resource lira://reference/tables). stiffness: a stiffness number from lira_model_summary; without it the elements have no stiffness and the analysis will fail.

lira_set_stiffnessA

Assign a stiffness (number from lira_model_summary) to elements, given as [1, 5] or "1-10 15". To make a group stiffer or softer, create a stiffness with lira_copy_stiffness and assign it here.

lira_copy_stiffnessA

Create a stiffness as a copy of stiffness source with some parameters changed, named as in the Stiffnesses table: e.g. {"B": 80, "H": 60} for a rectangle (cm), "E" (t/m2), "Ro" (density, t/m3). LIRA derives areas and inertias again. Returns the new number; assign it with lira_set_stiffness.

lira_set_restraintsB

Restrain nodes: the given directions (X Y Z UX UY UZ) become fixed and the others free; [] frees the nodes. E.g. ["X", "Y", "Z", "UX", "UY", "UZ"] fixes.

lira_self_weightA

Add self weight loads to load_case (LIRA creates the case if needed) for all elements, or only elements, whose sections have a density, multiplied by safety_factor. delete_all=true removes all self weight loads instead (load_case is then ignored). Check the loads with lira_read_loads (type 16).

lira_run_analysisA

Analyse a saved model (default: the active one).

LIRA analyses the .lir file on disk, so save changes first (lira_save_model). With wait=true the call returns when the analysis ends or timeout_s passes (the analysis then keeps running: poll lira_analysis_status). The result includes the protocol verdict and every warning line (e.g. a geometrically unstable structure still "finishes", with warnings). Status "needs_user" means a LIRA dialog waits. LIRA closes the model after the analysis: reopen it to continue editing.

lira_analysis_statusA

State of the last analysis started by this server: running, finished, failed, stopped or needs_user; with the protocol summary when it has ended. wait_s > 0 waits up to that many seconds for a running analysis to end.

lira_stop_analysisB

Ask LIRA to stop the running analysis.

lira_delete_resultsA

Delete the analysis results of a model (a .lir path, which may be closed, or an open model; default: the active one) from LIRA's work folder. The model file is not changed; lira_run_analysis creates the results again. LIRA keeps results by model name, so this also deletes results of a same-named model from another folder.

lira_analysis_protocolA

The solver's protocol of the last analysis of a model (default: the active one, or the model analysed last), last tail_lines lines.

lira_node_displacementsA

Node displacements of load cases after lira_run_analysis.

model: .lir path (may be closed), open model, or default the model analysed last. nodes: [1, 5] or "1-10 15" (default all); load_cases: default all. Components: X Y Z (in the displacement unit set in LIRA), UX UY UZ (rad). Dynamic load cases give a row per shape ("shape" = mode number).

lira_element_forcesB

Internal forces and stresses of elements in load cases after lira_run_analysis, answered per element family, since each family has its own components:

bar: N, Qy, Qz (force), Mx, My, Mz (forcelength), Ry, Rz (soil), Bw, Tw; plate: Nx, Ny, Nz, Txy, Txz (stress), Mx, My, Mxy (forcelength/length), Qx, Qy (force/length), Rz (soil pressure); solid: Nx, Ny, Nz, Txy, Txz, Tyz; special, special_58_59, special_310, special_264: their forces. Units are those set in LIRA and are listed per component. One row per element, load case, shape (dynamic load cases only: the mode number) and design section (bars: section 1 = start; set the count in Elements_DesignSectionsCount). families: e.g. ["bar"] (default all); query arguments apply within each family.

lira_load_combinationsB

Load combinations (DCL, РСН) of an analysed model: number, name, formula, special and seismic flags, and the building code they follow.

lira_combination_displacementsA

Node displacements in load combinations (DCL, РСН) after lira_run_analysis.

combinations: numbers from lira_load_combinations (default all); otherwise as lira_node_displacements, with "combination" in place of "case".

lira_combination_forcesB

Internal forces and stresses in load combinations (DCL, РСН).

limit_states: 1 ultimate, 2 ultimate with long-term loads, 3 serviceability, 4 serviceability with long-term loads (default all). One row per element, combination, limit state and design section; otherwise as lira_element_forces.

lira_design_forcesC

Design combinations of forces (DCF, РСУ) after lira_run_analysis.

One row per element, design section, limit state (as in lira_combination_forces) and combination "dcf", with its criterion number, internal group (A1, B1, ...), "load_cases" that form it (LIRA's notation: "1-3,-4" = cases 1 to 3 and case 4 with the opposite sign) and "with": crane and/or seismic when included; otherwise as lira_element_forces.

lira_periodsC

Modes of the dynamic load cases (default all): per mode the period (s), frequency (Hz and rad/s), modal mass and accumulated modal mass (% of the total) and participation factor; "type" is LIRA's dynamic load type code (e.g. 35, 100).

lira_reinforcementC

Reinforcement selected by LIRA's reinforced concrete design (design_option: LIRA's design variant, default 1). Fixed units: areas cm2 (plates cm2 per m), PERC/Perc* %, crack widths mm.

bar rows: element, design section, "symmetric" (LIRA designs both an asymmetric and a symmetric variant when asked), AU1-AU4 (corner bars), AS1-AS4 (bars along the faces), PERC, ASW1, ASW2 (stirrups), crack_short, crack_long. plate rows: AS1-AS4 (AS1, AS2 along local X bottom/top, AS3, AS4 along Y), PercX, PercY, PercXY, ASW1, ASW2, crack_short, crack_long. "errors" lists values LIRA could not select.

lira_fragment_loadsC

Loads on fragment: forces RX, RY, RZ, moments RUX, RUY, RUZ and bimoment RBW that the fragment defined in LIRA transfers to its nodes, per node and load case.

lira_punching_loadsC

Loads on punching shear contours around nodes (N, QX, QY forces; MX, MY, MZ moments) per node and load case, for contours defined in LIRA.

lira_run_scriptA

Run Python code inside the server with full access to LIRA, for anything the other tools do not cover. Prefer the dedicated tools when one fits.

Names available: lira (LIRA's Application COM object), doc (the document of model, default the active one; None if none is open), adapter (the server's LIRA adapter: read_table(ref, name), write_table(ref, name, rows), units(), node_displacements(path, nodes, cases), element_forces(...), ...), constants (LIRA's enum constants, e.g. constants.kLiraTable_Nodes_Coordinates). Assign result to return a JSON value; print() output is returned as "output". The model file is backed up first. Python code stops after timeout_s; a COM call that hangs (e.g. LIRA shows a dialog) is not interrupted. LIRA's API description: LIRA-FEM COM type library "LiraSapr" (see lira_status capabilities).

lira_dialogsA

Modal dialogs LIRA shows now: title, text and buttons. A call that timed out or an analysis with status needs_user usually waits for one of them.

lira_press_dialog_buttonA

Press a button of LIRA's dialog by its text (e.g. "OK", "Да", "Отмена"; case and '&' ignored). title: part of the dialog's title, needed when LIRA shows several. Press only dialogs your own calls caused; the user may be answering others. Returns the dialogs still shown.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription
tables_referenceColumns of LIRA's input tables, FE type codes, model types and the text input format, with what is verified and what is only observed.

TDQS

B3.3/5.0

Scored across 41 tools

Disambiguation4/5

Most tools target clearly distinct resources or phases: model lifecycle, table access, loads, analysis control, and result queries. A few boundaries are softer, such as lira_analysis_protocol vs. lira_analysis_status, lira_read_table vs. lira_export_text, and generic lira_write_table vs. dedicated add/set tools, but descriptions generally disambiguate them.

Naming Consistency4/5

All tools use a consistent lira_ prefix and snake_case, which is predictable across the set. The main deviation is that many result/query tools are noun phrases rather than verb_noun actions, but the style remains coherent.

Tool Count2/5

41 tools is heavy for a single MCP server, with many result-query tools that could be consolidated or reached through fewer parameterized endpoints. The complexity of LIRA partly justifies breadth, but the surface is still over 25 tools and feels sprawling.

Completeness4/5

The tool surface covers model creation/opening/saving, backups, table editing, loads, analysis control, result extraction, design results, and dialog handling. Minor gaps remain, such as explicit deletion of nodes/elements or load cases and direct editing of load combinations, though lira_write_table and lira_run_script provide workarounds.

Maintenance

ActivityMaintained
ResponsivenessNo issues