Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
NTOP_CL_PATHNoPath to ntopcl.exe. Optional if ntopcl.exe is already in PATH, D:\NTOP, or C:\Program Files\nTopology\nTopology.
NTOP_WORKDIRNoPath to your nTop projects working directory.
NTOP_GUI_PATHNoPath to ntop.exe. Optional if ntop.exe is already in PATH, D:\NTOP, or C:\Program Files\nTopology\nTopology.

Instructions

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

MCP server for nTop (nTopology): inspect and edit .ntop notebook block graphs directly, generate JSON templates, run nTop Automate (ntopcl) headlessly (sync/async), execute batch parameter sweeps, and analyze exported STL/OBJ/3MF meshes and CSV/JSON tables.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

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

Tools

Functions exposed to the LLM to take actions

NameDescription
check_ntop_environmentA

Check nTop installation (ntopcl/ntop GUI), version, working directory, and active jobs.

set_workdirA

Set the default working directory for resolving relative .ntop and export paths.

Args: path: Directory path to set as working directory (created if it does not exist).

list_ntop_filesB

List .ntop notebooks and related CAD/mesh/data files in a directory.

Args: directory: Target directory (defaults to current workdir). recursive: If True, search subdirectories recursively.

open_in_ntop_guiA

Launch or safely reload an .ntop notebook in the desktop nTop GUI with duplicate-window and unsaved-change protection.

Args: notebook_path: Path to the .ntop file. prevent_duplicate: If True (default), refuse to open a second window if this file is already open in ntop.exe. reload_if_open: If True, safely close existing ntop.exe window(s) for this file (after checking Autosave) and reopen cleanly. force_if_unsaved: Only used with reload_if_open=True; bypasses the Autosave unsaved-change guard.

inspect_notebookA

Inspect an .ntop file's metadata, nTop version, sections, inputs, output block, and sub-functions.

Reads the .ntop binary container directly without starting ntopcl (instant).

Args: notebook_path: Path to the .ntop notebook.

list_notebook_variablesC

List all promoted variables (core.var<...>) in an .ntop notebook with their IDs, types, units, and values.

Args: notebook_path: Path to the .ntop notebook.

read_notebook_graphA

Read the block graph (IDs, functions, input wiring, literal values) of an .ntop notebook.

Args: notebook_path: Path to the .ntop notebook. filter_text: Optional substring filter matched against block ID, name, function, type, or section. section_name: Optional notebook section name filter (case-insensitive substring). variables_only: If True, return only promoted variable blocks (core.var<...>). include_leaves: If True, also include raw anonymous leaf blocks (func == ""). limit: Maximum number of blocks to return (default 150).

validate_notebook_graphB

Validate an .ntop notebook's block graph for dangling inputs, duplicate IDs, and Automate readiness.

Args: notebook_path: Path to the .ntop notebook.

set_notebook_literalB

Update a literal value (scalar/real, integer, bool, enum, vector/point, text) inside an .ntop file.

Supports human-friendly unit strings for real values such as "10mm", "2.5cm", "45deg", or {"value": 10, "unit": "mm"} (automatically converted to SI meters/radians + display expression). Pass auto_reload_gui=True to safely close and reopen the nTop GUI window after saving (with Autosave guard).

set_notebook_outputA

Assign the notebook's Output block so ntopcl -t and ntopcl -o can export its result.

Args: notebook_path: Source .ntop file path. target: Block ID or unique block name to designate as the notebook output. output_path: Optional destination .ntop file path. overwrite: If True and output_path is omitted, overwrite notebook_path in place (with timestamped snapshot).

rewire_block_inputA

Rewire an input slot of a block to another block ID and/or update its expression string.

Args: notebook_path: Source .ntop file path. block_target: Block ID or unique block name to edit. input_index: 0-based index into the block's inputs array. new_instance_id: New source block ID to connect (or -1 to disconnect). expression: Optional expression string for this input slot. output_path: Optional destination .ntop file path. overwrite: If True and output_path is omitted, overwrite notebook_path in place (with timestamped snapshot).

prune_notebook_graphB

Prune blocks unreachable from the notebook output block and save to a new .ntop file.

Args: notebook_path: Source .ntop file path. output_path: Destination .ntop file path for the pruned notebook. output_target: Optional block ID or name to set as output before pruning.

add_notebook_sectionC

Add a new named Section to an existing .ntop notebook.

add_notebook_literalC

Add a new literal leaf block (real, integer, bool, *_enum, vector, point, file_path) to an .ntop notebook.

Supports human-friendly unit strings for real literals like "10mm", "45deg", or {"value": 10, "unit": "mm"}.

add_notebook_blockC

Add a new compute block to an existing .ntop notebook and wire its inputs.

add_notebook_variableC

Add a promoted top-level variable (core.var<var_type>) in a specified notebook section.

batch_edit_notebookA

Atomically apply multiple graph edits (with $alias references) in a single transaction.

All operations run in memory first; the file is only saved if graph validation passes (and if verify_with_ntopcl=True, only if ntopcl evaluates verify_target with zero errors). Pass auto_reload_gui=True to automatically close the old nTop GUI window (if no unsaved Autosave edits) and reopen the updated file in a single clean window.

Supported op types: add_section, add_literal, add_block, add_variable, set_literal, rewire_input, set_output, set_visibility, promote_to_input.

set_block_visibilityC

Control viewport visibility, solo mode, color (#RRGGBB or [r,g,b,a]), transparency, and opacity.

package_custom_blockA

Package a notebook branch into a standalone reusable Custom Block .ntop for in-place GUI hot-updates.

When output_path already exists and preserve_existing_uuid=True, the Custom Block's internal function UUID is preserved so re-importing it (File -> Import -> Custom Block) inside an already-open parent notebook triggers nTop's native "Update Custom Block" prompt without closing the main window.

Args: notebook_path: Source .ntop file path. output_block: Block ID or unique name to set as the Custom Block's output. output_path: Destination .ntop path for the Custom Block. block_name: Display name of the Custom Block in nTop. input_targets: Optional list of variable IDs/names to promote to Custom Block inputs. description: Optional Custom Block description. prune: If True (default), prune blocks unrelated to output_block. preserve_existing_uuid: If True and output_path exists, preserve its existing def.function UUID for hot-update. verify_with_ntopcl: If True (default), run ntopcl -t to confirm valid Custom Block inputs & output.

promote_to_inputB

Promote an existing notebook variable (core.var<...>) into a Notebook Input (def.inputs).

Enables passing parameter values via ntopcl -j and run_parameter_sweep without breaking downstream wiring.

list_notebook_snapshotsB

List timestamped backup snapshots saved in .ntop_history/ for a notebook.

undo_notebook_editB

Restore an .ntop notebook from its latest (or named) snapshot in .ntop_history/.

Saves the current state as a before_undo snapshot first so undo is itself reversible.

generate_templatesB

Run ntopcl -t to generate and return official input_template.json and output_template.json.

Args: notebook_path: Path to the .ntop notebook. output_dir: Optional directory to persist the generated JSON templates (uses a temp dir if omitted). timeout_seconds: Optional timeout override in seconds.

run_notebookA

Execute an .ntop notebook headlessly via nTop Automate (ntopcl).

Args: notebook_path: Path to the .ntop notebook. inputs: Either full nTop JSON schema ({"inputs": [...]}) or a simple dict ({"Length": 10.0}) auto-mapped onto the template. input_json_path: Optional path to an existing nTop input JSON file. output_json_path: Optional path where nTop should write its output JSON. working_dir: Optional working directory for execution and relative exports. include_properties: Pass -p to include top-level properties in output JSON. save_notebook: Pass -s to overwrite the .ntop file with computed results. trust_notebook: Pass --trustnotebook to permit Run Command blocks. max_threads: Limit CPU threads via -m. verbosity: Log verbosity 0 (errors), 1 (warnings+errors), 2 (full progress). custom_block_libraries: Mapping of {library_name: directory_path} for --custom-block-library. timeout_seconds: Maximum wait time in seconds.

run_notebook_asyncB

Submit a long-running nTop Automate (ntopcl) execution in the background and return a job_id.

Monitor progress with get_job_status(job_id) or cancel with cancel_job(job_id).

get_job_statusA

Get status, elapsed time, parsed logs, and output of a background ntopcl job.

Args: job_id: The job identifier returned by run_notebook_async. tail_lines: Number of recent stdout/stderr lines to return.

list_jobsA

List all submitted background ntopcl jobs and their current states.

cancel_jobC

Cancel/terminate a currently running background ntopcl job.

run_parameter_sweepA

Run a batch DOE / parameter sweep across multiple input sets using ntopcl.

Provide EITHER parameter_sets (list of explicit input dicts) OR parameter_grid (dict of {param_name: [v1, v2, ...]} expanded as a Cartesian product).

Args: notebook_path: Path to the .ntop notebook. parameter_sets: Explicit list of parameter dictionaries, one per run. parameter_grid: Cartesian grid dictionary of parameter value lists. output_dir: Directory to store run_000/, run_001/, ... and sweep_summary.csv. max_workers: Parallel ntopcl worker processes (default 1). max_threads_per_run: Pass -m to each ntopcl invocation. include_properties: Pass -p to include top-level properties in each output.json. trust_notebook: Pass --trustnotebook if needed. timeout_per_run: Timeout per individual run in seconds. export_csv: Write a consolidated sweep_summary.csv table.

evaluate_blockA

Non-invasively evaluate any block (scalar, implicit body, plane, etc.) via ntopcl.

Runs on an isolated temporary copy so your original .ntop file is never modified. Returns evaluated scalar values, bounding box, properties, and execution timing.

export_block_meshA

Non-invasively mesh an implicit/mesh block and export to .stl, .3mf, or .obj via ntopcl.

Never modifies your .ntop file. Automatically runs analyze_mesh on the exported mesh so you immediately get volume, surface area, bounding box, and watertightness — ready for COMSOL/Abaqus.

Args: notebook_path: Path to the source .ntop file. target: Block ID or unique name (e.g. "Final Flanges and Pipes"). export_path: Destination mesh path (.stl, .3mf, .obj, .ply). tolerance: Meshing tolerance (supports "1mm", "0.5mm", or SI float meters). unit: Export length unit ("mm", "cm", "m", "in"). sharpen: Enable sharp-edge preservation in Mesh from Implicit Body. simplify: Enable mesh simplification. inputs: Optional nTop Automate inputs dict/list. analyze: If True (default), analyze exported mesh geometry & watertightness. timeout_seconds: Optional timeout override in seconds.

build_block_catalogA

Scan a directory of .ntop files recursively to index verified local nTop block signatures.

Args: directory: Folder containing .ntop notebooks (e.g. C:\path\to\ntop_examples). save_path: Optional output JSON catalog path (defaults to block_catalog.json in package root). include_custom_blocks: If True, also include user_func_* custom blocks.

search_blocksA

Search verified nTop block signatures (function names, output types, input slots) across built-in & local catalog.

Args: query: Keyword substring (e.g. "shell", "boolean", "mesh", "export", "fe_"). category: Optional category filter (modeling, geometry, meshing_and_fe, export_import, math_and_fields, core, lattice). catalog_path: Optional custom catalog JSON path. limit: Maximum number of matches to return.

analyze_meshA

Analyze an exported STL (binary/ASCII), OBJ, or 3MF mesh file.

Returns triangle/vertex counts, bounding box, surface area, signed/absolute volume, and topology checks (open boundary edges, non-manifold edges, watertightness).

Args: mesh_path: Path to a .stl, .obj, or .3mf file.

read_export_tableA

Read and summarize an exported CSV, TSV, or JSON table produced by nTop.

Args: file_path: Path to .csv, .tsv, or .json file. max_preview_rows: Maximum preview rows to return for CSV/TSV files.

get_ntop_guideA

Retrieve built-in nTop Automate and MCP workflow documentation.

Args: topic: One of list, ntopcl_cli, json_inputs, json_outputs, notebook_preparation, parameter_sweep, troubleshooting.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription
resource_environmentCurrent nTop environment status as a JSON resource.

TDQS

B3.2/5.0

Scored across 36 tools

Disambiguation4/5

Most tools target clearly distinct operations (inspect vs edit vs execute vs mesh-analyze vs catalog). The main overlap is that batch_edit_notebook subsumes single-op tools like set_notebook_literal, add_notebook_block, rewire_block_input, and set_notebook_output, which could cause an agent to hesitate between the atomic and batch variants. Descriptions generally clarify the boundary, so confusion is minor.

Naming Consistency4/5

Nearly all tools use snake_case with a verb_noun or verb_object pattern (read_notebook_graph, set_notebook_literal, run_notebook, analyze_mesh). A few deviations exist, like promote_to_input and open_in_ntop_gui, which use prepositions/less standard phrasing. Overall the pattern is predictable and readable.

Tool Count3/5

36 tools is heavy, above the comfortable range, but the domain genuinely spans notebook editing, GUI control, headless execution, async jobs, parameter sweeps, mesh export, and block cataloging. The set is organized into coherent clusters rather than being padded, though a few editing tools could be consolidated.

Completeness4/5

The surface covers reading, editing, validating, executing, sweeping, exporting, and analyzing notebooks and meshes thoroughly. The main gap is the absence of delete/remove operations for blocks, sections, and variables, plus no explicit cleanup for snapshots, but these are minor workarounds rather than dead ends.

Maintenance

ActivityMaintained
ResponsivenessNo recent community issues