Skip to main content
Glama

web_fetch

Fetches and reads a URL's content, bypassing anti-bot protections for documentation, articles, and code. Extracts clean main text or full HTML with section and pagination options.

Instructions

Obtiene y lee el contenido de una URL mediante el servicio multi-nivel de EnriProxy.

Cuándo usarla:

  • Cuando necesite leer el contenido completo de una página web.

  • Cuando necesite acceder a documentación, artículos o archivos de código.

  • Cuando métodos de fetch más simples fallen por protección anti-bot.

Características:

  • Detección de APIs de registros de paquetes (npm, PyPI)

  • Fetch de archivos raw (GitHub raw, HuggingFace)

  • Fetch robusto para sitios estáticos, dinámicos y protegidos (best-effort)

  • Respaldo automático entre múltiples estrategias de recuperación (detalles omitidos intencionalmente)

  • Proyección controlable: format ('text' ligero por defecto, 'markdown' estructura completa, 'html' DOM saneado), content ('main' elimina navegación/banners y conserva el artículo), anchor (lee sólo una sección por id o título de encabezado), include_links (inventario de enlaces de la página) e include_metadata (idioma/autor/fecha/imagen destacada)

  • Decodificación de páginas con encoding legado (windows-1252/ISO-8859-1) sin mojibake

Notas:

  • Proporcione la URL completa incluyendo protocolo (https://).

  • El contenido se limita con el parámetro max_chars (por defecto: 200000).

  • Si el resultado viene truncado e incluye un cursor, vuelva a llamar web_fetch con cursor + offset_chars + limit_chars para leer más sin volver a descargar.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlNoURL completa a obtener (http:// o https://).
limitNoAlias legado de limit_chars. Límite de lectura por cursor en caracteres (por defecto: max_chars).
anchorNoSelector de sección: id de un elemento (con o sin '#', ej. 'installation') o texto exacto de un encabezado (ej. 'Instalación'). Devuelve sólo esa sección hasta el siguiente encabezado del mismo nivel o superior. Mucho más barato que paginar con offset_chars a ciegas en documentos largos. Si la sección no existe, la respuesta lo indica y devuelve el documento completo.
cursorNoCursor opaco devuelto por una llamada previa de `web_fetch` para paginación. Nunca invente este valor.
formatNoFormato del contenido para páginas HTML. 'text' (por defecto) devuelve texto estructurado ligero y gasta menos tokens. 'markdown' reproduce la estructura exacta de la página: enlaces con URL, énfasis, bloques de código, listas anidadas, imágenes y tablas. 'html' devuelve el marcado HTML saneado (sin scripts/estilos) para inspeccionar el DOM: formularios, atributos data-*, estructura de componentes. Para preguntas puntuales (versiones, precios, datos sueltos) deje el formato por defecto.
offsetNoAlias legado de offset_chars. Offset de lectura por cursor en caracteres (por defecto: 0).
promptNoPista opcional que describe qué desea extraer (la herramienta devuelve el contenido obtenido; no genera un resumen con IA).
contentNoAlcance del contenido HTML. 'full' (por defecto) devuelve toda la página, incluida navegación, encabezados y pie. Use 'main' para quedarse sólo con el contenido principal (contenedor article/main, sin menús, barras laterales, banners de cookies ni pies): ahorra típicamente 60-80% de tokens en artículos, documentación y blogs. Combine content='main' con format='markdown' para la lectura óptima de artículos largos.
max_charsNoLongitud máxima del contenido (por defecto: 200000).
limit_charsNoLímite de lectura por cursor en caracteres (por defecto: max_chars). Prefiera este nombre actual de campo de EnriProxy sobre limit.
offset_charsNoOffset de lectura por cursor en caracteres (por defecto: 0). Prefiera este nombre actual de campo de EnriProxy sobre offset.
include_linksNoSi es true, agrega al final un inventario ENLACES DE LA PÁGINA con todos los enlaces únicos (etiqueta y URL, hasta 200). Úselo para decidir a dónde navegar después (crawling informado), descargar documentos enlazados o pasar URLs de imágenes a una herramienta de análisis de media que acepte URLs http(s) directas.
include_metadataNoSi es true, agrega al final un bloque METADATOS DE LA PÁGINA con idioma, autor, fecha de publicación e imagen destacada (og:image). Útil para citar fuentes o decidir frescura del contenido antes de gastar tokens en el fetch completo.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed6 schema fields changedv0.1.4
    • addedInput schema / properties / anchor
      Added value: +{
      +  "description": "Selector de sección: id de un elemento (con o sin '#', ej. 'installation') o texto exacto de un encabezado (ej. 'Instalación'). Devuelve sólo esa sección hasta el siguiente encabezado del mismo nivel o superior. Mucho más barato que paginar con offset_chars a ciegas en documentos largos. Si la sección no existe, la respuesta lo indica y devuelve el documento completo.",
      +  "type": "string"
      +}
    • addedInput schema / properties / content
      Added value: +{
      +  "description": "Alcance del contenido HTML. 'full' (por defecto) devuelve toda la página, incluida navegación, encabezados y pie. Use 'main' para quedarse sólo con el contenido principal (contenedor article/main, sin menús, barras laterales, banners de cookies ni pies): ahorra típicamente 60-80% de tokens en artículos, documentación y blogs. Combine content='main' con format='markdown' para la lectura óptima de artículos largos.",
      +  "enum": [
      +    "main",
      +    "full"
      +  ],
      +  "type": "string"
      +}
    • changedInput schema / properties / format / description
      Previous value: -"Formato del contenido para páginas HTML. 'text' (por defecto) devuelve texto estructurado ligero y gasta menos tokens. Use 'markdown' cuando necesite reproducir la estructura exacta de la página: enlaces con URL, énfasis, bloques de código, listas anidadas o imágenes. Para preguntas puntuales (versiones, precios, datos sueltos) deje el formato por defecto."New value: +"Formato del contenido para páginas HTML. 'text' (por defecto) devuelve texto estructurado ligero y gasta menos tokens. 'markdown' reproduce la estructura exacta de la página: enlaces con URL, énfasis, bloques de código, listas anidadas, imágenes y tablas. 'html' devuelve el marcado HTML saneado (sin scripts/estilos) para inspeccionar el DOM: formularios, atributos data-*, estructura de componentes. Para preguntas puntuales (versiones, precios, datos sueltos) deje el formato por defecto."
    • changedInput schema / properties / format / enum
      Previous value: -[
      -  "text",
      -  "markdown"
      -]New value: +[
      +  "text",
      +  "markdown",
      +  "html"
      +]
    • addedInput schema / properties / include_links
      Added value: +{
      +  "description": "Si es true, agrega al final un inventario ENLACES DE LA PÁGINA con todos los enlaces únicos (etiqueta y URL, hasta 200). Úselo para decidir a dónde navegar después (crawling informado), descargar documentos enlazados o pasar URLs de imágenes a una herramienta de análisis de media que acepte URLs http(s) directas.",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / include_metadata
      Added value: +{
      +  "description": "Si es true, agrega al final un bloque METADATOS DE LA PÁGINA con idioma, autor, fecha de publicación e imagen destacada (og:image). Útil para citar fuentes o decidir frescura del contenido antes de gastar tokens en el fetch completo.",
      +  "type": "boolean"
      +}
  2. Changed9 schema fields changedv0.1.2
    • changedInput schema / properties / cursor / description
      Previous value: -"Opaque cursor returned by a previous `web_fetch` call for pagination."New value: +"Cursor opaco devuelto por una llamada previa de `web_fetch` para paginación. Nunca invente este valor."
    • addedInput schema / properties / format
      Added value: +{
      +  "description": "Formato del contenido para páginas HTML. 'text' (por defecto) devuelve texto estructurado ligero y gasta menos tokens. Use 'markdown' cuando necesite reproducir la estructura exacta de la página: enlaces con URL, énfasis, bloques de código, listas anidadas o imágenes. Para preguntas puntuales (versiones, precios, datos sueltos) deje el formato por defecto.",
      +  "enum": [
      +    "text",
      +    "markdown"
      +  ],
      +  "type": "string"
      +}
    • changedInput schema / properties / limit / description
      Previous value: -"Legacy alias for limit_chars. Cursor read limit in characters (default: max_chars)."New value: +"Alias legado de limit_chars. Límite de lectura por cursor en caracteres (por defecto: max_chars)."
    • changedInput schema / properties / limit_chars / description
      Previous value: -"Cursor read limit in characters (default: max_chars). Prefer this current EnriProxy field name over limit."New value: +"Límite de lectura por cursor en caracteres (por defecto: max_chars). Prefiera este nombre actual de campo de EnriProxy sobre limit."
    • changedInput schema / properties / max_chars / description
      Previous value: -"Maximum content length (default: 200000)."New value: +"Longitud máxima del contenido (por defecto: 200000)."
    • changedInput schema / properties / offset / description
      Previous value: -"Legacy alias for offset_chars. Cursor read offset in characters (default: 0)."New value: +"Alias legado de offset_chars. Offset de lectura por cursor en caracteres (por defecto: 0)."
    • changedInput schema / properties / offset_chars / description
      Previous value: -"Cursor read offset in characters (default: 0). Prefer this current EnriProxy field name over offset."New value: +"Offset de lectura por cursor en caracteres (por defecto: 0). Prefiera este nombre actual de campo de EnriProxy sobre offset."
    • changedInput schema / properties / prompt / description
      Previous value: -"Optional hint describing what you want to extract (the tool returns fetched content; it does not generate an AI summary)."New value: +"Pista opcional que describe qué desea extraer (la herramienta devuelve el contenido obtenido; no genera un resumen con IA)."
    • changedInput schema / properties / url / description
      Previous value: -"Full URL to fetch (http:// or https://)."New value: +"URL completa a obtener (http:// o https://)."
  3. Changed4 schema fields changedv0.1.1
    • changedInput schema / properties / limit / description
      Previous value: -"Cursor read limit in characters (default: max_chars)."New value: +"Legacy alias for limit_chars. Cursor read limit in characters (default: max_chars)."
    • addedInput schema / properties / limit_chars
      Added value: +{
      +  "description": "Cursor read limit in characters (default: max_chars). Prefer this current EnriProxy field name over limit.",
      +  "type": "integer"
      +}
    • changedInput schema / properties / offset / description
      Previous value: -"Cursor read offset in characters (default: 0)."New value: +"Legacy alias for offset_chars. Cursor read offset in characters (default: 0)."
    • addedInput schema / properties / offset_chars
      Added value: +{
      +  "description": "Cursor read offset in characters (default: 0). Prefer this current EnriProxy field name over offset.",
      +  "type": "integer"
      +}
  4. First observedv0.1.0

TDQS

A4.8/5.0
Behavior5/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure and does so thoroughly: it reveals best-effort fetching, automatic fallback across strategies, legacy encoding decoding, content limits via max_chars, and cursor-based pagination. It also clarifies that the prompt parameter does not generate an AI summary, preventing incorrect agent expectations.

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?

The description is well-organized with clear sections ("Cuándo usarla", "Características", "Notas"), front-loads the purpose and usage, and uses bullets for readability. For a tool with 13 parameters, the length is justified; each section and bullet adds operational or decision-making value without 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?

The description covers all essential operational aspects: full URL requirement, default max_chars, cursor-based pagination with offset_chars/limit_chars, and the output behavior for include_links and include_metadata. Even without an output schema, it explains truncation, cursor reuse, and section-not-found fallback, making it complete enough for correct invocation.

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

Parameters5/5

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

Even though the schema has 100% parameter coverage, the description adds significant value beyond the schema: it explains when to use 'main' versus 'full' content with token savings, how format options map to different use cases, the behavior of anchor selection, and how to combine content='main' with format='markdown' for optimal long-article reading. This is well above the baseline of 3 for fully-covered schemas.

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 description opens with a specific verb and resource: "Obtiene y lee el contenido de una URL" (obtains and reads content of a URL), which clearly defines the tool's function. The "Cuándo usarla" section lists concrete use cases—reading full page content, accessing documentation, articles, or code files—that distinguish it from the sibling web_search 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 Guidelines4/5

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

The "Cuándo usarla" section explicitly gives conditions: when full page content is needed, when accessing documentation or code files, and when simpler fetch methods fail due to anti-bot protection. However, it does not explicitly mention the alternative web_search or state when not to use this tool, leaving slight room for ambiguity in tool selection.

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

Deploy Server

Other Tools