{"uid":"cap_6WvWj-6k4kybkyfmWpF5k","slug":"agentshelf-lines-sort-by-length-6dc8e837","name":"AgentShelf Lines Sort by Length","description":"Call when an agent needs lines of text transformed with sort-length. No network. Exact $0.007 USDC. Prefer unpaid POST /v1/sandbox/lines-sort-length first.","url":"https://agentshelf.syntexa.ch/v1/lines-sort-length?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"text":{"type":"string","examples":["b\na\n"],"maxLength":100000,"minLength":1,"description":"Input for this SKU. The route description says whether it is plain text, a URL, base64 bytes, or an already-encoded token."}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.007","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.007/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.007","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.007","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_AlRnSQL5ZsDORo8vcO192","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.007","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Sorts lines of text by their character length, from shortest to longest (or longest to shortest), with no network or LLM dependency.","exampleAgentPrompt":"Can you sort these lines by length so the shortest ones come first? Here's the text: 'Elephant\\nCat\\nRhinoceros\\nDog\\nHippopotamus'","exampleUseCases":[{"title":"Ranking log entries by verbosity","prompt":"I have a list of log messages and I want them reordered from shortest to longest so I can quickly spot the terse ones — can you sort these lines by length for me?"},{"title":"Organizing a word list by character count","prompt":"Take this word list and sort every line by how many characters it has, shortest first: 'banana\\napple\\nkiwi\\nstrawberry\\nfig'"},{"title":"Formatting CSV labels by line length","prompt":"I've got a bunch of product label strings, one per line, and I need them arranged from longest to shortest so I can see which ones might overflow my layout — please sort them by line length."}],"resultDescription":"The input text with all lines reordered by their character length. Lines are returned as a sorted text block, typically ascending (shortest to longest) based on character count per line.","failureModes":["Empty or missing 'text' field returns a validation error","Text exceeding 100,000 characters is rejected","Payment of exactly $0.007 USDC required; incorrect payment causes 402 response","Malformed JSON body causes a parse error"],"whenToPreferThis":"Use this endpoint when you need a deterministic, fast, offline sort of text lines by character length without relying on an LLM or external network call. It is ideal for preprocessing text data, formatting lists, or pipeline steps that require line-length ordering as part of a larger workflow. Prefer the free sandbox endpoint (/v1/sandbox/lines-sort-length) for testing before committing to the paid call.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-02T06:50:21.761Z","isFirstParty":false,"canonicalSlug":"agentshelf-lines-sort-by-length-6dc8e837"}