Skip to main content
Glama

fetch

Fetch a URL and return clean, LLM-ready markdown with metadata and prompt injection scanning. Supports JS rendering, link extraction, and customizable timeouts and word limits.

Instructions

Fetch a URL and return clean, LLM-ready markdown with metadata and prompt injection scanning.

Args: url: The URL to fetch. timeout: Request timeout in seconds. max_words: Optional word cap on extracted body content. strict: When True and high-risk injection is detected, the response is marked as an error. js: Use Playwright for JavaScript-rendered pages (requires playwright + chromium). links: Link extraction mode — "domains" (default) or "full" for all URLs with anchor text. auth_token: Bearer token for Authorization header (e.g. "my-api-key"). headers: Deprecated. Use auth_token instead. Custom HTTP headers to include in the request.

Returns: A structured dict with url, body (markdown), metadata, links, risk_level, injection_matches, sanitization stats, and edge case info.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYes
timeoutNo
max_wordsNo
strictNo
jsNo
linksNodomains
auth_tokenNo
headersNo
Behavior5/5

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

With no annotations provided, the description fully discloses behavioral aspects: injection scanning, strict mode for high-risk detection, JS rendering via Playwright, and link extraction modes. It also notes the return structure including risk_level and sanitization stats.

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-structured with 'Args' and 'Returns' sections, each sentence adding necessary detail without redundancy. It is appropriately sized for the complexity (8 parameters).

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?

Given 8 parameters, no output schema, and no annotations, the description is complete. It covers all parameters, explains the return value (including metadata, links, risk_level, etc.), and addresses edge cases like injection detection.

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?

Schema description coverage is 0%, so the description must explain all parameters. It does so thoroughly: each parameter's purpose, default values, and constraints (e.g., 'strict' boolean, 'links' enum, 'headers' deprecated). It adds meaning beyond the raw 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 description clearly states it fetches a URL and returns LLM-ready markdown with metadata and injection scanning. It uses a specific verb ('fetch') and describes the resource ('URL') and output format, leaving no ambiguity about its purpose.

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 description provides clear context about the tool's functionality, including deprecation of 'headers' in favor of 'auth_token'. Since no sibling tools are listed, alternative guidance is not needed. It explicitly advises against using the deprecated parameter.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Erodenn/fetch-guard'

If you have feedback or need assistance with the MCP directory API, please join our Discord server