Skip to main content
Glama

Score drift from the canonical metrics

score_drift
Read-onlyIdempotent

Score how far your metrics drift from GASP canonical definitions by running both on the same synthetic SaaS dataset, with per-period differences and likely causes.

Instructions

Score how far your own metrics drift from the GASP Standard's canonical definitions, by result. Takes your mapping (a GASP adapter or an Ossie mapping, as validate_mapping does) and your semantic_model holding your metrics. Each metric is matched to a GASP metric by exact name, by the synonyms in its ai_context or by a pair you pass in matches; a name or synonym ending in -O or -M (NRR-O, cac_m) matches that declared form; near names are listed for review and never scored on a guess. For every match the canonical metric is compiled into your dataset and field names (as compile_model does) and both run on the GASP synthetic SaaS dataset, six monthly periods, in an in-process Postgres (PGlite). Where the numbers differ the report gives both values per period, the largest difference and the likely cause read from the canonical formula: a null on one side (a sum over no rows that is NULL in your SQL and 0 in GASP's, or a canonical average or ratio with nothing to read), a construct one expression cannot state (a cohort, an opening value at period start, a period bound to a business date), a filter one side applies and the other does not, a dataset one side reads or an aggregate whose value has no equal on the other side. Metrics that read fields your mapping lacks are reported as not runnable with the field named. Your values are also checked against the standard's range for the metric (NRR at least 0, GRR at most 100%) per period. Where both the O and M forms of a dual-lens metric are matched the report scores the bridge between them (the Durability Gap for ARR, the Expansion Integrity Gap for NRR, the Activation Delta for CAC, the Contribution Leakage for LTV, the Services Drag for Gross Margin): your M minus O beside the canonical gap, per period.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "adapter": "<adapter>",
      "semantic_model": "<semantic_model>"
    },
    "name": "score_drift"
  }
}

Input Schema

NameRequiredDescriptionDefault
outputNo'report' (default) is the markdown report; 'json' returns the matches, the per-period values and the causes as data.
adapterYesYour mapping as text: a GASP adapter (JSON) or an Ossie mapping document (YAML or JSON). Check it with validate_mapping first.
matchesNoExplicit pairs for metrics the names do not settle, comma separated: "acme_nrr=NRR, lost_mrr=Churned MRR". The GASP side is a name, abbreviation, alias or formula id as lookup_metric resolves it, with an optional :O, :M or :variant.
metricsNoComma-separated names of your metrics to score. Omit for every metric in the document.
semantic_modelYesYour metrics: your Ossie semantic model document (YAML or JSON); with a GASP adapter as the mapping, any document with a metrics list will do. Each metric with a name and an OSSIE_SQL_2026 expression over your datasets and fields. With a GASP adapter, write them over the dataset names and columns of the model validate_mapping synthesises (the GASP dataset ids and your column names).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.5/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnly, idempotent, non-destructive and closed-world, yet the description still adds substantial behavior: both sides run over a synthetic SaaS dataset across six monthly periods in an in-process PGlite Postgres, unmatched fields are reported as not runnable by name, and values are range-checked per period. It further enumerates the cause taxonomy (nulls, constructs a single expression cannot state, filter differences, unmatched aggregates) and the dual-lens bridge metrics, which no annotation conveys.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The purpose is front-loaded and nearly every clause carries information, but the body is a single very dense paragraph with long parenthetical asides that slow scanning. Splitting inputs, matching rules, execution and report contents into separate lines would preserve the content at much lower reading cost.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a five-parameter analytical tool with no output schema, the description covers inputs, matching precedence, execution environment, failure reporting, range checks and the shape of both output modes. An agent has enough to call this correctly and to interpret what comes back without further documentation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3, but the description adds real meaning beyond the schema: the -O/-M suffix convention on names and synonyms, synonym matching via ai_context, the ':O', ':M' or ':variant' suffix on match targets, and what omitting metrics does. The match grammar and the adapter-versus-semantic-model relationship are consequences the schema alone does not spell out.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The first sentence states a specific verb and resource — scoring drift of the user's metrics against the GASP Standard's canonical definitions — and frames the output as a comparison. It is clearly distinct from siblings like validate_mapping and compile_model, which are named as separate steps rather than variants of this operation.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description establishes prerequisites clearly: run validate_mapping first to check the mapping, and supply a semantic model structured the way validate_mapping synthesises it. It explains that matches exist for cases names cannot settle and that near names are only listed, never guessed. It does not state when to prefer this over adjacent diagnostics such as coverage_gap or readiness_report, so an explicit exclusion is missing.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.