Skip to main content
Glama

Extraer metadatos HTML

html-meta-extract
Read-onlyIdempotent

Extrae metadatos de un HTML proporcionado (sin descargarlo): título, idioma, descripción, canonical, Open Graph, JSON-LD y h1. 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: extraer y clasificar los enlaces de un documento HTML (html-links-extract). 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: Extracts metadata from a supplied HTML string (no fetching): title, lang, meta description/robots, canonical, Open Graph and Twitter tags, JSON-LD block count and types, h1 texts and hreflang links. 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 document (string; required).

Output Schema

NameRequiredDescriptionDefault
h1No
langNo
titleNo
robotsNo
json_ldNo
twitterNo
hreflangNo
canonicalNo
open_graphNo
descriptionNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / html / examples
      Added value: +[
      +  "<p>no head</p>"
      +]
  2. Changed1 schema field changed
    • addedInput schema / description
      Added value: +"EN: Extracts metadata from a supplied HTML string (no fetching): title, lang, meta description/robots, canonical, Open Graph and Twitter tags, JSON-LD block count and types, h1 texts and hreflang links. 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: extracting and classifying the links of an HTML document (html-links-extract). 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.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, openWorldHint=false and destructiveHint=false, so the 'sin red, sin estado guardado, determinista' sentences largely restate structured data. The description does add genuinely new operational context: per-call time budget (1 s) and result size cap (1 MB), which the annotations cannot express.

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 extraction sentence is well front-loaded, but the definition is bloated by a near-duplicate Spanish/English pair and a generic 'Cuándo' list of unrelated artifact types (tokens, IP ranges, HTTP headers) that does not earn its place in an HTML metadata tool.

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?

An output schema exists, so return values need no prose explanation, and the description covers scope, exclusions, side effects and limits. The only real gap is the inconsistent input-size bound versus the schema's maxLength.

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?

With a single parameter at 100% schema coverage, the schema already documents 'html' fully, so baseline 3 applies. The description adds no format guidance beyond the schema, and its stated '64 KB' input limit conflicts with the schema's maxLength of 2,097,152 characters, which could mislead an agent about the real bound.

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 and resource ('Extrae metadatos de un HTML proporcionado') and enumerates exactly which fields are returned (title, lang, meta description/robots, canonical, OG/Twitter, JSON-LD, h1, hreflang). It also explicitly names the sibling it is not (html-links-extract), so an agent can distinguish it without opening the schema.

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?

The 'No para' clause is an explicit exclusion pointing to html-links-extract, which is exactly the routing information an agent needs. The 'Cuándo' clause, however, is generic boilerplate (URL, HTTP header, token, version string, IP range) that barely relates to HTML metadata extraction, so the positive guidance 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