Skip to main content
Glama

diogenes-web-scraping-engine-mcp

Edge HTML Sanitizer, Script Stripper & XSS Neutralizer

sanitize_html_content
Read-onlyIdempotent

Sanitizes raw HTML by removing malicious script tags, iframes, inline event handlers, and data URIs into safe markup. Use when preparing untrusted third-party web content for rendering in agent dashboards or email clients; for converting clean HTML into markdown, use extract_clean_markdown instead. Stateless read-only edge call (max 32 KB, 60 RPM): accepts 'html_content' ('sanitization_strictness' defaults to 'strip_scripts_and_iframes'), supports '?demo=true' or L402 (10 sats), and returns HTTP 400 if invalid.

Input Schema

NameRequiredDescriptionDefault
html_contentYesUntrusted or potentially hazardous HTML string requiring sanitization.
preserve_imagesNoWhether to retain safe img elements with http/https sources.
sanitization_strictnessNoSanitizer filter policy: strip scripts and iframes, allowlist safe formatting, or plaintext strip all.

Output Schema

NameRequiredDescriptionDefault
sanitized_htmlYesSafe, purified HTML output free of active scripting threats.
elements_removedYesList of dangerous tags and attributes removed during processing.
xss_vectors_neutralizedYesCount of potential script execution vectors disarmed.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already carry readOnly/idempotent/non-destructive, but the description adds operational facts annotations cannot: 32 KB payload cap, 60 RPM rate limit, stateless edge execution, default strictness, demo/L402 payment at 10 sats, and HTTP 400 on invalid input. Size limits, rate limits, and payment requirements are exactly the pre-call knowledge an agent needs.

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?

Three sentences with the purpose front-loaded ahead of routing and operational detail — correct ordering. The final sentence is dense, packing size, rate, defaults, demo mode, L402 pricing, and error behavior into one clause-heavy run, which slightly hurts scanability.

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?

An output schema exists, so return-value documentation is not required, and annotations cover the safety profile. Remaining agent-critical gaps — payload cap, rate limit, default policy, cost, and failure mode — are all addressed, so nothing needed to call it correctly is missing.

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 description coverage is 100%, so baseline is 3; the description goes slightly beyond by declaring the default value for 'sanitization_strictness' ('strip_scripts_and_iframes'), which the schema does not state. It does not add semantics for 'preserve_images', leaving that entirely to 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?

Opens with a specific verb+resource ('Sanitizes raw HTML') and enumerates exactly what is removed (script tags, iframes, inline event handlers, data URIs), so the agent knows the transformation precisely. It also names the sibling it is not (extract_clean_markdown), separating the two without requiring schema inspection.

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

Usage Guidelines5/5

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

States the triggering condition explicitly ('preparing untrusted third-party web content for rendering in agent dashboards or email clients') and names the alternative with the condition that selects it ('for converting clean HTML into markdown, use extract_clean_markdown instead'). Both the when and the when-not are present.

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