{"uid":"cap_Q_Tv1se8kQ4QdJQkMPgdV","slug":"writerslogic-metric-comparability-checker-4d796bc9","name":"WritersLogic Metric Comparability Checker","description":"Pay-per-call agents settled in USDC on Base via x402. Every response carries a signed provenance envelope.","url":"https://agents.writerslogic.com/api/v1/metric-comparability?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"a":{"type":"object","required":["name"],"properties":{"name":{"type":"string","maxLength":120},"unit":{"type":"string","maxLength":60},"period":{"type":"object","properties":{"end":{"type":"string","maxLength":40},"start":{"type":"string","maxLength":40},"calendar":{"enum":["calendar","fiscal","iso-week","us-week","rolling"],"type":"string"},"timezone":{"type":"string","maxLength":60},"windowDays":{"type":"integer","maximum":3660,"minimum":1},"granularity":{"enum":["hour","day","week","month","quarter","year","rolling"],"type":"string"}},"additionalProperties":false},"filters":{"type":"array","items":{"type":"string","maxLength":200},"maxItems":30,"description":"Inclusion filters."},"currency":{"type":"object","properties":{"code":{"type":"string","maxLength":3,"minLength":3,"description":"ISO 4217 alphabetic code."},"fxBasis":{"enum":["none","transaction-date","period-average","period-end","fixed-rate"],"type":"string"},"taxBasis":{"enum":["gross","net","unspecified"],"type":"string"}},"additionalProperties":false},"numerator":{"type":"string","maxLength":300,"description":"What is counted or summed, in words or SQL-free prose."},"weighting":{"enum":["none","equal","volume","revenue","custom"],"type":"string"},"exclusions":{"type":"array","items":{"type":"string","maxLength":200},"maxItems":30,"description":"Excluded records (test accounts, refunds, internal traffic)."},"population":{"type":"string","maxLength":300,"description":"Who or what is measured (all users, paying accounts, active devices)."},"aggregation":{"enum":["sum","count","distinct-count","mean","median","max","min","percentile","ratio-of-sums","mean-of-ratios"],"type":"string"},"denominator":{"type":"string","maxLength":300,"description":"The base of a ratio; omit for counts and sums."},"definitionVersion":{"type":"string","maxLength":60}},"additionalProperties":false},"b":{"type":"object","required":["name"],"properties":{"name":{"type":"string","maxLength":120},"unit":{"type":"string","maxLength":60},"period":{"type":"object","properties":{"end":{"type":"string","maxLength":40},"start":{"type":"string","maxLength":40},"calendar":{"enum":["calendar","fiscal","iso-week","us-week","rolling"],"type":"string"},"timezone":{"type":"string","maxLength":60},"windowDays":{"type":"integer","maximum":3660,"minimum":1},"granularity":{"enum":["hour","day","week","month","quarter","year","rolling"],"type":"string"}},"additionalProperties":false},"filters":{"type":"array","items":{"type":"string","maxLength":200},"maxItems":30,"description":"Inclusion filters."},"currency":{"type":"object","properties":{"code":{"type":"string","maxLength":3,"minLength":3,"description":"ISO 4217 alphabetic code."},"fxBasis":{"enum":["none","transaction-date","period-average","period-end","fixed-rate"],"type":"string"},"taxBasis":{"enum":["gross","net","unspecified"],"type":"string"}},"additionalProperties":false},"numerator":{"type":"string","maxLength":300,"description":"What is counted or summed, in words or SQL-free prose."},"weighting":{"enum":["none","equal","volume","revenue","custom"],"type":"string"},"exclusions":{"type":"array","items":{"type":"string","maxLength":200},"maxItems":30,"description":"Excluded records (test accounts, refunds, internal traffic)."},"population":{"type":"string","maxLength":300,"description":"Who or what is measured (all users, paying accounts, active devices)."},"aggregation":{"enum":["sum","count","distinct-count","mean","median","max","min","percentile","ratio-of-sums","mean-of-ratios"],"type":"string"},"denominator":{"type":"string","maxLength":300,"description":"The base of a ratio; omit for counts and sums."},"definitionVersion":{"type":"string","maxLength":60}},"additionalProperties":false},"mode":{"enum":["compare","drift"],"type":"string","description":"drift: a is the previous definition and b the current one under the same name."}}},"responseSchema":{"type":"json"},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.005","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.005/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_M5-i4l_Fa5QbNVSbf9ih5","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.005","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Compares two structured metric definitions field by field and identifies incompatibilities, adjustable differences, and missing fields between them","exampleAgentPrompt":"Before I put these two dashboards side by side, compare their revenue metric definitions: Metric A is a sum of gross transaction amounts, denominator none, monthly calendar granularity, USD with period-average FX, net tax basis, filtered to paying accounts — and Metric B is a sum of net transaction amounts, monthly rolling granularity, USD with transaction-date FX, gross tax basis, filtered to all accounts. Tell me which differences make the numbers not comparable.","exampleUseCases":[{"title":"Dashboard side-by-side compatibility check","prompt":"I'm about to put two regional sales dashboards next to each other in a report. Metric A counts distinct paying customers monthly by calendar month in UTC, filtered to non-trial accounts. Metric B counts distinct active users monthly by fiscal month in US-Eastern, no trial filter. Can you compare these definitions and tell me which differences make them incompatible and which I could adjust with raw data?"},{"title":"Experiment metric comparability audit","prompt":"We're running an A/B test and I need to know if the two experiment metrics are actually comparable before we call a winner. Metric A is mean order value over a 14-day rolling window, equal weighting, USD transaction-date FX, excluding refunds. Metric B is mean order value over a calendar month, volume weighting, USD period-average FX, no exclusions. What differences make these not directly comparable?"},{"title":"Metric definition drift detection","prompt":"Our 'Monthly Active Users' metric was redefined last quarter — the old definition counted any login event, monthly calendar granularity, all users population. The new definition counts users who completed at least one transaction, monthly fiscal granularity, paying accounts only. Run a drift comparison and tell me what changed and whether the numbers are still comparable."}],"resultDescription":"Returns a structured report categorizing field-by-field differences between the two metric definitions into: (1) incompatible differences that make the numbers not directly comparable, (2) differences that are adjustable given access to raw data, and (3) fields present in one definition but missing from the other. In drift mode, also flags definition-drift when the metric name is unchanged but the definition has changed.","failureModes":["Missing required 'name' field on either metric definition returns a validation error","Truncated or malformed JSON input causes a 400 bad request","Fields exceeding character limits (e.g. numerator > 300 chars) are rejected","Cannot determine semantic equivalence of differently worded but logically identical definitions","Does not read actual data, so cannot validate whether definitions produce equivalent numbers in practice","Currency code not in ISO 4217 3-letter format causes rejection"],"whenToPreferThis":"Use this endpoint when an AI agent needs to programmatically assess whether two metric definitions are structurally comparable before combining, comparing, or reporting them together — especially in multi-dashboard, multi-team, or experiment contexts. Prefer this over manual review when definitions have many fields (filters, exclusions, FX basis, population) where subtle mismatches cause silent data errors. Also use in CI/CD pipelines for metric governance to detect definition drift when a metric name is reused with an altered definition.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-11-19T06:38:28.910Z","isFirstParty":false,"canonicalSlug":"writerslogic-metric-comparability-checker-4d796bc9"}