Skip to main content
Glama

HTML a texto plano

html-to-text
Read-onlyIdempotent

Convierte HTML en texto plano legible: quita scripts y estilos, convierte bloques en saltos de línea y decodifica entidades. Cuándo: hay que leer, construir o revisar con exactitud una URL, una cabecera HTTP, un token, una versión, un rango de IP, un documento HTML o Markdown o un archivo para agentes. No para: eliminar la sintaxis Markdown (markdown-to-text). Efectos secundarios: ninguno (solo lectura, sin red, sin estado guardado). Determinista: la misma entrada da la misma salida. Límites: entrada JSON de hasta 64 KB, 1 s por llamada, resultado de hasta 1 MB.

EN: Converts HTML to readable plain text by string processing: drops script/style/comments, turns block elements into line breaks and list items into "- ", decodes entities, optionally keeps link URLs. Not a full HTML parser. When: a URL, HTTP header, token, version string, IP range, HTML or Markdown document or agent-readiness file has to be parsed, built or checked exactly. [EN completo / full EN: inputSchema.description]

Input Schema

NameRequiredDescriptionDefault
htmlYesHTML (string; required).
keep_linksNoAppend link URLs in parentheses (boolean; optional; default false).

Output Schema

NameRequiredDescriptionDefault
textNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / html / examples
      Added value: +[
      +  "<h1>Hola</h1><p>Uno &amp; <b>dos</b></p><script>x()</script><ul><li>a</li><li>b</li></ul>"
      +]
  2. Changed1 schema field changed
    • addedInput schema / description
      Added value: +"EN: Converts HTML to readable plain text by string processing: drops script/style/comments, turns block elements into line breaks and list items into \"- \", decodes entities, optionally keeps link URLs. Not a full HTML parser. When: a URL, HTTP header, token, version string, IP range, HTML or Markdown document or agent-readiness file has to be parsed, built or checked exactly. Not for: stripping Markdown syntax (markdown-to-text). Side effects: none (read-only, no network access, no stored state). Deterministic: the same input gives the same output. Limits: JSON input up to 64 KB, 1 s per call, result up to 1 MB."
  3. First observed

TDQS

A4.5/5.0
Behavior5/5

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

Beyond the annotations, it discloses the processing model (string processing, not a full HTML parser), the exact transformations applied, side effects (no network, no stored state), determinism, and hard limits (64 KB input, 1 s per call, 1 MB output). The 'not a full HTML parser' caveat is behaviorally decisive and appears nowhere in the structured fields.

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

Conciseness3/5

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

The core behavior and limits are front-loaded and earn their place, but the entry is padded with a generic 'when' list of unrelated artifacts, a duplicated full English block, and a meta-pointer ('[EN completo / full EN: inputSchema.description]') that is navigation clutter rather than tool information. Bilingual duplication roughly doubles the length for the same content.

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?

With an output schema present, return values need no explanation; what remains — input constraints, size/time limits, determinism, no-network/no-state guarantees, and the non-parser caveat — is fully covered. An agent has everything needed to call this correctly and predict the output shape.

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

Parameters4/5

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

Schema coverage is 100% and both parameters carry their own descriptions, so the baseline is 3. The description adds the semantic effect of the optional flag — it 'optionally keeps link URLs' — matching keep_links and its default-false behavior, giving a small but real increment over the schema.

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?

The opening sentence gives a specific verb and resource (converts HTML to readable plain text) and immediately enumerates the actual mechanics: drops script/style/comments, block elements become line breaks, list items become "- ", entities decoded. It also states a key boundary — 'Not a full HTML parser' — which lets an agent distinguish it from real parsers in the sibling set.

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?

There is an explicit exclusion with a named alternative: 'No para: eliminar la sintaxis Markdown (markdown-to-text)', which cleanly separates it from markdown-to-text, html-to-markdown and html-escape. However, the 'Cuándo:' clause lists URLs, HTTP headers, tokens, IP ranges and agent-readiness files, which reads like a shared family template rather than guidance specific to HTML conversion, so the positive usage signal is weaker than the negative one.

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