{"uid":"cap_-3tYqVmFciR5OgQKK_pxA","slug":"dns-mx-priority-sort-26b35bad","name":"DNS MX Priority Sort","description":"DNS MX Priority Sort: DNS MX Priority Sort sorts MX exchanges by preference while preserving equal-priority order from bounded caller-supplied values without an external provider. Call DNS MX Priority Sort before accepting, caching, redirecting, or retrying a caller-supplied web response. Returns normalized web evidence, the computed finding, and an explicit pass or advisory status for DNS MX Priority Sort as versioned deterministic JSON. Price: $0.001 USDC via x402 on Base. First-party, statel…","url":"https://api.delx.ai/api/v1/x402/dns-mx-priority-sort?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"records":{"type":"array","items":{"type":"object","maxProperties":128,"additionalProperties":true},"maxItems":256,"description":"Records supplied to DNS MX Priority Sort; used only for this bounded calculation and processed in memory without retention."}}},"responseSchema":{"type":"json","example":{"result":{"count":2,"records":[{"exchange":"mx1.example.com","priority":10},{"exchange":"mx2.example.com","priority":20}]},"schema":"delx/util-dns-mx-priority-sort/v1","status":"pass","evidence":{"retained":false,"input_sha256":"8b3539e1e41d77579f810b455d097216ad210c5fa90b58563e75aef928e5684a","external_calls":0},"operation":"web_reliability:dns_mx_priority_sort"}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.001","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.001/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_ctjSveBFRxVmJ1qULUwgW","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.001","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Sorts a list of DNS MX (mail exchange) records by preference value, preserving original order for equal-priority entries, and returns a deterministic pass/advisory verdict.","exampleAgentPrompt":"Sort these MX records by their preference values and tell me the correct priority order, preserving the original ordering for any records that share the same priority: [{\"exchange\":\"mail1.example.com\",\"priority\":10},{\"exchange\":\"mail2.example.com\",\"priority\":20},{\"exchange\":\"mail3.example.com\",\"priority\":10}].","exampleUseCases":[{"title":"Email delivery failover ordering","prompt":"I have these MX records from a DNS lookup and need to know which mail server to try first, second, and third for delivery — can you sort them by priority and tell me the correct order? Records: [{\"exchange\":\"mx1.domain.com\",\"priority\":20},{\"exchange\":\"mx2.domain.com\",\"priority\":10},{\"exchange\":\"mx3.domain.com\",\"priority\":20}]"},{"title":"Validating MX config before caching","prompt":"Before I cache this MX record list, I want to confirm the priority ordering is correct and get a pass or advisory status on it — here are the records: [{\"exchange\":\"primary.mail.com\",\"priority\":5},{\"exchange\":\"backup.mail.com\",\"priority\":10},{\"exchange\":\"tertiary.mail.com\",\"priority\":5}]"},{"title":"Mail routing pre-check for SMTP agent","prompt":"My SMTP agent is about to attempt delivery and I need the MX records sorted by preference so it contacts the right server first — can you sort and rank these: [{\"exchange\":\"smtp-a.example.org\",\"priority\":30},{\"exchange\":\"smtp-b.example.org\",\"priority\":10},{\"exchange\":\"smtp-c.example.org\",\"priority\":20}]"}],"resultDescription":"Returns a deterministic versioned JSON object containing: the normalized and sorted MX records ordered by ascending preference value (with stable ordering preserved for equal-priority entries), the computed priority ranking, and an explicit pass or advisory status indicating whether the input was well-formed and sortable.","failureModes":["Malformed record objects missing priority or exchange fields may result in advisory status or sorting errors","Arrays exceeding 256 items will be rejected per schema constraints","Objects with more than 128 properties per record will be rejected","Non-numeric or missing preference values may cause undefined sort behavior or advisory verdict","Empty input array returns a trivially sorted result with pass status"],"whenToPreferThis":"Use this endpoint when you need a deterministic, stateless, server-side sort of DNS MX records by preference value — especially when you need a stable sort that preserves equal-priority entry order from caller-supplied data. Prefer this over client-side sorting when you need a versioned, auditable result with an explicit pass/advisory status for compliance or caching decisions. It requires no external DNS provider and operates entirely on the supplied records.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-20T00:54:08.970Z","isFirstParty":false,"canonicalSlug":"dns-mx-priority-sort-26b35bad"}