Skip to main content
Glama
znk-mcp

znk-mcp

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
ZNK2_CLIYesAbsolute path to znk2_cli.exe / znk2_cli. Required unless znk2_cli is on PATH.
ZNK2_EXPORT_DIRNoDefault output directory when znk_export has no path. Default: <server cwd>/znk_exports.
ZNK2_TIMEOUT_MSNoPer-tool timeout in ms, clamped to 1..60000; default 60000.60000
ZNK2_REVOKE_LISTNoAbsolute path to the signed revocation list. Recommended / policy-dependent; missing while revocation checking is required fails closed.
ZNK2_LICENSE_FILEYesAbsolute path to the customer .lic file. Required for kernel operations; missing yields CLI error 1004.
ZNK2_ALLOWED_ROOTSNoPath-delimiter-separated allow-list for import/export paths. Unset = no path restriction.

Instructions

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

ZNKernel-II geometry tool layer. Call znk_capabilities first when unsure. Recipes returned by znk_create/znk_boolean/znk_import are replayable and can be passed to znk_describe/znk_export/znk_adjudicate/znk_topology. Adjudication is three-valued: cannot_judge is UNDECIDED, never an allow. Kernel error codes are passed through unchanged. Requires ZNK2_CLI and ZNK2_LICENSE_FILE in the server environment.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{
  "listChanged": false
}

Tools

Functions exposed to the LLM to take actions

NameDescription
znk_createA

Create one analytic solid in ZNKernel-II. primitive = box | cylinder | sphere | cone | torus. params: box {lo:[x,y,z],hi:[x,y,z]}; cylinder {center,axis,radius,height}; sphere {center,radius}; cone {base_center,axis,base_radius,height}; torus {center,axis,major_radius,minor_radius}. Units are model units (mm by convention). Returns kernel measurements, a tessellation summary and a replayable recipe for chaining. Set tessellate=false to skip the mesh summary.

znk_booleanA

Boolean operation between two solids: operation = union | subtract (a minus b) | intersect. a and b are recipes from znk_create / znk_boolean / znk_import; a whole previous tool result is also accepted. Planar polyhedra are exact; curved bodies may use the tessellated curved-CSG fallback (method/volume_source says so). Returns measurements plus a new replayable recipe. Kernel errors (e.g. 2001 Degenerate, 2004 Coincident, 2009 BooleanFailed) are passed through unchanged.

znk_describeA

Measure an existing solid: volume, surface area, bounding box, centroid, B-rep topology counts (vertices/edges/coedges/loops/faces/shells, Euler characteristic), closed/watertight flag and volume_source (analytic | approximated | open_shell). Set tessellate=true to add triangle count and mesh watertightness. Pass the recipe returned by znk_create / znk_boolean / znk_import.

znk_importA

Import STEP / IGES / DXF / DWG / STL / OBJ / ZNK through znk2_cli (content-probed; extension is not trusted) and return body measurements plus a replayable recipe {kind:"import",file}. Use path or inline text (STEP text is written to a server-side temporary file kept for 7 days); format is an optional hint. Default import path is fast (volume/area/centroid are null); set with_mass=true to measure mass properties. Import does not modify the source file.

znk_exportA

Export a solid to stl | obj | step. Pass a recipe (solid) or an imported file (file), plus an optional output path. STL defaults to binary (set binary=false for ASCII); STEP supports schema AP203/AP214/AP242 and length_unit m|mm (extensions are routed by znk2_cli and round-trip verified). When path is omitted the server writes under ZNK2_EXPORT_DIR (default: /znk_exports). Returns the absolute path, byte size and mesh/round-trip stats.

znk_adjudicateA

Run the ZNKernel-II rule registry over a solid (10 built-in rules) and return the raw three-valued verdicts: allow | reject | cannot_judge. cannot_judge means UNDECIDED and is never mapped to allow; the response keeps verdict_summary and policy unchanged. Input: solid recipe or file (one of them), optional rule id (omit = all 10), params, tolerance, otherBodies (recipes) and otherFiles (paths, for assembly/interference).

znk_adjudicate_rulesA

List the 10 built-in ZNKernel-II adjudication rules (id, namespace, name, rule_version, description, defaultParams) and the three accepted verdicts. This produces no geometry. Like every kernel operation it requires ZNK2_LICENSE_FILE; a missing license returns CLI error 1004.

znk_topologyA

Read B-rep topology counts for a solid through znk2_cli describe: solids/shells/faces/loops/coedges/edges/vertices, Euler characteristic, shell Euler values, validity/issue_count, bbox and closed flag. This CLI-only tool layer reports body-level counts; entity-level face/edge/vertex geometry and adjacency (zn2_entity_topology) are NOT exposed by znk2_cli 2.28.1 and return an explicit NotSupported (1003) instead of fabricated data.

znk_capabilitiesA

Report ZNKernel-II capabilities before modeling: kernel/CLI version, ABI symbols, implemented/unsupported feature families, primitives, boolean ops, export formats, tessellation/sketch support, protection and license status, and limits. No geometry. Works without a license (license.status will say missing).

znk_sketch_solveA

Solve 2D sketch constraints with the ZNKernel-II LM solver. request is the legacy JSON contract: single constraint {type,a_pos,a_dir,b_pos,b_dir,value} or system {op:"solve_system",entities:[...],constraints:[...],options:{...}}. Batch mode ({constraints:[...]} or batch=true) returns kernel 9002 on the official CLI and is passed through. Returns {ok,residual,iterations,converged,positions} or {ok:false,error:{code,message}}.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

TDQS

A3.9/5.0

Scored across 10 tools

Disambiguation3/5

Most tools are clearly distinct (import, create, boolean, export, sketch_solve), but znk_describe and znk_topology both return B-rep topology counts from the same underlying CLI 'describe', and znk_adjudicate vs znk_adjudicate_rules are separable only by careful reading. The descriptions do explain the differences (topology is body-level counts only, adjudicate_rules produces no geometry), but an agent could easily pick the wrong one for a measurement query.

Naming Consistency4/5

All tools share a consistent znk_ snake_case prefix, giving a predictable namespace. Within that, verbs (export, import, create, describe, adjudicate) are mixed with nouns (boolean, topology, capabilities), a minor deviation but still highly readable and grouped logically.

Tool Count5/5

Ten tools is well-scoped for a CAD kernel server: each covers a distinct stage of the modeling lifecycle (inspect capabilities, import, create, boolean, measure, adjudicate, sketch solve, export). No obviously redundant or filler tools.

Completeness3/5

Core lifecycle is covered (create/import, boolean, measure, adjudicate, export), but there are notable gaps: no transform tools (translate/rotate/scale/mirror), no fillet/chamfer or other feature operations, and znk_sketch_solve solves sketches but exposes no path to turn a solved sketch into a solid. Agents hitting these common CAD workflows would dead-end or have to fall back to recipes/booleans manually.

Maintenance

ActivityMaintained
ResponsivenessNo recent community issues