Skip to main content
Glama

ScorpTech x402 Tools

Text Clean

text_clean
Read-onlyIdempotent

Clean and normalise messy text before embedding, indexing or prompting: repairs mojibake (UTF-8 read as Windows-1252), strips control and invisible characters (zero-width, bidi overrides used in Trojan Source attacks, soft hyphens, BOM), normalises exotic whitespace, curly quotes, dashes, ligatures and full-width forms, re-joins words hyphenated across line breaks, optionally unwraps hard-wrapped lines, strips HTML, decodes entities, removes emoji / URLs / emails, transliterates to ASCII or lowercases. Reports how many fixes of each kind were made. Offline; 500 KB. Price: $0.001 USDC per successful call (x402, Solana). Same tool over HTTPS: POST https://scorptech.it.com/api/x402/v1/text-clean

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "text": "<text>"
    },
    "name": "text_clean"
  }
}

Input Schema

NameRequiredDescriptionDefault
textYesText to clean
asciiNoTransliterate Latin accents to ASCII (é -> e)
fullwidthNoFull-width ASCII forms to ASCII
ligaturesNoExpand fi fl ff ffi ffl ſt st
lowercaseNoLowercase everything
stripHtmlNoRemove HTML tags (script/style content dropped)
removeUrlsNoRemove http(s) URLs
dehyphenateNoJoin words hyphenated across line breaks (infor-\nmation)
fixMojibakeNoRepair UTF-8 decoded as Windows-1252 (Café -> Café, ’ -> ’)
removeEmojiNoRemove emoji and pictographs
unwrapLinesNoJoin hard-wrapped lines inside paragraphs
removeEmailsNoRemove email addresses
stripControlNoRemove C0/C1 control characters (keeps tab / newline)
decodeEntitiesNoDecode HTML entities (&amp; -> &)
stripInvisibleNoRemove zero-width, bidi override (Trojan Source), soft hyphen and BOM characters
normalizeDashesNoEn / em / figure dashes and minus sign to "-"
normalizeQuotesNoCurly quotes / primes to ASCII quotes and … to ...
normalizeWhitespaceNoTabs and exotic spaces to plain spaces, collapse runs, trim lines, max one blank line

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.4/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Adds substantial information beyond the annotations: it is offline (no network dependency), caps input at 500 KB, costs $0.001 USDC per successful call via x402 on Solana, is also exposed over HTTPS at a named endpoint, and — importantly for a tool with no output schema — reports how many fixes of each kind were made. The only tension is the annotation openWorldHint=true against the description's 'Offline', which is a minor metadata mismatch rather than a functional contradiction since the operation itself is local and read-only.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with purpose and the use case, then the defect list, then operational facts (size, price, endpoint). It is dense and reads as a long run-on enumeration, but nearly every clause maps to a real capability and none is filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For an 18-parameter tool with no output schema, the description covers what matters: input limit, offline execution, cost and payment mechanism, an alternate transport, and a statement that the result includes per-category fix counts. An agent has enough to decide whether to call it and what to expect back.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so every one of the 18 flags already carries its own explanation and default; the description mostly restates that set. It does add slight framing by marking some behaviours as opt-in ('optionally unwraps', 'removes emoji / URLs / emails'), but it does not explain ordering, interactions (e.g. stripHtml + decodeEntities, or dehyphenate + unwrapLines), or what the defaults do if no flags are supplied.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb+resource ('Clean and normalise messy text') and immediately enumerates the classes of defects it repairs (mojibake, control/invisible chars, exotic whitespace, quotes, dashes, ligatures, hard wraps). The list of transformations plus the pre-processing use case ('before embedding, indexing or prompting') clearly separates it from neighbours like text_block, text_stats, html_sanitize, and web_to_text, which each do only one slice of this.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives a concrete usage context — run it ahead of embedding, indexing or prompting — which tells the agent where in a pipeline this belongs. It does not name alternatives or exclusions (e.g. 'use html_sanitize if you only need tag stripping', or 'do not use on code/program source where bidi stripping may alter logic'), so the agent must infer when another sibling is the better pick.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources