gasp-standard-mcp 1.4.0 → 1.6.0
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 +8 -3
- package/build/index.js +52 -0
- package/build/loader.js +2 -0
- package/build/standard-data.json +1 -1
- package/build/standard-version.json +1 -1
- package/build/types.d.ts +20 -0
- package/package.json +5 -3
package/README.md
CHANGED
|
@@ -45,12 +45,15 @@ Restart your MCP client after adding the config.
|
|
|
45
45
|
## Data
|
|
46
46
|
|
|
47
47
|
- 300 metrics across 13 departments
|
|
48
|
-
-
|
|
49
|
-
- 76 relationship nodes (60 metrics + 11 entities + 5 concepts),
|
|
48
|
+
- 92 glossary definitions (80 SaaS domain + 12 GASP framework)
|
|
49
|
+
- 76 relationship nodes (60 metrics + 11 entities + 5 concepts), 157 edges
|
|
50
50
|
- 15 entity-to-entity business model edges (OWNS, GRANTS, CONVERTS_TO, GENERATES, etc.)
|
|
51
51
|
- 78 data requirements with field types, grain, and example SQL
|
|
52
|
-
- 11 business entities, 5 business concepts, 22 source categories,
|
|
52
|
+
- 11 business entities, 5 business concepts, 22 source categories, 198 canonical fields
|
|
53
|
+
- 60 structured formulas with decomposed inputs (metric refs + field refs)
|
|
53
54
|
- 60 temporal mappings (grain, frequency, period for every metric node)
|
|
55
|
+
- Access control classifications for every graph metric (sensitivity tier + access scope)
|
|
56
|
+
- CEL `change_nature` field for revenue quality analysis (Adjusted NRR/GRR)
|
|
54
57
|
- Sources: the canonical [GASP Standard](https://gaspwiki.com) files
|
|
55
58
|
|
|
56
59
|
## Examples
|
|
@@ -61,6 +64,8 @@ Once installed, ask your AI assistant:
|
|
|
61
64
|
- "How do I calculate CAC Payback?"
|
|
62
65
|
- "What drives ARR?"
|
|
63
66
|
- "How does Customer relate to Subscription?"
|
|
67
|
+
- "What sensitivity tier is CAC classified as?"
|
|
68
|
+
- "What does confidential mean in GASP?"
|
|
64
69
|
- "List all marketing metrics"
|
|
65
70
|
- "What data do I need to implement ARR tracking?"
|
|
66
71
|
- "Search for churn"
|
package/build/index.js
CHANGED
|
@@ -148,6 +148,29 @@ server.tool("lookup_metric", "Look up a GASP Standard metric by name or abbrevia
|
|
|
148
148
|
if (metric.dualLensNote) {
|
|
149
149
|
parts.push(`\n## Dual-Lens Note\n\n${metric.dualLensNote}`);
|
|
150
150
|
}
|
|
151
|
+
// Adjusted variant from structured formulas (e.g. NRR, GRR)
|
|
152
|
+
const sfMap = data.ontology?.structuredFormulas;
|
|
153
|
+
if (sfMap) {
|
|
154
|
+
const nodeId = metric.slug.replace(/-/g, '_');
|
|
155
|
+
const sf = sfMap[nodeId]
|
|
156
|
+
|| Object.entries(sfMap).find(([k]) => k !== 'description' && nodeId.startsWith(k + '_'))?.[1];
|
|
157
|
+
if (sf && typeof sf === 'object' && 'adjustedVariant' in sf) {
|
|
158
|
+
parts.push(`\n## Adjusted Variant\n\n${sf.adjustedVariant}`);
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
// Access control classification (if available)
|
|
162
|
+
const acMap = data.ontology?.accessControl?.classifications;
|
|
163
|
+
if (acMap) {
|
|
164
|
+
const nodeId = metric.slug.replace(/-/g, '_');
|
|
165
|
+
const ac = acMap[nodeId]
|
|
166
|
+
|| Object.entries(acMap).find(([k]) => nodeId.startsWith(k + '_'))?.[1];
|
|
167
|
+
if (ac) {
|
|
168
|
+
parts.push(`\n## Recommended Access Control\n` +
|
|
169
|
+
`- **Sensitivity:** ${ac.sensitivityTier} (https://gaspwiki.com/v1/definitions/sensitivity-tier)\n` +
|
|
170
|
+
`- **Scope:** ${ac.accessScope} (https://gaspwiki.com/v1/definitions/access-scope)\n` +
|
|
171
|
+
`See https://gaspwiki.com/v1/governance for policy patterns (Cedar, OPA, warehouse RLS).`);
|
|
172
|
+
}
|
|
173
|
+
}
|
|
151
174
|
// Swap EOM → GASP branding
|
|
152
175
|
const text = parts.join("\n").replace(/\bEOM Standard\b/g, "GASP Standard");
|
|
153
176
|
return { content: [{ type: "text", text }] };
|
|
@@ -240,6 +263,35 @@ server.tool("get_formula", "Get the formula(s) for a GASP Standard metric. Retur
|
|
|
240
263
|
}
|
|
241
264
|
parts.push("```\n" + metric.formulas[i] + "\n```\n");
|
|
242
265
|
}
|
|
266
|
+
// Append structured formula references if available
|
|
267
|
+
const formulas = data.ontology?.structuredFormulas;
|
|
268
|
+
const nodeId = metric.slug.replace(/-/g, '_');
|
|
269
|
+
// Match: exact node ID, or slug starts with a formula key (e.g. "arr_annual_recurring_revenue" starts with "arr")
|
|
270
|
+
let structured = formulas?.[nodeId];
|
|
271
|
+
if (!structured && formulas) {
|
|
272
|
+
for (const [key, val] of Object.entries(formulas)) {
|
|
273
|
+
if (key !== 'description' && nodeId.startsWith(key + '_')) {
|
|
274
|
+
structured = val;
|
|
275
|
+
break;
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
if (structured) {
|
|
280
|
+
if (structured.inputs && structured.inputs.length > 0) {
|
|
281
|
+
parts.push("## Inputs (metric dependencies)");
|
|
282
|
+
for (const input of structured.inputs) {
|
|
283
|
+
const inputNode = data.nodes.find(n => n.id === input.ref);
|
|
284
|
+
const label = inputNode?.label || input.ref;
|
|
285
|
+
parts.push(`- **${label}** (${input.role})`);
|
|
286
|
+
}
|
|
287
|
+
parts.push("");
|
|
288
|
+
}
|
|
289
|
+
if (structured.fields && structured.fields.length > 0) {
|
|
290
|
+
parts.push("## Required fields");
|
|
291
|
+
parts.push(structured.fields.map(f => `\`${f}\``).join(", "));
|
|
292
|
+
parts.push("");
|
|
293
|
+
}
|
|
294
|
+
}
|
|
243
295
|
const text = parts.join("\n").replace(/\bEOM Standard\b/g, "GASP Standard");
|
|
244
296
|
return { content: [{ type: "text", text }] };
|
|
245
297
|
});
|
package/build/loader.js
CHANGED
|
@@ -117,6 +117,8 @@ export function loadStandard() {
|
|
|
117
117
|
entityMappings: ontRaw.entityMappings || {},
|
|
118
118
|
concepts: ontRaw.concepts || [],
|
|
119
119
|
entityRelationships: ontRaw.entityRelationships || undefined,
|
|
120
|
+
structuredFormulas: ontRaw.structuredFormulas || undefined,
|
|
121
|
+
accessControl: ontRaw.accessControl || undefined,
|
|
120
122
|
};
|
|
121
123
|
}
|
|
122
124
|
catch {
|