Skip to main content
Glama

tool_scrape_url

Extract web content from any URL and convert it to structured Markdown with source attribution for efficient integration into development workflows.

Instructions

Scrape content from a URL as Markdown.

Args: url: URL to scrape.

Returns: Markdown content with source attribution.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • Tool registration for tool_scrape_url which acts as a wrapper for the scrape_url helper function.
    @mcp.tool()
    async def tool_scrape_url(url: str) -> str:
        """Scrape content from a URL as Markdown.
    
        Args:
            url: URL to scrape.
    
        Returns:
            Markdown content with source attribution.
        """
        return await scrape_url(url)
  • Core implementation of the scraping logic that calls the underlying ScraperAdapter.
    async def scrape_url(url: str, *, include_metadata: bool = False) -> str:
        """Scrape content from a URL and return as Markdown.
    
        Args:
            url: The URL to scrape.
            include_metadata: Include page metadata (fetch time, word count, etc.).
    
        Returns:
            Markdown content with source attribution.
    
        Example:
            >>> content = await scrape_url("https://example.com")
            >>> content = await scrape_url("https://example.com", include_metadata=True)
        """
        doc = await _adapter.fetch(url)
    
        if not include_metadata:
            return doc.content
Behavior2/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. It mentions that content is returned as Markdown with source attribution, which is useful, but lacks details on error handling, rate limits, authentication needs, or whether it's read-only or destructive. This leaves significant gaps for a tool that interacts with external URLs.

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 highly concise and well-structured, with a clear opening sentence followed by brief sections for args and returns. Every sentence adds value without redundancy, making it easy to scan and understand 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 complexity (interacting with external URLs) and the presence of an output schema (which likely covers return values), the description is moderately complete. It covers the core purpose and output format but lacks behavioral details like error handling or limitations, which are important for such a tool. The output schema reduces the need to explain returns, but more context is still warranted.

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

Parameters4/5

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

The description adds meaningful context beyond the input schema, which has 0% coverage. It explains that the 'url' parameter is for scraping content, and the schema only defines it as a string type. However, it does not specify URL format constraints or examples, so it doesn't fully compensate for the low schema coverage, but provides essential semantic information.

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 the tool's purpose with a specific verb ('scrape') and resource ('content from a URL'), and distinguishes it from siblings like 'tool_extract_links' or 'tool_search_web' by focusing on content extraction as Markdown. It explicitly mentions the output format and attribution, making the purpose unambiguous.

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. It does not mention scenarios where it's preferred over siblings like 'tool_crawl_docs' for documentation or 'tool_search_web' for broader searches, nor does it specify prerequisites or exclusions, leaving usage context unclear.

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/Y4NN777/devlens-mcp'

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