@chaprola/mcp-server 1.3.1 → 1.3.2
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/package.json +1 -1
- package/references/cookbook.md +65 -17
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@chaprola/mcp-server",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.2",
|
|
4
4
|
"description": "MCP server for Chaprola — agent-first data platform. Gives AI agents 46 tools for structured data storage, record CRUD, querying, schema inspection, web search, URL fetching, scheduled jobs, and execution via plain HTTP.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
package/references/cookbook.md
CHANGED
|
@@ -318,31 +318,79 @@ Higher weight = more important. HULDRA minimizes `Q = sum(weight × (value - goa
|
|
|
318
318
|
- **`SSR` (objective value)** — Sum of squared residuals. Divide by record count for mean squared error. Take the square root for RMSE in the same units as your data.
|
|
319
319
|
- **`dq_dx` on elements** — Gradient. Values near zero mean the parameter is well-optimized. Large values may indicate the bounds are too tight.
|
|
320
320
|
|
|
321
|
-
###
|
|
321
|
+
### Model Catalog — Which Formula to Try
|
|
322
|
+
|
|
323
|
+
HULDRA fits any model expressible with Chaprola's math: `+`, `-`, `*`, `/`, `EXP`, `LOG`, `SQRT`, `ABS`, `POW`, and `IF` branching. Use this catalog to pick the right model for your data shape.
|
|
324
|
+
|
|
325
|
+
| Model | Formula | When to use | Chaprola math |
|
|
326
|
+
|-------|---------|-------------|---------------|
|
|
327
|
+
| **Linear** | `y = R1*x + R2` | Proportional relationships, constant rate | `*`, `+` |
|
|
328
|
+
| **Multi-linear** | `y = R1*x1 + R2*x2 + R3` | Multiple independent factors | `*`, `+` |
|
|
329
|
+
| **Quadratic** | `y = R1*x^2 + R2*x + R3` | Accelerating/decelerating curves, area scaling | `*`, `+`, `POW` |
|
|
330
|
+
| **Exponential growth** | `y = R1 * EXP(R2*x)` | Compound growth, population, interest | `EXP`, `*` |
|
|
331
|
+
| **Exponential decay** | `y = R1 * EXP(-R2*x) + R3` | Drug clearance, radioactive decay, cooling | `EXP`, `*`, `-` |
|
|
332
|
+
| **Power law** | `y = R1 * POW(x, R2)` | Scaling laws (Zipf, Kleiber), fractal relationships | `POW`, `*` |
|
|
333
|
+
| **Logarithmic** | `y = R1 * LOG(x) + R2` | Diminishing returns, perception (Weber-Fechner) | `LOG`, `*`, `+` |
|
|
334
|
+
| **Gaussian** | `y = R1 * EXP(-(x-R2)^2/(2*R3^2))` | Bell curves, distributions, demand peaks | `EXP`, `*`, `/` |
|
|
335
|
+
| **Logistic (S-curve)** | `y = R1 / (1 + EXP(-R2*(x-R3)))` | Adoption curves, saturation, carrying capacity | `EXP`, `/`, `+` |
|
|
336
|
+
| **Inverse** | `y = R1/x + R2` | Boyle's law, unit cost vs volume | `/`, `+` |
|
|
337
|
+
| **Square root** | `y = R1 * SQRT(x) + R2` | Flow rates (Bernoulli), risk vs portfolio size | `SQRT`, `*`, `+` |
|
|
338
|
+
|
|
339
|
+
**How to choose:** Look at your data's shape.
|
|
340
|
+
- Straight line → linear or multi-linear
|
|
341
|
+
- Curves upward faster and faster → exponential growth or quadratic
|
|
342
|
+
- Curves upward then flattens → logarithmic, square root, or logistic
|
|
343
|
+
- Drops fast then levels off → exponential decay or inverse
|
|
344
|
+
- Has a peak/hump → Gaussian
|
|
345
|
+
- Straight on log-log axes → power law
|
|
346
|
+
|
|
347
|
+
### Nonlinear VALUE Program Patterns
|
|
348
|
+
|
|
349
|
+
**Exponential decay:** `y = R1 * exp(-R2 * x) + R3`
|
|
350
|
+
```chaprola
|
|
351
|
+
LET ARG = R2 * X
|
|
352
|
+
LET ARG = ARG * -1
|
|
353
|
+
LET PRED = EXP ARG
|
|
354
|
+
LET PRED = PRED * R1
|
|
355
|
+
LET PRED = PRED + R3
|
|
356
|
+
```
|
|
322
357
|
|
|
323
|
-
|
|
358
|
+
**Power law:** `y = R1 * x^R2`
|
|
359
|
+
```chaprola
|
|
360
|
+
LET PRED = POW X R2
|
|
361
|
+
LET PRED = PRED * R1
|
|
362
|
+
```
|
|
324
363
|
|
|
364
|
+
**Gaussian:** `y = R1 * exp(-(x - R2)^2 / (2 * R3^2))`
|
|
325
365
|
```chaprola
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
DEFINE VARIABLE SSR R45
|
|
332
|
-
|
|
333
|
-
GET T FROM P.time
|
|
334
|
-
GET OBS FROM P.observed
|
|
335
|
-
LET ARG = R2 * T
|
|
366
|
+
LET DIFF = X - R2
|
|
367
|
+
LET DIFF = DIFF * DIFF
|
|
368
|
+
LET DENOM = R3 * R3
|
|
369
|
+
LET DENOM = DENOM * 2
|
|
370
|
+
LET ARG = DIFF / DENOM
|
|
336
371
|
LET ARG = ARG * -1
|
|
337
372
|
LET PRED = EXP ARG
|
|
338
373
|
LET PRED = PRED * R1
|
|
339
|
-
LET PRED = PRED + R3
|
|
340
|
-
LET R46 = PRED - OBS // residual
|
|
341
|
-
LET R46 = R46 * R46
|
|
342
|
-
LET SSR = SSR + R46
|
|
343
374
|
```
|
|
344
375
|
|
|
345
|
-
|
|
376
|
+
**Logistic S-curve:** `y = R1 / (1 + exp(-R2 * (x - R3)))`
|
|
377
|
+
```chaprola
|
|
378
|
+
LET ARG = X - R3
|
|
379
|
+
LET ARG = ARG * R2
|
|
380
|
+
LET ARG = ARG * -1
|
|
381
|
+
LET DENOM = EXP ARG
|
|
382
|
+
LET DENOM = DENOM + 1
|
|
383
|
+
LET PRED = R1 / DENOM
|
|
384
|
+
```
|
|
385
|
+
|
|
386
|
+
**Logarithmic:** `y = R1 * ln(x) + R2`
|
|
387
|
+
```chaprola
|
|
388
|
+
LET PRED = LOG X
|
|
389
|
+
LET PRED = PRED * R1
|
|
390
|
+
LET PRED = PRED + R2
|
|
391
|
+
```
|
|
392
|
+
|
|
393
|
+
All patterns follow the same loop structure: SEEK records, GET fields, compute PRED, accumulate `(PRED - OBS)^2` in SSR, store SSR in R21 at the end.
|
|
346
394
|
|
|
347
395
|
### Agent Workflow Summary
|
|
348
396
|
|