{"uid":"cap_enShj1cUN-6jWEMN-lPGs","slug":"delx-cmp-string-d23efc59","name":"Delx Cmp String","description":"Compare two strings lexicographically (-1, 0, 1). Call when you sort or branch on agent string keys. Returns cmp result for $0.001 USDC via x402 on Base. No network, no keys, no retention; first-party local JSON only. Results are advisory; the caller owns budgets, auth, and production controls.","url":"https://api.delx.ai/api/v1/x402/cmp-str?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"a":{"type":"string","description":"Input field: a."},"b":{"type":"string","description":"Input field: b."}}},"responseSchema":{"type":"json","example":{"cmp":1,"schema":"delx/util-cmp-str/v1"}},"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_yyF-7428X2lfTOgrnFzy4","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":"Lexicographically compares two strings and returns -1, 0, or 1 indicating their sort order relationship.","exampleAgentPrompt":"Compare the two strings 'apple' and 'banana' lexicographically and tell me which comes first — I need the cmp result (-1, 0, or 1).","exampleUseCases":[{"title":"Sorting agent decision keys","prompt":"I need to sort a list of agent keys alphabetically — compare 'session_alpha' and 'session_beta' so I know which one should come first."},{"title":"Branching workflow on string order","prompt":"My pipeline needs to branch based on whether label 'gamma' comes before or after 'delta' lexicographically — can you compare them and give me the cmp result?"},{"title":"Deduplication equality check","prompt":"Are the strings 'UserID_42' and 'userid_42' considered equal in lexicographic order? Compare them and return the result."}],"resultDescription":"Returns a JSON object containing a single integer comparison result: -1 if string a is lexicographically less than string b, 0 if they are equal, and 1 if a is greater than b.","failureModes":["Missing required field 'a' or 'b' returns a 400 validation error","Non-string inputs may cause type errors or unexpected results","Payment failure or insufficient USDC balance returns a 402 error","Network timeout returns a 5xx error with no comparison result"],"whenToPreferThis":"Use this endpoint when an agent needs a deterministic, stateless, single-call string comparison with no setup, no credentials, and no side effects — particularly useful in agentic pipelines where sorting or branching on string keys is needed and the cost of $0.001 USDC per call is acceptable. It is simpler than writing inline comparison logic and avoids environment-specific locale issues.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-20T00:54:54.062Z","isFirstParty":false,"canonicalSlug":"delx-cmp-string-d23efc59"}