Skip to main content
Glama
alexandru2882

URL Text Fetcher MCP Server

fetch_url_text

Extract visible text content from web pages by providing a URL. This tool downloads readable text for analysis or processing in LM Studio.

Instructions

Download all visible text from a URL.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • Registers the fetch_url_text tool using the @mcp.tool() decorator from FastMCP.
    @mcp.tool()
  • The handler function that executes the tool: fetches the URL with requests, parses HTML with BeautifulSoup, and returns the visible text.
    def fetch_url_text(url: str) -> str:
        """Download all visible text from a URL."""
        resp = requests.get(url, timeout=10)
        resp.raise_for_status()
        soup = BeautifulSoup(resp.text, "html.parser")
        return soup.get_text(separator="\n", strip=True)
  • Function signature and docstring define the input schema (url: str) and output (str), used by MCP for tool schema.
    def fetch_url_text(url: str) -> str:
        """Download all visible text from a URL."""
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. It mentions 'visible text' which hints at HTML parsing limitations, but doesn't cover critical aspects like authentication needs, rate limits, error handling, or what 'visible' excludes (e.g., scripts, hidden elements). This leaves significant gaps for a web scraping tool.

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 a single, efficient sentence that directly states the tool's function without any wasted words. It's front-loaded with the core action and resource, making it easy to parse quickly.

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

Completeness3/5

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

Given the tool's moderate complexity (web scraping), no annotations, and an output schema (which handles return values), the description is minimally complete. It states what the tool does but lacks important context about behavioral constraints and usage differentiation, making it adequate but with clear gaps.

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?

The input schema has 0% description coverage, but there's only one parameter ('url'). The description doesn't add any semantic details about the URL parameter (e.g., format requirements, supported protocols), though the simplicity of a single URL parameter means the baseline is adequate despite the coverage gap.

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?

The description clearly states the action ('Download') and resource ('all visible text from a URL'), making the purpose immediately understandable. However, it doesn't explicitly differentiate from its sibling tool 'fetch_page_links', which likely extracts links rather than text content.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives. There's no mention of its sibling 'fetch_page_links' or any context about when text extraction is preferred over link extraction, leaving usage decisions to inference.

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/alexandru2882/url-text-fetcher-mcp'

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