variancelabs-mcp

v0.3.11
variancelabs-mcp Checked 1 day ago Published 5 days ago

VarianceLabs MCP server — Mineral resource estimation & reporting tools

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

project_open

Open the VarianceLabs project: every loaded or built object (drillholes, composites, QC data, wireframes, block models, estimates, surfaces) with its parameters and links. The Data page lists them (rename, remove, edit parameters: everything built from an edited object rebuilds automatically); the 3D viewer shows them. project (every project / processing / geometry tool): omitted -> the single project in the working folder (created and named after the folder when there is none); else a project id or name. Names are not unique: several matches -> project_ambiguous listing them; ask the user whi…

ParameterTypeDescription
open
project

project_create

Create a new, empty project (even if others exist in the folder); same result as project_open. Use when the user wants a separate project.

ParameterTypeDescription
name *string
open

project_load_drillholes

Load drillholes into the project (copied into it, so it stays complete). Raw: collar + intervals (+ survey) CSV paths, desurvey = {coordinate_system?, dip_convention?, method?, azimuth_correction?} as in processing_desurvey; the parameters stay editable on the Data page. Already processed: desurveyed = one interval CSV with HOLE, FROM, TO and X/Y/Z at the midpoints, or x_from, y_from, z_from, x_to, y_to, z_to at both ends; load_as = 'drillholes' (default) or 'composites'; not editable (the raw data is not in the project) but usable by every geometry tool. mapping = {role: column} overrides. Lo…

ParameterTypeDescription
collar
desurvey
desurveyed
intervals
load_asstring
mapping
name
project
survey

project_load_qaqc

Load QC files (assay quality control) for a drillholes object, copied into the project as one 'QC data' object nested under them. drillholes: a drillholes object id (or {collar, intervals, survey?} paths). standards: CRM and blank results (standard id, element columns, batch?, date?); reference: certified values per standard (+ optional <EL>_SD columns); duplicates: duplicate / repeat results (sample id of the original or a parent column, a type column: field, coarse, pulp, repeat, umpire); blanks: blanks kept in their own file. At least one of standards / duplicates / blanks. Columns are dete…

ParameterTypeDescription
drillholes *
blanks
duplicates
mapping
name
project
reference
standards

project_load_wireframe

Import an OBJ wireframe (world coordinates) into the project; shown in the viewer and usable by geometry_block_model, not editable. Returns {project, object_id, outputs, summary}. project (every project / processing / geometry tool): omitted -> the single project in the working folder (created and named after the folder when there is none); else a project id or name. Names are not unique: several matches -> project_ambiguous listing them; ask the user which one.

ParameterTypeDescription
path *string
name
project

project_load_surface

Load a surface (topography, a horizon such as the base of oxidation, a pit design) into the project (copied into it); shown on the Data page (Surfaces) and in the 3D viewer, and usable by geometry_cut. path: GeoTIFF (.tif/.tiff, band 1, north-up), ESRI ASCII grid (.asc), XYZ points (.csv/.txt/.xyz/.dat: separator, decimal comma, header and the X / Y / Z columns detected; points on a regular lattice become a grid, scattered ones are joined into triangles, over 2 M scattered points are averaged onto a grid), DXF (3D faces / meshes; without faces, contour lines and points joined into triangles; a…

ParameterTypeDescription
path *string
layer
name
project

project_update

Change an object's parameters (same as Edit on the Data page) and rebuild it and everything built from it, in order. params use the tool option names and are merged into the current ones: e.g. {"dip_convention": "negative_down"} (drillholes), {"length": 1} (composites), {"options": {"resolution": 2}} (wireframes), {"options": {"block_size": [5, 5, 2], "rotation": {"azimuth": 30}}} (block models: only block_size and rotation). {"mapping": {"types": {"FIELD": "pulp"}}} (QC data). {"assay_values": {"AU1": {"limit": 0.01, "codes": {"-1": "missing", "0": "below_detection"}, "assay": true}}} (drillh…

ParameterTypeDescription
object_id *string
params *object
project

project_find_value

Look for a value (a code such as -5, 9999, IS) in the raw interval data of every drillholes object (also imported ones), including a code the automatic reading did not list. Returns {project, value, code, found: [{object_id, object, column, code, n, read_as, reason, set, settable, readings}], built_from: [{object_id, name, kind, depends_on, from, rebuilt}], next_step}: where it is, how many times, how each column reads it today (set: the user set it), the readings it may get there, and what is built from those objects. settable false: a text column not read as values (nothing to set there). re…

ParameterTypeDescription
value *string
project

project_set_values

Set how values read, several at once, then recompute. changes = [{object_id, column, code, reading}], reading "missing" | "below_detection" | "value" | "auto" (back to the automatic reading); a reading other than auto needs the code in that column and among its readings (see project_find_value). recompute = "all" (default) or the ids of the derived objects to rebuild now (what they are built from comes along). The changed objects always rebuild; derived objects left out become out of date (project_update(object_id, {}) rebuilds one later); estimates are only marked out of date. One invalid cha…

ParameterTypeDescription
changes *array
project
recompute

project_set_element_groups

Categorize assay columns: each one's element and geochemical group, used by the correlation matrix (groups on its diagonal) and editable on the Data page. Decide from geochemical knowledge and the deposit type, NOT from the correlations; odd column names are yours to read. columns = {column: {element, group}}, null for a column that is no element (RQD, density), or 'preset' to drop the decision. Merged into what is there; the result holds every column with set_by (agent, you, preset, none). group_order lists the groups in matrix order. A column the user edited (set_by you) is skipped and liste…

ParameterTypeDescription
columns *object
group_order
overwriteboolean
project

project_set_display_names

Set what the app pages call a column (e.g. {"AU1": "Au (g/t)", "CU_PCT": "Cu %"}): its name in the 3D viewer, EDA, QAQC, the correlation matrix and saved figures, also editable on the Data page (click the element). Tools, files and project.json keep the column's own name: always pass that one. null or "" goes back to the column's own name. A name another column has or is called is refused. Set it only when the user asked for one. A name the user set is skipped and listed in skipped: overwrite=true only when the user asked for it. Nothing is rebuilt. Returns {project, element_groups, display_na…

ParameterTypeDescription
names *object
overwriteboolean
project

project_set_main_commodity

Set the project's main commodity column (e.g. 'AU1'): the EDA, QAQC and 3D viewer pages (drillhole colouring, block models' estimate of it) and the eda_* / qaqc_* tools show it first wherever an object has it (matched ignoring case); each plot can still pick another column. column=null clears it (back to the first column). Nothing is rebuilt. Returns {project, main_commodity}. project (every project / processing / geometry tool): omitted -> the single project in the working folder (created and named after the folder when there is none); else a project id or name. Names are not unique: several…

ParameterTypeDescription
column *
project

project_remove

Remove objects from the project. If other objects are built from them, returns has_dependents listing those: ask the user, then call again with cascade=true to remove them too. Files outside the project are never touched. To delete the whole project, use project_delete. project (every project / processing / geometry tool): omitted -> the single project in the working folder (created and named after the folder when there is none); else a project id or name. Names are not unique: several matches -> project_ambiguous listing them; ask the user which one.

ParameterTypeDescription
object_ids *array
cascadeboolean
project

project_rename

Rename an object (object_id) or, without object_id, the project itself (same as Rename on the Data page). Nothing is rebuilt. Returns {project, renamed: {id, kind, name}}. project (every project / processing / geometry tool): omitted -> the single project in the working folder (created and named after the folder when there is none); else a project id or name. Names are not unique: several matches -> project_ambiguous listing them; ask the user which one.

ParameterTypeDescription
name *string
object_id
project

project_delete

Delete a whole project: its folder and every object in it (copied inputs, builds, estimates, page state). Cannot be undone; files outside the project are never touched. project: required, its id or name (project_open lists them). Without confirm=true it deletes nothing and returns confirm_delete with what the project holds: show the user, ask, then call again with confirm=true. Refused while an object is building or training. Returns {deleted: {id, name, objects}}.

ParameterTypeDescription
project *string
confirmboolean

processing_composite

Composite drillhole intervals to a fixed length and desurvey the midpoints, as a composites object of the project (shown under its drillholes on the Data page, where its parameters can be edited later). drillholes: a drillholes object id (project_load_drillholes / project_open) or {collar, intervals, survey?, mapping?, desurvey?} CSV paths (loaded into the project, or reused when identical; survey optional: straight holes from collar azimuth/dip, else vertical; desurvey options: mapping ({role: column}; roles hole, x, y, z, depth, from, to, azimuth, dip), coordinate_system ('auto' | 'plain' |…

ParameterTypeDescription
drillholes *
name
options
project

processing_desurvey

Add X/Y/Z to drillhole rows: intervals (HOLE, FROM, TO) at their midpoint (at='mid') or at both ends (at='from_to' -> X_FROM…Z_TO), or points (HOLE, DEPTH) at their depth. Minimum curvature; the 3D viewer uses the same geometry. options (all optional): mapping ({role: column}; roles hole, x, y, z, depth, from, to, azimuth, dip), coordinate_system ('auto' | 'plain' | 'utm' | 'grid' | 'world' | 'mine' | 'local'; auto keeps collar x/y and survey azimuth in one system, UTM preferred), dip_convention ('auto' | 'negative_down' | 'positive_down' | 'from_vertical' (0 = down), or {collar: ..., survey…

ParameterTypeDescription
collar *string
table *string
atstring
options
survey

modelling_start_run

Start a background estimation of one grade at every block of a block-model object; returns immediately with the new estimate's object_id (status running). Poll modelling_run_status. method: 'nexus' (default): non-stationary geostatistics (NEXUS.md) — a stationarity audit, a multiscale robust trend, local scale / nugget / anisotropy fields and kriging with a non-stationary covariance; ordinary kriging when the data are stationary. 'lva_dknn': a neural network that kriges each block from its nearest samples with a learned covariance, conditioned on local data (its options at the end). block_mo…

ParameterTypeDescription
block_model *string
samples *string
value *string
columns
domains
methodstring
name
options
project

modelling_run_status

Progress of an estimate's run: state running (NEXUS phase: preparing, transform, audit, selection step k of n fits, estimating with blocks done, validation; LVA-DKNN: domain, epoch, losses), completed (per domain: NEXUS gives the audit label, every parameter with its value and reason, held-out CRPS / RMSE / R² against ordinary kriging and inverse distance, 80 % interval coverage, trend reproduction TRE; LVA-DKNN gives the network and local-data baselines; warnings — tell the user — and output paths: estimate.csv aligned with block_model.csv, metrics.json, validation.csv…) or failed (err…

ParameterTypeDescription
object_id *string
project

modelling_cancel_run

Ask a running estimate to stop (within a batch). A cancelled first run is removed; a cancelled retrain keeps the previous result.

ParameterTypeDescription
object_id *string
project

geometry_domain_wireframe

Build a closed domain/lithology wireframe from drillhole interval codes. Intervals whose `column` value is in `inside` (e.g. column='LITH', inside=['SAP'], or column='DOMAIN', inside=[3]) are inside. Contacts where holes pass between inside and outside are honoured exactly; a biharmonic RBF of the signed distance to the contacts is contoured by marching cubes. drillholes: a drillholes or composites object id (project_open lists them), or {collar, intervals, survey?, mapping?, desurvey?} CSV paths, loaded into the project or reused when identical (mapping: {role: column}, roles hole, x, y, z,…

ParameterTypeDescription
column *string
drillholes *
inside *array
name
options
project

geometry_cut

Cut an object with a surface (topography, a horizon, a pit design; loaded with project_load_surface), keeping what is below it (keep='below', default) or above (keep='above'). object: a drillholes, composites, wireframe or block-model object id (a cut object too: cut below topography, then above a horizon, keeps what lies between). outside: what lies outside the surface's area (no elevation there): 'keep' (default; topography that does not cover the whole model) or 'drop' (a pit design that covers only the pit: in-pit material = cut below topography, then above the pit design with outside='dro…

ParameterTypeDescription
object *string
surface *string
keepstring
name
outsidestring
project

geometry_block_model

Build block-model geometry (no values yet: property modelling fills it later). Regular parent blocks, optionally rotated, optionally constrained to closed wireframes with regular sub-blocks where a wireframe boundary cuts a parent. A (sub-)block belongs to the first listed wireframe that contains its centroid (its DOMAIN code); blocks outside every wireframe are dropped unless keep_outside. wireframes (optional): wireframe object ids, .obj paths (imported into the project), or {ref, code?, label?}; codes default to 1, 2, ... in order (0 = outside); list order = priority where they overlap. d…

ParameterTypeDescription
drillholes
name
options
project
wireframes

geometry_grade_shell

Build a closed grade shell around grades >= cutoff (e.g. column='AU', cutoff=0.5). From drillholes, intervals are composited first (data_processing, auto length); from a composites object they are used as they are. Default transform 'indicator': composites >= cutoff are inside, contacts between them honoured exactly (robust to noisy grades); 'log' / 'none' / 'auto' (log if skewed) interpolate the grade itself and contour it at the cut-off. drillholes: a drillholes or composites object id (project_open lists them), or {collar, intervals, survey?, mapping?, desurvey?} CSV paths, loaded into the…

ParameterTypeDescription
column *string
cutoff *number
drillholes *
name
options
project

eda_overview

Start an exploratory data analysis: what the project can analyse. Returns sources (drillholes / composites: numeric and category columns, n / missing / mean / CV / min / max per numeric column), estimates (block model, domains, status), panel availability and `steps`, the suggested order of eda_* tools. open=true opens the EDA page on this analysis in the user's browser; every result has `url`, that page (give it to the user). params: each choice made and why (auto ones too); warnings: tell the user. project (every project / processing / geometry tool): omitted -> the single project in the wor…

ParameterTypeDescription
openboolean
project

eda_univariate

Univariate statistics of one property: n, missing, non-positive, mean, SD, CV, variance, min, Q1, median, Q3, P90/P95/P99, max, skewness, kurtosis, log mean / SD, per group; histogram (edges + weight fractions). log: 'auto' (log when positive and skewness > 1) | true | false; bins: 'auto' (Freedman–Diaconis, 10–60) | int. source: a drillholes or composites object id (default: the first drillholes); property: a numeric column (default: the source's first); group_by: a category column (DOMAIN, LITH…) splitting every result by group plus 'all'; weight: 'length' (default, length-weighted sta…

ParameterTypeDescription
bins
group_by
log
openboolean
project
property
source
weightstring

eda_bivariate

Two properties x and y (defaults: the first two numeric): Pearson r, r on logs, Spearman rho, regression slope / intercept (on logs when log axes), n, per group; plus the correlation matrix (method 'spearman' by default | 'pearson') of the assay columns, without those marked no element: properties in matrix order, labels, groups (name, start, size) from project_set_element_groups, clustered inside each group, below_detection share and restricted (under half the coverage) per column, r and n. Below-detection values were set to half their limit and missing ones left out when the drillholes were…

ParameterTypeDescription
group_by
log
methodstring
openboolean
project
source
x
y

eda_outliers

Top-cut diagnostics of a property (nothing is capped): Parrish decile analysis with a verdict (capping warranted when the top decile holds > 40 % of the metal or > 2 x the 9th decile's, or the top percentile > 10 %), cap candidates (P95, P97.5, P99, P99.5, lognormal mean + 2.5 SD, probability-plot break) each with samples capped, % metal removed, capped mean and CV, the suggested cap with its reason, and the first 50 samples above it (n_flagged = all). Per group with group_by. source: a drillholes or composites object id (default: the first drillholes); property: a numeric column (default: the…

ParameterTypeDescription
group_by
openboolean
project
property
source
weightstring

eda_section

Vertical section along a line A–A′ with a corridor: start / end = [x, y] (both or neither; auto: the collars' long axis), width in m (auto: 2 x the median nearest-collar spacing); property: numeric or category column. wireframes: ids cut by the section plane (default: every wireframe; [] for none); block_model: an estimate (blocks coloured by its value) or block model (by domain) id to cut, default none (eda_overview lists the ids). Returns the line used, the holes in the corridor (distance along the line, offset, length inside, length-weighted mean), the wireframes cut (pieces of outline)…

ParameterTypeDescription
block_model
end
openboolean
project
property
source
start
width
wireframes

eda_grade_tonnage

Grade–tonnage curve of an estimate object (estimate: its id): tonnage (density in t/m³; without density the curve is volume in m³), mean grade and metal above each cut-off; a table at about 10 rounded cut-offs. cutoffs: 'auto' (0 to the P99 block grade) | list; domain: a block domain code. open=true opens the EDA page on this analysis in the user's browser; every result has `url`, that page (give it to the user). params: each choice made and why (auto ones too); warnings: tell the user. project (every project / processing / geometry tool): omitted -> the single project in the working folde…

ParameterTypeDescription
estimate *string
cutoffs
density
domain
openboolean
project

eda_swath

Swath plots of an estimate against its own samples: per slice along x / y / z, the sample mean (length-weighted) and the volume-weighted estimate mean; per axis the global means, their difference % and the flagged slices (>= 5 samples and > 15 % apart). axis: 'all' (summaries only) | 'x' | 'y' | 'z' (with every slice); width: slice width in m (auto: a multiple of the parent block size, <= 25 slices); domain: a block domain code. open=true opens the EDA page on this analysis in the user's browser; every result has `url`, that page (give it to the user). params: each choice made and why (auto on…

ParameterTypeDescription
estimate *string
axisstring
domain
openboolean
project
width

qaqc_overview

Start here: the QAQC state of the project. Returns the drillholes and QC data checked, the elements, which panels have data (standards, blanks, duplicates, grades, geometry, spatial) with their verdict (pass | warn | fail) and open flag counts, the settings in force, the orphaned reviews and `steps`: the suggested order of qaqc_* tools; follow them, each with its `args`. Standards / blanks / duplicates verdicts are the analyses' own; grades / geometry / spatial verdicts come from their open flags (dismissing those flags turns them pass). drillholes: a drillholes object id (default: the first w…

ParameterTypeDescription
drillholes
openboolean
project

qaqc_standards

Certified reference materials (CRMs) of one element: per standard the results against the certified value and SD, bias %, the control chart verdict and the Nelson rule events (rules 1-8) by batch; flags cut to 20 (n_flags = all). standard: one CRM (default: the first). drillholes: a drillholes object id (default: the first with QC data); qc: a QC data object id of those drillholes (default: its first); element: the assay element (default: the QC data's first). open=true opens the QAQC page on this view in the user's browser; every result has `url`, that page (give it to the user). params: each…

ParameterTypeDescription
drillholes
element
openboolean
project
qc
standard

qaqc_blanks

Blank samples of one element against the detection limit (blank_factor x the limit sets the contamination threshold): results, share exceeding, verdict and the contaminated blanks by batch; flags cut to 20 (n_flags = all). drillholes: a drillholes object id (default: the first with QC data); qc: a QC data object id of those drillholes (default: its first); element: the assay element (default: the QC data's first). open=true opens the QAQC page on this view in the user's browser; every result has `url`, that page (give it to the user). params: each choice made and why (auto ones too); warnings:…

ParameterTypeDescription
drillholes
element
openboolean
project
qc

qaqc_duplicates

Precision of duplicate, repeat and re-assay pairs of one element, per pair set (field, coarse, pulp... and re-assay columns): pairs, HARD threshold, share within it, bias test, verdict. set: one pair set (default: the first). Flags: the 20 worst imprecise pairs plus every set-level flag (n_flags = all). drillholes: a drillholes object id (default: the first with QC data); qc: a QC data object id of those drillholes (default: its first); element: the assay element (default: the QC data's first). open=true opens the QAQC page on this view in the user's browser; every result has `url`, that page…

ParameterTypeDescription
drillholes
element
openboolean
project
qc
set

qaqc_checks

Data checks of one family: family 'grades' (values, sample ids, spikes, unassayed runs, core recovery), 'geometry' (collars, surveys, interval coverage; per-hole summary, the 20 holes with issues first) or 'spatial' (samples far above their neighbours in other holes; the 20 most extreme outliers, n_outliers = all). Returns the numbers and `flag_counts` per check; list the flags with qaqc_issues. element: the assay element (grades, spatial; default: the first). drillholes: a drillholes object id. open=true opens the QAQC page on this view in the user's browser; every result has `url`, that page…

ParameterTypeDescription
family *string
drillholes
element
openboolean
project

qaqc_issues

The flag register: every flag of every check, sorted fail first, filtered by family (standards | blanks | duplicates | grades | geometry | spatial), check (code, e.g. blank_contamination), severity (fail | warn | info), status (open | resolved | dismissed), element, hole. Returns counts, `n` matches, the first `limit` flags (default 50; each with id, message, location, status, comment) and orphaned reviews. drillholes: a drillholes object id (default: the first with QC data); qc: a QC data object id of those drillholes (default: its first); element: the assay element (default: the QC data's fi…

ParameterTypeDescription
check
drillholes
element
family
hole
limitinteger
openboolean
project
qc
severity
status

qaqc_review

Review flags: set status open | resolved | dismissed (open removes the review) with an optional comment, on the flags listed in flag_ids (from qaqc_issues), or on every current flag of a check (optionally one element / hole). only_open=true leaves flags already reviewed alone. Reviews are stored in the project and survive rebuilds. Returns {updated, status}. drillholes / qc as in qaqc_issues. project (every project / processing / geometry tool): omitted -> the single project in the working folder (created and named after the folder when there is none); else a project id or name. Names are not…

ParameterTypeDescription
status *string
check
comment
drillholes
element
flag_ids
hole
only_openboolean
project
qc

qaqc_settings

Read or set the QAQC settings. Without values: every setting with its value, whether it is automatic and why. values: {name: value}, "auto" restores one: detection_limits {element: > 0}, blank_factor (3), hard_thresholds {pair class: %} (pulp, repeat, umpire, reassay 10; coarse 20; field 30; other 20), recovery_min (80), spike_ratio (10), spatial_ratio (10). The checks rerun with the new values. drillholes: a drillholes object id. warnings: tell the user. project (every project / processing / geometry tool): omitted -> the single project in the working folder (created and named after the folde…

ParameterTypeDescription
drillholes
project
values

figure_save

Save a figure of the VarianceLabs app as a PNG image for a report: an EDA or QAQC chart, or the 3D view, laid out as a report figure (title, subtitle, framed plot, legend, footnote). By default it is what the user's open app page shows (their zoom, section, camera); with no page open, or with `view`, the server draws the page itself (needs Edge or Chrome; the 3D view is then drawn from the iso camera unless `view` names one). title: the title written on the image: write one, naming the project and what the figure shows (e.g. "Danvers — AU1 grade distribution"); omitted, the app writes "<Proj…

ParameterTypeDescription
page *string
figure
folder
layoutstring
name
note
project
side_notes
subtitle
themestring
title
view
width

doc_open

Open the VarianceLabs user guide (PDF) in the user's PDF viewer: what each module does, example requests, the app pages, and every tool with its parameters in plain language. Use when the user asks for the documentation, the manual or the user guide, or which tools and parameters exist. open=false only returns where it is. Returns {path, version (the guide's), app_version (the running server's), sections, opened}: give the user the path.

ParameterTypeDescription
openboolean