Skip to main content
Glama
JeremyLakeyJr

Friday MCP Server

fetch_url

Get the raw text content of any URL, truncated to a configured limit. Use this tool to extract and read web page text for research or data processing.

Instructions

Fetch the raw text of a URL, truncated to the configured limit.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The actual handler for the 'fetch_url' tool. Uses httpx to fetch a URL asynchronously and truncates the response text to the configured max_fetch_chars limit.
    @mcp.tool()
    async def fetch_url(url: str) -> str:
        """Fetch the raw text of a URL, truncated to the configured limit."""
        async with httpx.AsyncClient(follow_redirects=True, timeout=15.0) as client:
            response = await client.get(url)
            response.raise_for_status()
            return response.text[: config.max_fetch_chars]
  • Registration entry point; calls web.register(mcp, config=config) which defines the fetch_url tool via the @mcp.tool() decorator.
    def register_all_tools(mcp, *, config, skill_store) -> None:
        system.register(mcp, config=config)
        utils.register(mcp)
        web.register(mcp, config=config)
        workspace.register(mcp, config=config)
        skills.register(mcp, skill_store=skill_store)
  • Schema/config definition for the max_fetch_chars field that controls the truncation limit used in fetch_url.
    max_fetch_chars: int
Behavior3/5

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

Truncation behavior is disclosed, which is key. But no annotations exist, and description does not cover error handling, rate limits, or authorization needs. Adequate but not comprehensive.

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?

Single, front-loaded sentence with no waste. Efficiently communicates core action and key behavior.

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?

Tool is simple with one parameter and an output schema likely covering return format. Lacks guidance on use cases, edge cases, and configuration context. Adequate for basic invocation but not fully complete.

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

Parameters2/5

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

Schema description coverage is 0%, yet description adds no parameter details beyond the parameter name 'url'. Does not specify URL format, protocol, or constraints. Compensates poorly for schema gap.

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?

Description clearly states the tool fetches raw text from a URL, with truncation behavior. Verb 'Fetch' and resource 'raw text of a URL' are specific. Distinguishes from siblings like search_web and read_file.

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?

No explicit guidance on when to use or avoid this tool relative to alternatives. Description implies usage for fetching URL content but does not mention alternatives or exclusions.

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/JeremyLakeyJr/mcp-server'

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