Tekla MCP Server v0.7.0
This release turns the three most painful workarounds from a real end-to-end modeling session
into first-class MCP tools — IFC/reference geometry, beam Position, and custom Connections —
and adds the first broad Drawing API surface. Agents can now work from drawing-list QA through
view/annotation editing without using tekla_run_csharp for routine operations.
The drawing layer is experimental. This is its first release and it has seen far less
live-model testing than the model tools. Individual tools may fail on drawing states or
object types that have not been exercised yet — Tekla's Drawing API has version-specific
remoting/serialization quirks. Preview-by-default and Ctrl+Z still apply; please report
failures viatekla_report_gapor a GitHub issue.
Highlights
- IFC/reference objects are inspectable.
tekla_get_reference_geometryaccepts the current
selection or Tekla integer IDs and returns external/IFC GUID, entity type, dimensions,
reference-model source, world AABB, capped attributes and capped face polygons. This avoids
parsing the IFC file from disk merely to locate a selected opening. - Beam Position is first-class.
tekla_create_beamandtekla_modify_partnow support
Plane/Rotation/Depth and their offsets.matchPositionGuidcopies Position from a known-good
exemplar, with explicit fields acting as overrides. - Connections no longer require C# scripts.
tekla_list_connectionsreads the exact component name (including Cyrillic), number,
primary/secondary GUIDs, UpVector, direction and status.tekla_create_connectioncreates system/custom connections.tekla_copy_connectioncarries an exemplar's identity/orientation to new parts.- Pending geometry is committed before component insertion, closing the fresh-part race seen
during field use.
- Less tool-call overhead.
tekla_create_beamscreates up to 200 structured beam specs in
one preview/apply batch. - Geometry helpers.
tekla_get_solid_bboxmakes native-part face-plane checks explicit;
tekla_list_control_linesreturns control-line endpoints. - API-reference diagnostics.
tekla_get_api_reference_statussays whether offline docs are
ready and gives exact setup guidance when they are not. - The drawing list is queryable without opening drawings. New tools list/filter rows and
Drawing List selection, summarize types/statuses, find stale or issued-but-modified drawings,
and return the model identifiers represented by a drawing. - Drawing lifecycle is first-class and previewable. Agents can preview/apply open, save,
close, create, batch create, edit metadata/status flags, delete, issue, unissue, update,
auto-place views, and export PDFs. Assembly, single-part, cast-unit, GA, and saved
AutoDrawing-rule workflows are covered. - The active drawing is inspectable and editable. View and drawing-object tools expose
best-effort ID/ID2 addressing, model GUID links, geometry, visibility, optional UDAs, and
editor selection. Agents can create and edit:- front/top/back/bottom/3D, straight/curved section, and detail views;
- GA model views from explicit global view/display coordinate systems and restriction bounds;
- text, lines, rectangles, circles, arcs, polylines, polygons, revision clouds, and symbols;
- straight, angle, radius, radial curved, and orthogonal curved dimensions;
- object marks and level marks, including merge/split operations for compatible marks.
- Drawing coordinates are explicit. Content specs choose
view,model, orsheet;
global model points are transformed through the target view, while sheet origins and
dimension distances use paper millimetres.tekla_get_drawing_sheetsupplies actual and
configured sheet bounds for placement. - The C# joker is easier to review and reaches more APIs.
tekla_check_csharpruns the same
policy/compiler path without execution and returns the source SHA-256 plus detected mutations.
Live scripts reference all installed managedTekla.Structures*.dllassemblies. Drawing is
intentionally used through an explicit alias such as
using TSD = Tekla.Structures.Drawing;to avoidPart/Viewname collisions.
All persistent mutations remain preview-by-default. Drawing, view, and drawing-object writes
attempt the same MCP_ORIGIN tagging, although support for drawing-side UDAs varies by object
type and environment.
Drawing workflow and preconditions
The Drawing API is stateful. The intended sequence is:
- Call
tekla_get_drawing_statusandtekla_list_drawings. - Use the opaque drawing key returned by the list. Exact mark lookup is accepted only when it
is unambiguous. - Close the editor before creating drawings. A drawing being updated, deleted, or printed
must not be active; updating also requires up-to-date numbering. - Open one drawing before listing/editing views and drawing objects.
- Call each mutating tool with its default
apply=false, inspect the preview, then repeat with
apply=trueonly after approval. - Re-list views/objects after inserts or deletes. Indices are display aids, not persistent
identities.
Drawing keys normally use DrawingInternal ID/ID2. Because that surface is version-sensitive,
the backend falls back to a composite of public type/model/sheet/mark/name properties when the
identifier is unavailable. Treat drawing, view, and object IDs as best-effort until verified on
the target Tekla version.
Coordinate spaces are deliberately not mixed:
view: local to the target view/display coordinate system;model: global model millimetres transformed into the target view;sheet: paper millimetres on the drawing sheet (viewIndex=-1, noviewId).
View insertion/origin/frame values and dimension-line offsets are paper millimetres. Section
cut/detail points are source-view-local; section depths are model millimetres.
Validation
- Tool registration inventory: 100 unique
tekla_*tools, including 51 drawing-specific tools. - Mock-only automated suite: 79 tests.
- Full solution compiles against the version-matched Tekla 2021 Model + Drawing packages.
- The earlier modeling phase passed MCP stdio initialize/tools-list and structured batch-preview
smoke tests.
No live Windows drawing-editor validation is claimed here.
Live-validation notes
The new drawing calls are based on the common Tekla 2021 Drawing API surface and are wrapped to
degrade with messages/errors instead of crashing a whole batch. They still need validation on
Windows with each supported Tekla generation before being called fully proven:
- reference-object metadata keys and world face coordinates on rotated/scaled/base-point IFCs;
- custom Connection insertion/status and attributes-file behavior;
- Position LEFT/RIGHT and FRONT/BEHIND behavior against known model faces;
DrawingInternal.DatabaseObjectExtensionsID/ID2 extraction and fallback-key behavior;- drawing-list selection and active-editor transitions;
- assembly/single-part/cast-unit/GA insertion and saved AutoDrawing rules;
- update/issue/delete/place-view operations and their exact editor/numbering preconditions;
- PDF printer enums, output naming, and paths;
- view creation/rotation, global-model-to-view conversion, paper placement, and dimensions;
- drawing-object UDA support and
MCP_ORIGINpersistence by object type; - mark merge/split compatibility and resulting Mark/MarkSet identities;
- defining-point geometry for complex dimension sets, level marks, symbols, and model-linked
drawing objects (the generic reader currently degrades to identity/bounding boxes); - saved view/object/mark attribute files in real firm/project environments.
Reference geometry degrades to partial metadata/messages if a version or exporter lacks a field.
Arbitrary custom-component attributes are not enumerable in a reliable generic way; pass an
attributesFile when copying a parameter set.
Drawing view/object enumeration indices are ephemeral. The DrawingInternal IDs can be absent on
some versions or objects; if so, use a fresh listing/selection rather than retaining indices
across edits. AutoDrawing/printing/attributes are resolved by Tekla and remain
environment-specific.
tekla_replicate_detail is not in this release. It should be built after the new Position and
Connection primitives have passed live validation, so the high-level workflow does not hide
low-level placement errors.