Whether two metric definitions measure the same thing, and which fields differ
Compares two structured metric definitions field by field (numerator, denominator, aggregation, weighting, population, filters, exclusions, period grain and calendar, timezone, currency, FX and tax basis, unit) and returns which differences make the numbers not comparable, which are adjustable with raw data, and which fields are missing from one side. In drift mode a is the old and b the new definition: a changed definition under an unchanged name is reported as definition-drift. For agents about to put two dashboards, reports or experiments side by side. It compares descriptions you supply after Unicode and punctuation normalization; it does not read data and cannot tell whether two differently worded definitions are equivalent.
What you get
Stops 'revenue' in one report being compared with 'revenue' in another. Instant, deterministic, $0.005.
Call it
Send the JSON body below to https://agents.writerslogic.com/api/v1/metric-comparability. An unpaid request answers 402 with the price and how to pay; a request that fails with a 5xx status is not charged.
curl -i -X POST https://agents.writerslogic.com/api/v1/metric-comparability \
-H 'content-type: application/json' \
-d '{"a":{"name":"conversion rate","numerator":"orders","denominator":"sessions","aggregation":"ratio-of-sums","exclusions":["internal traffic"],"period":{"granularity":"week","calendar":"iso-week","timezone":"UTC"}},"b":{"name":"Conversion Rate","numerator":"orders","denominator":"unique visitors","aggregation":"mean-of-ratios","exclusions":["internal traffic","bots"],"period":{"granularity":"week","calendar":"us-week","timezone":"America/New_York"}},"mode":"drift"}'
Input
| Field | Type | Required | Description |
|---|---|---|---|
a | object | yes | |
b | object | yes | |
mode | string; one of "compare", "drift" | no | drift: a is the previous definition and b the current one under the same name. |
Example request body
{
"a": {
"name": "conversion rate",
"numerator": "orders",
"denominator": "sessions",
"aggregation": "ratio-of-sums",
"exclusions": [
"internal traffic"
],
"period": {
"granularity": "week",
"calendar": "iso-week",
"timezone": "UTC"
}
},
"b": {
"name": "Conversion Rate",
"numerator": "orders",
"denominator": "unique visitors",
"aggregation": "mean-of-ratios",
"exclusions": [
"internal traffic",
"bots"
],
"period": {
"granularity": "week",
"calendar": "us-week",
"timezone": "America/New_York"
}
},
"mode": "drift"
}
Result
The response is { "data": ..., "_provenance": ... }. data carries these fields; _provenance is a signed W3C Verifiable Credential with a C2PA-style manifest, checked free at POST /api/v1/verify-provenance.
| Field | Type | Required | Description |
|---|---|---|---|
status | string; one of "pass", "fail", "unknown", "unsupported" | no | pass: every rule held. fail: a rule was violated (see witnesses). unknown: the input lacks the evidence to decide. unsupported: outside what this engine covers. Missing evidence is never a pass. |
verdict | string; one of "identical", "comparable-with-adjustment", "not-comparable", "incomplete" | no | |
nameMatch | boolean | no | |
drift | boolean | no | Same name (after normalization) but at least one blocking or adjustable difference. |
differences | array<object> | no | |
comparedFields | integer | no | |
skippedFields | one of | no | |
witnesses | array<object> | no | |
versions | object | no | Every semantic dependency of this answer (engine, tables and their as-of dates, tokenizer, calendar, rounding profile). |
limits | array<string> | no | |
deterministic | boolean | no | Always true: pure code, no model. |
Pay and connect
Available through: x402 (USDC on Base), MCP. MCP clients reach it through the data-contract-kit package.
Machine-readable
- This agent as JSON (schemas, example, OpenAPI operation)
- Free signed sample response
- OpenAPI 3.1 · Catalog · Index of every agent