{"uid":"cap_-M4lPR7mCrcmfBPaGcGVY","slug":"agent402-tools-word-wrap-f251985a","name":"agent402.tools Word Wrap","description":"Wrap text to a specified column width, breaking at word boundaries. Words longer than the width are forcibly broken. An optional indent string is prepended to each line. Deterministic, pure CPU.","url":"https://agent402.tools/api/word-wrap","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"text":{"type":"string","description":"The text to wrap"},"width":{"type":"integer","description":"Maximum line width in characters (default 80, max 500)"},"indent":{"type":"string","description":"String to prepend to each line (default \"\")"}}},"responseSchema":{"type":"json","example":{"lines":3,"result":"The quick brown fox\njumps over the lazy\ndog.","longestLine":19}},"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_EXjaQRJ9rwh_Wjba1rwMU","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":"Wraps text to a specified column width by breaking at word boundaries, with optional per-line indentation","exampleAgentPrompt":"Can you word-wrap this paragraph so each line is at most 60 characters wide, and prepend four spaces of indentation to every line: \"The quick brown fox jumps over the lazy dog and then runs away into the forest where it disappears forever.\"","exampleUseCases":null,"resultDescription":"Returns the input text reformatted with line breaks inserted at word boundaries so no line exceeds the specified width; words longer than the width are forcibly split. Each line is prefixed with the optional indent string. The result is a plain string ready for display in fixed-width contexts.","failureModes":["Width exceeding maximum of 500 returns an error","Non-integer width value causes a validation error","Empty text input may return an empty string","Payment failure (x402) prevents processing and returns a 402 response","Extremely long single tokens are forcibly broken which may produce unexpected splits"],"whenToPreferThis":"Choose this endpoint when you need a deterministic, pure-CPU text wrapping operation with precise column-width control and optional per-line indentation — especially when you want consistent, repeatable results without any AI or ML inference. Ideal for formatting terminal output, emails, code comments, or any fixed-width display context.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T19:14:03.983Z","isFirstParty":false}