Content cleaner
Clean and deduplicate text - redact PII, remove duplicate lines, and sort in one pass.
3 tools run server-side in one request. You pay once, settle once, and get a single response - no orchestration, no per-step payments, and a partial-success envelope if any step fails. USDC over x402 on any supported chain.
When to use this pack
An agent processing raw text (log files, user submissions, scraped content) needs to clean it before storage or analysis: redact emails and phone numbers, remove duplicate lines, and sort for consistency. Three cleanup operations in one payment.
Tools in this pack
All 3 run inside the single $0.050 call above. Each is also callable on its own if you only need one part.
- Redact PII POST /api/redact Mask emails, phone numbers, credit-card-like numbers, IPs, and SSNs in text. Returns the redacted text and counts by type.
- Dedupe lines POST /api/dedupe-lines Remove duplicate lines, preserving first-seen order. Returns the deduped text and how many were removed.
- Sort lines POST /api/sort-lines Sort the lines of a text. order: asc (default) | desc | numeric. unique:true removes duplicates; ci:true is case-insensitive.
Workflow
- Call redact with patterns=['email','phone'] to mask PII in the text.
- Call dedupe-lines to remove duplicate lines from the text.
- Call sort-lines to alphabetically sort the remaining lines.
Call it directly
Any x402 client pays the 402 and gets the whole workflow back in one response:
npx agent402-client call content-clean {"text":"line b\\nline a\\nline b\\nemail: test@test.com"}
Run it in Claude
claude mcp add agent402 -s user -- npx -y agent402-mcp@latest
Then paste this prompt into Claude:
Clean this text using Agent402's content-clean skill pack: 'line b\nline a\nline b\nemail: test@test.com'. (1) Redact emails and phone numbers, (2) remove duplicate lines, (3) sort alphabetically. Return the cleaned result.