Skip to main content
Glama

Tidy Byte Tools API

Sanitize HTML

html_sanitize
Read-onlyIdempotent

Strip scripts and unsafe markup. Keeps a short allow-list of tags.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "html_sanitize"
  }
}

Input Schema

NameRequiredDescriptionDefault
htmlNoThe HTML to clean. Scripts and unsafe markup are removed, and a short list of safe tags is kept.

Output Schema

NameRequiredDescriptionDefault
okYes
toolYes
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / html / description
      Added value: +"The HTML to clean. Scripts and unsafe markup are removed, and a short list of safe tags is kept."
  2. First observed

TDQS

A3.6/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint, destructiveHint=false and openWorldHint=false, so the safety profile is fully covered. The description adds one genuinely new behavioral fact beyond annotations: the sanitizer works via an allow-list rather than a blocklist, so safe tags survive. It does not say which tags are on the short allow-list, whether attributes/styles/URLs are filtered, or how output is encoded, leaving the agent unable to predict the result for inputs containing images, styles, or event handlers.

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

Conciseness5/5

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

Two short sentences with zero filler; the action is front-loaded and the retention rule follows immediately. Nothing is repeated verbatim from the title in a wasteful way, and there is no hedging or boilerplate.

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

Completeness4/5

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

For a one-parameter utility with a declared output schema, the description covers the essentials: what is removed and the fact that an allow-list governs what is kept. The remaining gap is concreteness of that allow-list and attribute/CSS handling, which matters if an agent needs the sanitized HTML to retain anything beyond basic tags, but is minor given the tool's simplicity.

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% and the single parameter's schema text already explains that scripts and unsafe markup are removed while a short safe-tag list is kept. The description adds no separate detail about the html parameter (format, accepted fragments, max size), so the schema carries the semantics and the baseline of 3 applies.

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

Purpose4/5

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

States a specific verb ('Strip') and named targets ('scripts and unsafe markup') plus the retention policy ('short allow-list of tags'), so an agent immediately knows this is an HTML sanitizer rather than a formatter. It does not name any sibling, but none of the listed siblings overlap in behavior, so there is little ambiguity to resolve.

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

Usage Guidelines3/5

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

Usage is only implied: 'unsafe markup' suggests untrusted HTML input, but there is no statement of when to call this versus e.g. json_format/url_codec-style text handling, no prerequisites, and no caveats about what happens to non-tag content such as attributes or CSS. The purpose is self-evident enough that an agent can select the tool, but no explicit guidance is provided.

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.