DIANA-MCP
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@DIANA-MCP run a modal analysis on my current DIANA model and show the first 10 eigenfrequencies"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
DIANA-MCP
让支持 Model Context Protocol(MCP)的 AI 助手在人工监督下操作 DIANA FEA、读取求解结果,并从本地手册与经验库中检索知识。
English · 快速开始 · 操作指南 · 配置参考 · 架构说明
DIANA-MCP 连接正在运行的 DianaIE 图形界面,也可以调用后台 diana.exe 求解器。它支持建模、网格、分析设置、GUI 修改跟踪、结果解析、手册检索和可审批的经验沉淀。项目不包含 DIANA 软件、许可证或用户手册;运行时只读取用户本机合法安装的 DIANA 文件。
本项目目前在 DIANA 10.5 上开发和验证,不隶属于 DIANA FEA BV。使用者必须自行取得有效的 DIANA 许可证,并对模型、参数和分析结论负责。
主要能力
在 DianaIE 的 GUI 主线程中执行 DIANA Python 命令,AI 和用户看到同一个模型。
识别用户在 GUI 中的修改、撤销/重做和参数新旧值。
在提交调试计算前强制显示完整模型与求解设置,由人工在 DianaIE 中批准。
将通过验证的模型认证为基准模型,再对批准范围内的参数变体自动计算。
后台运行
diana.exe,跟踪增量步、收敛状态、错误和输出文件。读取
.out、.tb和 DianaIE 已加载结果;大表可直接导出 CSV。检索本地 DIANA 用户手册、验证算例、SCHEMA 关键字、脚本 API 和经验手册。
自动起草建模经验,但只有用户明确批准后才标记为“已验证”。
可选 bge-m3 本地语义检索;模型、查询和索引均不上传。
Related MCP server: OpenSTAAD MCP Server
快速开始
1. 准备环境
Windows 10/11,或能够运行 DIANA 的 Linux/Wine 环境;
DIANA 10.5 与有效许可证;
Python 3.10 或更高版本;
支持 MCP stdio 服务的客户端,如 Codex、Claude Code、Claude Desktop 或 Cursor。
2. 安装
git clone https://github.com/ZhangShirui2002/Diana-MCP.git
Set-Location diana-mcp
py -3.11 -m venv .venv
.\.venv\Scripts\python.exe -m pip install --upgrade pip
.\.venv\Scripts\python.exe -m pip install -e .如果需要语义检索:
.\.venv\Scripts\python.exe -m pip install -e ".[vector]"3. 配置 MCP 客户端
先取得虚拟环境 Python 的绝对路径:
(Resolve-Path .\.venv\Scripts\python.exe).Path复制 .mcp.example.json 为 .mcp.json,把其中的 command 改成上述路径。.mcp.json 可能包含本机路径,已默认排除在 Git 之外。
4. 连接 DianaIE
推荐启用自动连接:
.\.venv\Scripts\python.exe -m diana_mcp autostart enable
.\.venv\Scripts\python.exe -m diana_mcp autostart status重新启动 DianaIE 和 MCP 客户端,然后让 AI 依次调用:
diana_status
diana_start
diana_guide(topic="workflow")完整安装、首个模型和故障排查见快速开始。
安全的计算工作流
建模与调试
↓
模型/单位/网格/荷载/求解设置自检
↓
DianaIE 完整展示 + 人工批准
↓
一次验证求解
↓
正常结束、无错误、全部增量步收敛
↓
可信基准模型
↓
人工审批参数范围、自检和质量规则
↓
AI 自动执行批准范围内的参数分析所有求解入口最终都必须消费一个与 .dat、.dcf 文件哈希绑定的一次性许可。直接通过 diana_execute 调用 runSolver 等命令会被阻止。详见建模与调试阶段和参数分析阶段。
文档
文档 | 用途 |
从克隆仓库到连接 DianaIE 的首次成功流程 | |
日常建模、人工审阅、基准认证、参数分析和结果读取 | |
MCP 配置、环境变量、单机/远端拆分部署和向量检索 | |
46 个 MCP 工具的用途和分组 | |
Bridge、求解作业、知识库、状态目录和安全边界 | |
威胁模型、敏感文件和公开仓库检查清单 | |
可选的共享经验库、自动治理、同步和隐私规则 | |
初始化 Git、创建 GitHub 仓库、打标签和发布版本 | |
TABULA 输出及 DIANA 功能覆盖审计 |
知识库与经验手册
知识库默认是用户本地数据,不随源码发布。初始化一个空经验库:
.\.venv\Scripts\python.exe -m diana_mcp knowledge init
.\.venv\Scripts\python.exe -m diana_mcp knowledge status历史 .out 日志、项目路径和经验条目可能包含敏感工程信息。公开前应单独审查;建议把公开经验库作为独立仓库维护。详见安全与隐私。
可选:社区知识网络
DIANA-MCP 支持三层知识融合,而不是把所有用户数据集中上传:
用户本机合法安装中的手册 / API / SCHEMA
+
社区共享经验库(可选同步)
+
用户私有 knowledge/ 仓库
↓
版本感知、来源可追溯的统一检索社区仓库由自动化规则维护:通过格式、DCO、许可证、隐私和可执行内容检查的贡献只能先成为低可信度候选;系统根据独立复现反馈调整可信度并标记争议。PR 头部代码不会被检出或执行。任何本地经验都必须先生成脱敏预览并由用户明确输入该批次的 UPLOAD <batch-id>,才会创建公开贡献分支,绝不会自动上传模型、日志或结果。
python -m diana_mcp knowledge community status
python -m diana_mcp knowledge community sync
python -m diana_mcp knowledge community redact <经验-id>
python -m diana_mcp knowledge community preview <batch-id>同步不是启动时的隐式联网操作。同步后的社区条目会带仓库、commit、状态和可信度参与 BM25 与 bge-m3 融合检索;私有经验始终优先且不会被覆盖。完整说明见社区知识网络,公共数据仓库见 Diana-MCP-Knowledge。
开发与测试
.\.venv\Scripts\python.exe -m pip install -e ".[dev]"
.\.venv\Scripts\python.exe -m pytest -m "not live"真实 DIANA 端到端测试会启动 DianaIE 并占用许可证:
$env:DIANA_MCP_LIVE_TESTS = "1"
.\.venv\Scripts\python.exe -m pytest tests\test_live.py贡献前请阅读 CONTRIBUTING.md。安全问题请按 SECURITY.md 私下报告。
许可证
本项目采用 Apache License 2.0。该许可证只覆盖本仓库中项目贡献者有权授权的代码和文档,不授予 DIANA 软件、用户手册、商标或客户数据的任何权利。第三方与商标说明见 NOTICE.md。
商标与第三方内容
DIANA 是其权利人的产品和商标。本项目是独立的互操作工具,不包含、修改或再分发 DIANA 可执行文件、许可证、用户手册或其他专有内容。更多说明见 NOTICE.md。
Available Tools
46 toolsdiana_analysis_commandsARead-only
An analysis of the open project as DIANA command-file (.dcf) text, written by saveAnalysisCommands.
Use it to check what setAnalysisCommandDetail did. Detail paths follow the .dcf block nesting joined by '/', with (n) numbering repeated blocks: EXECUT(1)/LOAD/STEPS/EXPLIC/SIZES, EXECUT/NMODES, OUTPUT(2)/LAYOUT/LINPAG. The keywords are documented in manual Appendices H (analysis procedures) and I (output); the path spelling was found by experiment, so verify each change here.
Inputs: analysis (required).
diana_api_docARead-only
Full documentation (usage, parameters, return value) of one DianaIE script command or constant.
Args: name: exact command name, e.g. "createSheet"; close matches are suggested otherwise.
Inputs: name (required).
diana_api_searchARead-only
Search the DianaIE script commands of the installed DIANA version by name and description.
The first call builds the reference from DIANA itself (a few seconds with a live session, about half a minute otherwise).
Args: query: words or a partial command name, e.g. "mesh size", "addMaterial", "reinforcement bar". limit: maximum number of matches.
Inputs: query (required), limit.
diana_autostartAIdempotent
Make every DianaIE the user opens start the bridge by itself, so change tracking and all live tools work without the command-console line or diana_start.
enable writes two small files (diana_mcp_autostart.pth / .py) into the user site-packages folder of DianaIE's embedded Python; they do nothing outside DianaIE. The bridge listens on 127.0.0.1 only, with a random token in the user's local app data. Only enable or disable it when the user asks; it takes effect for DianaIE sessions started afterwards.
Inputs: action. Returns: object
diana_changesARead-only
What changed in DianaIE since you last looked.
Returns (1) the user's operations since the last call, in order, each with a description, undone steps marked and what every undo/redo reverted, and (2) the net model changes compared with the last snapshot of this project: items added/removed and parameters with old -> new values (materials, geometries, loads with their attachment points, supports, shapes with bounding boxes, mesh size, analysis commands as .dcf lines, units), each attributed to the user or the AI where the history shows it. The baseline is kept on disk per project, so edits made in an earlier DianaIE session show up too. Without a bridge only the operations are available.
Args: wait_seconds: first wait up to this long for new edits, returning once the user has paused. quiet_seconds: how long the user must pause before returning (with wait_seconds). include_view: also list view changes and result plots. include_ai: also list your own operations (hidden by default; their count is reported). peek: do not advance the "last looked" point. max_operations: most recent operations to list (the total is always reported); model changes are cut at twice this number.
Inputs: peek, include_ai, include_view, wait_seconds, +2 more. Returns: object
diana_command_logARead-only
DianaIE's command history: every command of a DianaIE session, GUI clicks included, as the exact Python call with a plain-language description, who ran it (user = GUI or command console, ai = this server's bridge, unknown = no bridge journal) and, for undo/redo, what it reverted (undone steps are marked).
Works without a bridge and for earlier sessions. To learn the exact call behind a GUI action, ask the user to do it once and read it here. For "what did the user change since I last looked" use diana_changes instead.
Args: lines: number of entries to return, counted from the end. find: only entries whose call or description contains this text (case-insensitive). session: an earlier session's history file or its key (IEhistory_yymmdd_hhmmss, see list_sessions); default the DianaIE being tracked (the bridge's, else a running one, else the newest). edits_only: leave out views, result plots, queries and reports. source: only the user's or only the AI's commands. list_sessions: list the DianaIE sessions on disk (start time, running or not, projects opened) instead.
Inputs: find, lines, source, session, +2 more. Returns: object
diana_community_contributeADestructive
Upload a reviewed redaction batch to a public contribution branch.
This is a public external write. It runs only when confirmation is exactly UPLOAD <batch_id> from the user
after reviewing diana_community_preview. Uploaded entries remain low-trust candidates; repository automation
validates them and the returned compare URL is used to open a pull request.
Inputs: batch_id (required), confirmation (required). Returns: object
diana_community_prepareA
Create local-only redacted copies of private experience entries for human review; never upload them.
Args: entry_ids: exact private experience ids. Omit to select entries without history-log provenance, scripts or obvious sensitive-pattern matches. recommended_only: when entry_ids is omitted, exclude entries with obvious sensitive-pattern matches.
Inputs: entry_ids, recommended_only. Returns: object
diana_community_previewBRead-only
Read every redacted candidate and its risk report before deciding whether it may be public.
Inputs: batch_id (required). Returns: object
diana_community_statusARead-only
Show whether the optional public community knowledge cache is synchronized, its exact Git commit and trust levels, plus low-risk local entries that could be prepared for review. This performs no network access.
Inputs: no named parameters. Returns: object
diana_community_syncAIdempotent
Explicitly download/update the optional public community experience repository.
Community content is read only as Markdown data; no contributed Python or other executable file is run. There is no hidden startup synchronization, so this tool is the network-consent boundary.
Inputs: no named parameters. Returns: object
diana_executeA
Run Python code inside the live DianaIE session (DianaIE's embedded Python 3.7, GUI thread).
DIANA script commands are globals and state persists across calls. Returns stdout, stderr and the repr of the final expression's value; a Python exception becomes a tool error with the traceback. Never call pause() or anything that opens a dialog (it blocks until the user closes it). newProject, openProject, importModel and closeProject discard unsaved changes. setParameter needs the path below the item's model directory (diana_parameters shows it) and returns False, changing nothing, for other forms.
Args: code: Python 3.7 source. Use absolute paths. timeout_seconds: how long to wait for DianaIE to finish; raise it for meshing or solver runs.
Inputs: code (required), timeout_seconds. Returns: object
diana_experience_addA
Record a lesson in the experience handbook as a draft (未验证); only the user can approve it later.
Write it in the user's language, concretely: what was observed (error code, message, wrong result), why, what fixed it and how that was confirmed. Refused when a similar entry exists (similar title or shared trigger): update that one instead, or pass force=True if it really is a different lesson.
Args: title: one-sentence summary. type: error-fix, modeling-pitfall, api-usage, convergence, parameter, result-interpretation or workflow. symptom: what was observed (becomes the 现象 section). cause: why it happens (原因). fix: what solved it (解决). verification: how the fix was confirmed (验证). notes: anything else (备注). triggers: error codes, message fragments or command names that should bring this entry up, e.g. ["/DIANA/NL/IS41/0001", "Too small step"]; prefix "re:" for a regular expression. tags: e.g. ["非线性", "界面单元"]. manual: related manual pages, e.g. ["Theory/Theoryse738.html"]. evidence: job ids, files, test names, dates that back it up. related: ids of related entries. diana_version: DIANA version it applies to (default: the installed one). source: "ai" when you drafted it, "user" when the user dictated it. id: file name (lowercase letters, digits, hyphens), default derived from the title. force: create it even though similar entries exist.
Inputs: type (required), title (required), symptom (required), id, +12 more. Returns: object
diana_experience_exportA
Export the experience handbook as one readable document, 《DIANA 经验手册》: a Markdown file and a self-contained HTML page (opens in any browser, prints to PDF), grouped by type, with status, triggers, verification results, usage and an index of error codes. Default folder: knowledge/export (not in git).
Args: include_drafts: also include unverified and disputed entries (clearly marked); False = verified only. folder: absolute path of another output folder.
Inputs: folder, include_drafts. Returns: object
diana_experience_listARead-only
Browse the experience handbook, or read one entry in full (with id).
Without id: entries (newest first; id, title, status, type) filtered by status (draft = the review queue of 未验证 entries), type, tag or a text query, plus counts per status and any files that do not parse or are not committed yet.
Args: id: read this entry in full. status: verified, draft, disputed or obsolete. type: entry type. tag: only entries with this tag. query: only entries whose title, triggers, tags or text contain these words. limit: number of entries. details: also list tags, triggers, source, date and usage of each entry.
Inputs: id, tag, type, limit, +3 more. Returns: object
diana_experience_mine_logsA
Learn from old solver logs: scan every .out file under these folders and draft one experience entry per kind of DIANA message (error code, or message text without a code), with counts, example files and DIANA's own explanation and advice. The drafts are 未验证 (source 历史日志): when the same message comes up in real work, propose the entry to the user for approval together with the new evidence. Running it again only refreshes the statistics of existing entries. All drafts of one run form a single git commit.
Args: folders: absolute paths of folders (searched recursively) or single .out files. A folder may also be ssh://user@host/absolute/path: those logs are listed and read over SSH, parsed from a temporary file that is deleted at once, and recorded under their remote path — nothing is stored on this machine. dry_run: only report what would be created.
Inputs: folders (required), dry_run. Returns: object
diana_experience_reviewARead-only
Periodic review of the experience handbook: what to bring to the user.
Returns drafts worth proposing for approval (reported helpful, or recommended for a solver problem that was solved afterwards), AI drafts still missing their cause, groups of similar entries that could be merged or generalized into one rule, entries whose automatic verification failed or ran on another DIANA version, and entries repeatedly reported as unhelpful. Changes nothing: propose each step to the user, then apply it with diana_experience_update (merging = combine into one entry, mark the others obsolete with "合并到 ").
Args: limit: items per list.
Inputs: limit. Returns: object
diana_experience_updateA
Edit an experience entry, add evidence, or change its status. Every change is committed to git.
status="verified" is the user's decision: set it only after the user explicitly approved this entry in the conversation, and pass their words verbatim as approval. "disputed" (evidence against it), "obsolete" (no longer applies, e.g. after a DIANA upgrade) and "draft" (back to unverified) need a reason. Entries are never deleted.
Args: id: the entry id. title: new title. type: new type. symptom: replaces the 现象 section. cause: replaces the 原因 section. fix: replaces the 解决 section. verification: replaces the 验证 section. notes: replaces the 备注 section. triggers: replaces the triggers. tags: replaces the tags. manual: replaces the manual references. related: replaces the related ids. add_evidence: evidence to append, e.g. "2026-10-02 作业 ab12cd 改用弧长法后收敛". diana_version: DIANA version it applies to. status: verified, disputed, obsolete or draft. approval: the user's approval in their own words (required for verified). reason: why the status changes (required for disputed, obsolete, draft).
Inputs: id (required), fix, tags, type, +13 more. Returns: object
diana_experience_verifyA
Re-run the verification scripts of experience entries on the installed DIANA (after an upgrade, or to confirm a draft before proposing it for approval).
Entries can carry a "## 验证脚本" section with a ```python block: it runs inside a short-lived batch DianaIE (never the user's live session), with WORKDIR set to an empty temporary folder in which it creates its own project, and passes when it finishes without an exception (use assert). Results are stored in each entry's checks field; a verified entry that fails is marked disputed. One git commit per run. Needs a DIANA license seat for about 15 s plus the scripts' run time.
Args: ids: entries to check; default every entry with a script. timeout_seconds: limit for the whole batch run.
Inputs: ids, timeout_seconds. Returns: object
diana_glossaryARead-only
Look up DIANA terminology in English and Chinese, from DianaIE's own GUI translation (~15,000 labels, options and messages): the Chinese label the user sees for an English term, or the English term (for the manual and the keywords) behind a Chinese label, e.g. "基于总应变开裂模型" or "Compressive fracture energy".
Args: term: an English or Chinese term. limit: number of pairs.
Inputs: term (required), limit. Returns: object
diana_guideARead-only
The full guide to this server: workflow, verified DIANA 10.5 scripting facts, following the user's GUI edits, the experience handbook's rules, general rules, and the user's most useful verified lessons. Read it once per conversation before modeling; the server instructions only hold the essentials.
Args: topic: all, or one part: workflow, scripting, tracking, knowledge, rules.
Inputs: topic.
diana_job_cancelADestructive
Stop a running solver job (kills diana.exe and its solver segment processes).
Inputs: job_id (required). Returns: object
diana_job_statusARead-only
Status of a background solver job, or of the 20 most recent jobs when no id is given.
Includes state (running/finished/failed/cancelled), elapsed time, output file sizes and the progress read from the .out file: analysis blocks, load steps, convergence and errors.
Args: job_id: id returned by diana_solve or diana_run_solver. tail_lines: also return the last lines of the .out file.
Inputs: job_id, tail_lines. Returns: object
diana_keywordsARead-only
Look up DIANA data-model keywords in the installation's schema (lib/SCHEMA).
Finds material classes and models for addMaterial (e.g. CONCR / TSCR), geometry and element classes for addGeometry / setElementClassType (e.g. SHEET / MEMBRA / PLSTRA / AXISYM), load and support types, and parameters with title, unit, domain, default and allowed values. The manual does not list these keywords. The directories shown in brackets ([tscr], [tensil], ...) form the setParameter path (e.g. TENSIL/TENSTR); use diana_parameters to see the exact paths of an existing item.
Args: query: words or keywords, e.g. "masonry", "tensile strength", "MEMBRA", "TSCR", "LODTYP". limit: number of entries to return.
Inputs: query (required), limit.
diana_knowledge_feedbackA
Record which results of a diana_knowledge_search, or which recommended experiences, actually helped (an empty list means none did) and which were misleading.
Helpful entries rank a little higher from then on and misleading ones lower; the most helpful verified entries become resident tips shown at the start of each session. The log is also the evaluation set for improving retrieval.
Args: search_id: the search_id returned by diana_knowledge_search, or a short label such as "job:" for experiences that a tool recommended by itself. helpful: refs of the helpful results as listed there, e.g. ["attach-snaps-to-existing-vertex", "Theory/Theoryse738.html"]. note: what the right answer turned out to be, if no result had it. unhelpful: refs that were shown but wrong or misleading for this problem.
Inputs: helpful (required), search_id (required), note, unhelpful. Returns: object
diana_knowledge_searchARead-only
Search everything known about DIANA at once: the experience handbook (lessons from real modeling, 已验证 = approved by the user, 未验证 = draft), the user's manual, the shipped tutorials and verification examples, the data-model keywords (SCHEMA) and the script commands.
Chinese questions work: DIANA terms in them are translated with DianaIE's official GUI glossary and the English sources are searched with the translation (shown as searched_in_english). Results are merged by rank, experiences first. Read more with diana_experience_list(id=...), diana_manual_read(page=...), diana_keywords(keyword) or diana_api_doc(name). When a result solved the problem, call diana_knowledge_feedback with the search_id.
Args: query: the question or keywords, Chinese or English, e.g. "受压断裂能怎么取值", "LB40/0053", "LINPAG". sources: restrict to some of experience, community, manual, example, keyword, api. limit: number of results. include_obsolete: also return experiences marked obsolete.
Inputs: query (required), limit, sources, include_obsolete. Returns: object
diana_load_resultsA
Load solver results (.dnb) into an analysis of the open DianaIE project, to plot them there.
Pass a job id from diana_solve (file and analysis are known), or dnb_path together with analysis. Returns the result cases and the result labels/components that diana_plot_result accepts.
Args: job_id: a finished job started by diana_solve. dnb_path: absolute path of a .dnb file (instead of job_id). analysis: analysis to attach the results to (default: the job's analysis). replace: clear results already attached to the analysis first; loadResults refuses otherwise.
Inputs: job_id, replace, analysis, dnb_path. Returns: object
diana_manual_readARead-only
Read a page of the DIANA user's manual as text, e.g. from diana_manual_search results.
Args: page: page name such as "Theory/Theoryse738.html" (also accepts "Theoryse738"). find: start reading shortly before the first occurrence of this text, e.g. "LINPAG" or "I.1.1.2". offset: character offset to start from; use next_offset of a previous call to continue. max_chars: characters to return.
Inputs: page (required), find, offset, max_chars. Returns: object
diana_manual_searchARead-only
Search the DIANA user's manual of the installed version (read from its local help file).
Covers theory, modeling, the element and material libraries, all analysis procedures and result items, the batch syntax of .dat/.dcf files (Appendices E-I), script commands (Appendix B), running batch jobs (Appendix C), user-supplied subroutines, and the verification manual with complete .dcf examples. Use it for solver command syntax, material model parameters, element types and output options; use diana_api_search for DianaIE script-command signatures. The first call builds a local index (a few seconds).
Args: query: keywords, e.g. "LINPAG tabular layout", "total strain crack Hordijk", "EIGEN modes output". limit: number of pages to return.
Inputs: query (required), limit.
diana_model_diffARead-only
Compare two states of a model: items added/removed and parameters with old -> new values.
Each side is "current" (the project open in DianaIE, now), "latest" (the last stored snapshot of that project, e.g. from diana_changes or diana_model_snapshot), a snapshot id or label, or the path of a saved .dpf (read by a batch DianaIE). Comparing does not move diana_changes' baseline.
Args: before: the older state. after: the newer state. max_changes: changes to return.
Inputs: after, before, max_changes. Returns: object
diana_model_snapshotA
Save a snapshot of the model (every item with all parameters) as a named checkpoint for diana_model_diff.
Args: label: name for the checkpoint, e.g. "before mesh refinement". dpf_path: snapshot this saved project instead of the open one; a short batch DianaIE reads it, the live session is not touched (needs a free license seat, ~30 s).
Inputs: label, dpf_path. Returns: object
diana_model_summaryARead-only
Summarize the open project: dimension, analysis aspects, shapes, materials, geometries, groups, load cases, each analysis with its commands, the current units (DIANA has no fixed units: all input must use one consistent system) and the issues reported by validateModel('ALL').
Inputs: no named parameters. Returns: object
diana_parametersARead-only
List every parameter of one item of the open project with its current value, plus the schema's title, unit, domain and allowed values.
Each line shows the form setParameter accepts ("set as", e.g. LINEAR/ELASTI/YOUNG): the full path listed first does NOT work there (setParameter then returns False and changes nothing), while parameter() reads with any form. Call it after addMaterial / addGeometry / createPointLoad etc. to see what the chosen class and model offer; parameters appear once they have a value.
Args: item_type: MATERIAL, GEOMET, DATA, GEOMETRYLOAD, GEOMETRYSUPPORT, GEOMETRYTYING, GEOMETRYCONNECTION, GEOMETRYBC, GEOMETRYFIXPOT or GEOMETRYINIFIELD. name: name of the item.
Inputs: name (required), item_type (required).
diana_parameter_study_prepareB
Propose one parameter-study campaign and open it for one-time human approval inside DianaIE.
Each parameter needs a unique name and a model path, plus either min/max or discrete values.
The approved plan may change geometry, mesh, material, load and solver settings named here. Cases inside that
envelope need no per-case GUI review, but every case is range-checked and self-checked before submission.
Inputs: name (required), parameters (required), baseline_id (required), combination (required), +2 more. Returns: object
diana_plot_resultARead-only
Plot a result in DianaIE's RESULT view and return a screenshot.
Args: analysis: analysis with loaded results. result: result label from diana_load_results, e.g. "Displacements" or "Cauchy Total Stresses". component: component, e.g. "DtY", "SXX". case: result case (load case / step), default the first one. block: output block, needed only when the analysis has several. item_type: result owner; required by DianaIE unless the label starts with it (e.g. "Reinforcement ...") or the result is nodal. location: where the result was computed, "node" or "element" (see diana_load_results). layer: fibre / layer of beams and shells: a number, "maximum" or "minimum". plot: contours, vectors or diagram. viewpoint: camera direction; 2D models in the XY plane are best seen from "top". width: image width in pixels. height: image height in pixels.
Inputs: result (required), analysis (required), component (required), case, +8 more.
diana_read_outARead-only
Summarize a DIANA solver log (.out): analysis commands, load steps with convergence, errors, warnings and whether the run terminated normally. Works on finished and on still-running jobs.
Args: path: absolute path of the .out file. tail_lines: number of last lines to include (0 for none).
Inputs: path (required), tail_lines. Returns: object
diana_read_tbARead-only
Read a DIANA tabulated results file (.tb), streaming so multi-GB files work.
Without result: an index of the file (result types with their steps / load cases / modes, columns and row
counts). With result, e.g. "DISPLA", "REACTI", "STRESS TOTAL CAUCHY", "CRKWDT" or "VONMIS": the matching rows,
optionally for one step, load case or mode and for given node / element numbers. Leaving step out gives the
history over all steps, e.g. a load-displacement curve of one node. Results are written for non-converged steps
too, so check diana_read_out / diana_job_status before trusting the last steps. Only the first max_rows rows are
returned; csv_path writes all of them.
Args: path: absolute path of the .tb file. result: part of the result name to select. step: load step number (nonlinear and transient analyses). load_case: load case number (linear analyses). mode: mode number (eigenvalue analyses). node_ids: keep rows of these node numbers (Nodnr column). element_ids: keep rows of these element numbers (Elmnr column). ids: filters on any id column, e.g. {"Reinnr": [3]} or {"Intpt": [1, 2]}. max_rows: rows to return inline. csv_path: absolute path of a CSV file to write every matching row to.
Layout notes: LAYOUT COMBIN tables have result "Combination" and blank cells where an item does not apply; extreme-value selections (SELECT LOADS/STEPS ... MIN|MAX) add a " case" field with the load case of each value and list the overall extremes in the block's "extremes"; COOR adds X0/Y0(/Z0) columns and AXES the direction cosines of principal values.
Inputs: path (required), ids, mode, step, +6 more. Returns: object
diana_results_tableARead-only
Result values from results loaded in DianaIE (DianaIE's resultsTable), up to full double precision.
Works on what diana_load_results lists (labels like "Displacements", "Cauchy Total Stresses"), including reinforcement, pile and layer results. Complements diana_read_tb, which reads the solver's .tb text output (4 significant digits unless tb_digits was raised).
Args: analysis: analysis with loaded results. result: result label, e.g. "Displacements". components: component names, e.g. ["DtY"]; default all. cases: result case names; default all. block: output block, needed only when there are several. location: node, element, mappedintpnt or mappedcrack. nodes: node numbers. elements: element numbers. reinforcements: reinforcement numbers. piles: pile numbers. layer: layer / fibre number. coordinate_system: local or global. max_rows: rows to return inline; filter with nodes/elements/cases, or use csv_path, rather than raising it. digits: significant digits of the inline values; 0 = full double precision. csv_path: absolute path of a CSV file to write every row to (via DianaIE's exportResults).
Inputs: result (required), analysis (required), block, cases, +11 more. Returns: object
diana_review_prepareA
Prepare a mandatory human review for a development-stage calculation and open it inside DianaIE.
The 3D window is switched to a complete fitted model view. A modeless native review panel owned by DianaIE shows the full model snapshot, units, validation findings, changes since the preceding review and the complete analysis .dcf. The MCP cannot approve it: the user must click one of the panel's buttons. Closing the panel does not approve anything. Call diana_review_status afterwards, then pass the approved review_id to diana_solve.
Inputs: analysis (required). Returns: object
diana_review_statusA
Read human-review, baseline and parameter-study status after the user acts in DianaIE.
If a review was approved as a baseline, this call finalizes its immutable baseline artifacts. With no id it lists recent reviews, baselines and campaigns. It cannot approve any object.
Inputs: id. Returns: object
diana_run_solverA
Solve an already trusted baseline or approved parameter variant from .dat/.dcf files.
This is the fast solver stage, not a way to build or bypass review. Exactly one baseline_id or
campaign_id is required. A baseline pair must be byte-for-byte identical to the archived model that passed
GUI review, validation solve and post-solve checks. A campaign variant must provide the complete approved
parameter values and a semantic change manifest; both are range/envelope checked and all files are bound to a
one-use permit before the common process-launch layer can run diana.exe.
Outputs .out/.tb/.dnb are written next to the .dat. A .dcf exported by DianaIE (analysis blocks only) is completed with the *FILOS/INITIA/*INPUT header (after any ':' comments and control commands) and *END that a standalone run needs; that and the TABULA layout options go into a copy, .run.dcf. The original file is not modified. Relative input files it refers to (user DLLs via *FORTRAN USE, *INPUT READ FILE=, IMPORT) must be next to the .dcf or .dat; missing ones are reported before the run.
Args: dat_path: absolute path of the model file (.dat). dcf_path: absolute path of the command file (.dcf). name: base name of the outputs (default: the .dat file name). threads: threads for element loops (diana.exe -n); solver threads are set by SOLVE PARDIS MAXTHR in the .dcf. overwrite: delete outputs of an earlier run with the same name first (DIANA appends to an existing .dnb). keep_ff: keep the FILOS database (.ff) after the run. tb_no_paging: write TABULA (.tb) output without page layout (LINPAG 0, COLLIN 1000). tb_digits: significant digits of results in the .tb (1-10; DIANA's default is 4). restart_ff: continue on this existing FILOS database (.ff) instead of initializing one: restarts, RESTOR, or a stand-alone *REDUCT / *ELIQUE / *ECREEP after the analysis that created it (manual H.2, H.16.4, H.17-H.19). The .dcf is then used as written (start it with *FILOS / UNLOCK after a killed run) and the database is kept. baseline_id: certified baseline whose exact files are being solved. campaign_id: GUI-approved parameter-study plan for a variant. case_parameters: complete name/value map required by the campaign. change_manifest: model/solver paths changed from the baseline, using the paths displayed in the campaign.
Inputs: dat_path (required), dcf_path (required), name, keep_ff, +9 more. Returns: object
diana_screenshotARead-only
Capture DianaIE's 3D window as a PNG image to check the model visually.
Args: view: switch to the MESH or RESULT view first, or keep the current one (geometry view by default). viewpoint: camera direction; 2D models in the XY plane are best seen from "top". fit: zoom so the whole model fits. width: image width in pixels (200-4096). height: image height in pixels (200-4096).
Inputs: fit, view, width, height, +1 more.
diana_solveA
Submit the open DianaIE model through the mandatory development/baseline/parameter-study gate.
With no authorization id this does not start a solver: it prepares the complete model and solver settings,
fits the model in the DianaIE 3D view and opens the native human-review panel. After the user clicks a decision,
call again with review_id. A review approved as a baseline becomes trusted only after this validation run
passes post-solve quality checks. Later calls may use that baseline_id or an approved campaign_id;
campaign variants are compared with the baseline snapshot and need no per-case human review while they stay in
the approved parameter envelope and pass self-checks.
Args: analysis: name of an analysis of the open project (see diana_model_summary). job_dir: folder for the job files; default /jobs/. threads: threads for element loops (diana.exe -n); the sparse solver's threads are set in the .dcf (SOLVE PARDIS ... MAXTHR, manual H.6.1). keep_ff: keep the FILOS database (.ff, often hundreds of MB) after the run, e.g. to restart from it. tb_no_paging: write TABULA (.tb) output without page layout (LINPAG 0): no page headers and no column headers repeated every 66 lines. Only the job's copy of the .dcf is changed. tb_digits: significant digits of results in the .tb (1-10; DIANA's default is 4, e.g. 2.385E+01). review_id: GUI-approved development review for exactly one validation/debug run. baseline_id: trusted baseline produced by a human-reviewed validation run. campaign_id: one-time GUI-approved parameter-study plan for this variant. case_parameters: complete name/value map required by the approved campaign.
Inputs: analysis (required), job_dir, keep_ff, threads, +6 more. Returns: object
diana_startA
Connect to a live DianaIE session, launching DianaIE with the bridge if none is running.
Args: project_path: absolute path of a DIANA project (.dpf) to open. Refused if another project is open, because opening a project discards unsaved changes in the current one. working_dir: working directory for a newly launched DianaIE (default: the diana-mcp work folder). attach_only: only attach to a running bridge; never launch DianaIE. timeout_seconds: how long to wait for a newly launched DianaIE to come up.
Inputs: attach_only, working_dir, project_path, timeout_seconds. Returns: object
diana_statusARead-only
Report DIANA installations, live DianaIE bridge sessions and cached API references.
Inputs: no named parameters. Returns: object
diana_stopADestructive
End the live session.
Args: save: save the open project first. Otherwise unsaved changes are lost if DianaIE closes. close_diana: close the DianaIE window. Defaults to True for a DianaIE launched by this server and False for one the user opened (then only the bridge stops and DianaIE stays open).
Inputs: save (required), close_diana. Returns: object
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 46 tools
Most tools target a distinguishable stage (session, execute, model introspection, solver, results, knowledge), but several clusters overlap: diana_knowledge_search vs diana_manual_search/diana_api_search/diana_keywords/diana_glossary, diana_changes vs diana_command_log vs diana_model_diff, and diana_review_prepare vs the review panel that diana_solve opens implicitly. Descriptions usually state which one to prefer, but an agent must read carefully to avoid picking a federated search or the wrong change-tracking tool.
All 46 tools share the diana_ prefix and snake_case, and most names read as verb_noun (diana_model_snapshot, diana_job_cancel, diana_experience_verify). Minor deviations exist: bare nouns (diana_changes, diana_keywords) and awkward orderings (diana_experience_mine_logs) break the pattern slightly.
46 tools is far past the heavy threshold; even though the domain is genuinely broad (live GUI bridge, batch solver, review gating, results I/O, knowledge base), it could be consolidated. The experience handbook alone consumes seven tools and the community workflow five, which inflates the surface an agent must scan.
Coverage is broad and coherent: session lifecycle, model inspection, solve/run/review gates, job status, results reading and plotting, plus search/knowledge feedback all exist. Gaps are minor and partly intentional (no direct project close, no review approval by design, model edits routed through generic diana_execute).
Maintenance
Related MCP Connectors
Structural FEM for AI agents: frames, plates, buckling, seismic and Eurocode checks, solved locally.
Connects AI assistants to QCDatabase.AI for everyday construction quality-control work.
AI-callable calculators and engineering models with real formulas. No hallucinated math.
Run FDS, OpenFOAM, CalculiX and other engineering simulations on cloudHPC from your AI assistant.
Related MCP Servers
- AlicenseBqualityBmaintenanceEnables AI assistants to drive Kratos Multiphysics finite element simulations end to end, including introspection, scaffolding, execution, and post-processing.1132MIT
- AlicenseAqualityDmaintenanceEnables AI agents to interact with Bentley STAAD.Pro models for tasks like load case definition, data extraction, and property setting, running locally with multi-instance support and no cloud dependency.5MIT
- AlicenseAqualityBmaintenanceEnables AI agents to interact with Bentley STAAD.Pro models for tasks like load case definition, data extraction, and property setting through natural language.556MIT
- AlicenseAqualityBmaintenanceEnables AI assistants to interact with bridge structural analysis software for modeling, construction stages, and code checking.1535 PyPI1Apache 2.0