formlab-mcp 0.6.68 → 0.6.69

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -53,7 +53,7 @@ Ask Claude (or another MCP client) things like:
53
53
  | `get_batch_pivot` | Production analytics — aggregate batches by `group_by` (formula / status / month / prepared_by / project) × `metric` (count, avg_yield_pct, total_produced_kg, avg_cost_per_batch, total_samples, total_tests), with share + total for additive metrics. Optional `batch_uids` scope + `status` filter |
54
54
  | `get_project_pivot` | Portfolio analytics — aggregate projects by `group_by` (status / phase / priority / business_unit / site / customer / lead, or `cf:<custom field>`) × `metric` (count, total_formulas / batches / samples, total_cost, avg_formulas / batches / cost_per_batch), rolling child activity + cost up by any project attribute. Optional `project_uids` scope |
55
55
  | `get_stability` | Grounded stability / shelf-life analysis for a formulation, sample or batch × parameter (auto-detected): time-series, drift (per-month slope + R²), an I-chart (mean ±3σ + out-of-control points), spec status, and an ICH-Q1E-flavored projected shelf life (point + 95%-CI crossing), all on **one point per test date per run condition** (replicates averaged, never separate time points), split by storage condition. A ranked-scale (ordinal) or text parameter returns its step / pass-fail series instead: per-condition points, firstFail, latest, scaleShift. Also the app's **Time points** (per condition: tested time points, skipped pulls, the next pull with its due date and whether it's overdue, on the formula's own pull schedule, in months or weeks, or the standard one; `as_of`) and **Arrhenius** (rates at the storage temperatures → the rate, Ea, Q10 and shelf life at `predict_at_c`, zero or first `order`, with 95% CIs and a verdict against the target), and per series the **moving range** (MR̄, its limit, the jumps above it). Leave out `parameter` for **All parameters**: every parameter's spec status and months to spec, out of spec first, and the one that limits shelf life |
56
- | `list_stability_pulls` | Stability pulls due across the whole workspace (the app's Needs Attention row): every formula on a study, its next pull per storage condition overdue or due within `within_days` (default 7), on its own pull schedule or the standard one, with the samples to pull; a test of any parameter counts as the pull; studies more than 60 days late listed apart as stopped |
56
+ | `list_stability_pulls` | Stability pulls due across the whole workspace (the app's Needs Attention row): every formula on a study, its next pull per storage condition overdue or due within `within_days` (default 7), on its own pull schedule or the standard one, with the samples to pull and every pull still ahead (`ahead`, as the app's Calendar); a test of any parameter counts as the pull; studies more than 60 days late listed apart as stopped |
57
57
  | `get_design_space` | COMPOSITION design space for one project, several (`projects`) or any formula list (`formulas`, across projects — like the app's Scope → DOE Matrix): which ingredients vary and over what observed wt-% ranges (ranked), an occupied-region summary ("where you've been"), the biggest untested **interior gap** as ready-to-seed DOE ranges (a combination you could have made but skipped), and an optional standardised **2-component PCA** of all varying ingredients — loadings, variance-explained, scree, and a full-dimensional gap. Optional `axes` (choose the 2–3 axes), `by_role` (map ingredients summed by primary Function, e.g. Pigment / Solvent / Film Former — no gap, roles aren't DOE factors) and `property` (highest / lowest formula plus the ingredients whose level tracks it, Spearman ρ). Reports formulas that aren't on the map and the spread on it. Matches the in-app Design Space Viewer exactly. Answers *"where haven't I explored?"* / *"what should I formulate next?"* |
58
58
  | `list_doe_designs` | Saved DOE designs — the *recipe* behind each batch of runs: design type, factors + ranges, constraints, run count, D-efficiency. Filters: `project`, `design_type`, `constrained_only`, `name_contains` |
59
59
  | `get_doe_design` | One design in full: constraints in plain language, the model it was optimised for, generation settings (run budget, replicates, centre points, seed) and the complete run matrix with the formulation each run became |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "formlab-mcp",
3
- "version": "0.6.68",
3
+ "version": "0.6.69",
4
4
  "mcpName": "io.github.juliu1980/formlab-mcp",
5
5
  "description": "Read-only Model Context Protocol server for FormLab. Lets Claude and other MCP clients read and analyze your FormLab data, from a local export file or your live cloud workspace.",
6
6
  "homepage": "https://formvix.com/mcp",
package/server.json CHANGED
@@ -2,13 +2,13 @@
2
2
  "$schema": "https://static.modelcontextprotocol.io/schemas/2025-12-11/server.schema.json",
3
3
  "name": "io.github.juliu1980/formlab-mcp",
4
4
  "description": "Read-only MCP server for FormLab formulation data: a local export file or your live cloud workspace.",
5
- "version": "0.6.68",
5
+ "version": "0.6.69",
6
6
  "websiteUrl": "https://formvix.com/mcp",
7
7
  "packages": [
8
8
  {
9
9
  "registryType": "npm",
10
10
  "identifier": "formlab-mcp",
11
- "version": "0.6.68",
11
+ "version": "0.6.69",
12
12
  "runtimeHint": "npx",
13
13
  "transport": {
14
14
  "type": "stdio"
@@ -1551,8 +1551,11 @@ function _mcpPullsDue(db, now) {
1551
1551
  const sampleIds = [...condSamples.get(cond)].filter(id => live.has(id));
1552
1552
  if (!sampleIds.length) return; // every sample under it discarded: the study is over there
1553
1553
  const last = r.cells.get(r.lastKey);
1554
+ // Every pull still ahead on this schedule, the next and each one after it: the app's pull calendar (47k).
1555
+ const ahead = _tpLadder(tC, target, plan).filter(e => _tpBucket(_pullDays(e), r.weekDays).key > r.lastKey)
1556
+ .map(e => { const due = t0 + _pullDays(e) * _MS_PER_DAY; return _nextOut({ label: _pullLabel(e), due: new Date(due), days: Math.floor((due - now) / _MS_PER_DAY) }); });
1554
1557
  const row = { formula: { id: f.id, uid: f.uid || null, name: f.name || f.uid || 'Formula' }, condition: cond, temperatureC: _round(tC, 1),
1555
- schedule: r.own ? 'formula' : 'standard', t0: _dayOf(t0), lastTimePoint: last ? last.label : null, ..._nextOut(r.next), parameter: param,
1558
+ schedule: r.own ? 'formula' : 'standard', t0: _dayOf(t0), lastTimePoint: last ? last.label : null, ..._nextOut(r.next), parameter: param, ahead,
1556
1559
  samples: sampleIds.map(id => { const x = (db.samples || []).find(y => y && y.id === id); return x ? (x.uid || x.id) : id; }) };
1557
1560
  (r.next.days < -_PULL_STALE_D ? stopped : due).push(row);
1558
1561
  });
@@ -1913,7 +1916,7 @@ const get_stability = {
1913
1916
  const list_stability_pulls = {
1914
1917
  definition: {
1915
1918
  name: 'list_stability_pulls',
1916
- description: 'Stability pulls due across the whole workspace: the app\'s Needs Attention "stability pulls due" row, without naming a formula. Every formula on a stability study (tests under a storage condition with a temperature in its name, on 2+ dates) gives its next pull per condition, on the formula\'s own pull schedule or the standard one (1, 2, 3, 6 months at 35 °C and up; 1, 2, 3, 6, 9, 12, 18, 24, 36 months up to the target shelf life). A test of ANY parameter in a time point under that condition counts as the pull; T0 is the formula\'s first such test. Returns the pulls overdue or due within within_days (default 7), soonest first, with formula, condition, time point, due date, daysUntil (negative = overdue), schedule, the last time point tested, the parameter the study measures most, and the samples to pull (UIDs; discarded ones left out, and a condition whose samples are all discarded has nothing due). Only the storage part of a reading\'s conditions counts (a measurement temperature such as Temperature 25 °C does not make a study); ICH shorthand such as 40/75 reads as 40 °C; a test dated after as_of does not count as pulled yet. A pull more than 60 days late is a study that stopped: listed apart under stopped. Exploration runs (DOE / screening), archived and trashed formulas are left out, as in the app. For one formula\'s full time-point grid use get_stability (timePoints).',
1919
+ description: 'Stability pulls due across the whole workspace: the app\'s Needs Attention "stability pulls due" row, without naming a formula. Every formula on a stability study (tests under a storage condition with a temperature in its name, on 2+ dates) gives its next pull per condition, on the formula\'s own pull schedule or the standard one (1, 2, 3, 6 months at 35 °C and up; 1, 2, 3, 6, 9, 12, 18, 24, 36 months up to the target shelf life). A test of ANY parameter in a time point under that condition counts as the pull; T0 is the formula\'s first such test. Returns the pulls overdue or due within within_days (default 7), soonest first, with formula, condition, time point, due date, daysUntil (negative = overdue), schedule, the last time point tested, the parameter the study measures most, ahead (every pull still ahead on that schedule, the next first, each with its due date and daysUntil: what the app\'s Calendar button exports), and the samples to pull (UIDs; discarded ones left out, and a condition whose samples are all discarded has nothing due). Only the storage part of a reading\'s conditions counts (a measurement temperature such as Temperature 25 °C does not make a study); ICH shorthand such as 40/75 reads as 40 °C; a test dated after as_of does not count as pulled yet. A pull more than 60 days late is a study that stopped: listed apart under stopped. Exploration runs (DOE / screening), archived and trashed formulas are left out, as in the app. For one formula\'s full time-point grid use get_stability (timePoints).',
1917
1920
  inputSchema: {
1918
1921
  type: 'object',
1919
1922
  properties: {
@@ -1941,7 +1944,7 @@ const list_stability_pulls = {
1941
1944
  count: pulls.length, overdue: pulls.filter(x => x.overdue).length, pulls,
1942
1945
  later: r.due.filter(x => mine(x) && x.daysUntil > within).length,
1943
1946
  stopped: r.stopped.filter(mine),
1944
- note: 'daysUntil < 0 = overdue by that many days. schedule "formula" = the formula\'s own pulls, else "standard". later = studies whose next pull is further out than within_days. stopped = next pull more than 60 days late, read as a study that ended; the app leaves these out of Needs Attention. Narrate these figures; do not recompute the schedule.',
1947
+ note: 'daysUntil < 0 = overdue by that many days. schedule "formula" = the formula\'s own pulls, else "standard". later = studies whose next pull is further out than within_days (within_days 3650 lists every study). ahead = the rest of each row\'s schedule, the next pull first: for "what is coming up" over months, read ahead rather than recomputing from the schedule. stopped = next pull more than 60 days late, read as a study that ended; the app leaves these out of Needs Attention. Narrate these figures; do not recompute the schedule.',
1945
1948
  };
1946
1949
  },
1947
1950
  };