Skip to main content
Glama
tatn

MCP Server Fetch Python

by tatn

get-raw-text

Extracts raw text, JSON, XML, CSV, or TSV directly from URLs, bypassing browser rendering for quick access to source content. Ideal for structured data processing.

Instructions

Extracts raw text content directly from URLs without browser rendering. Ideal for structured data formats like JSON, XML, CSV, TSV, or plain text files. Best used when fast, direct access to the source content is needed without processing dynamic elements.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYesURL of the target web page (text, JSON, XML, csv, tsv, etc.).

Implementation Reference

  • The core handler function that fetches and returns the raw text content from the given URL using httpx.AsyncClient.get().
    async def get_raw_text(url:str)->str:
        
        async with httpx.AsyncClient() as client:
            response = await client.get(url)
            return response.text
  • Registers the 'get-raw-text' tool in the list_tools handler, including its name, description, and input schema.
    types.Tool(
        name="get-raw-text",
        description="Extracts raw text content directly from URLs without browser rendering. Ideal for structured data formats like JSON, XML, CSV, TSV, or plain text files. Best used when fast, direct access to the source content is needed without processing dynamic elements.",  # noqa: E501
        inputSchema={
            "type": "object",
            "properties": {
                "url": {"type": "string", "description":"URL of the target web page (text, JSON, XML, csv, tsv, etc.)."}  # noqa: E501
            },
            "required": ["url"],
        },
    ),
  • Defines the JSON input schema for the 'get-raw-text' tool, requiring a 'url' parameter of type string.
    inputSchema={
        "type": "object",
        "properties": {
            "url": {"type": "string", "description":"URL of the target web page (text, JSON, XML, csv, tsv, etc.)."}  # noqa: E501
        },
        "required": ["url"],
    },
  • In the general call_tool handler, dispatches execution to get_raw_text when the tool name is 'get-raw-text'.
    if name == "get-raw-text":
        result_string = await get_raw_text(url)
Behavior3/5

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

No annotations are provided, so the description carries the full burden. It discloses key behavioral traits such as operating 'without browser rendering' and handling 'structured data formats', but lacks details on error handling, rate limits, authentication needs, or output format specifics, which are important for a tool interacting 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 appropriately sized and front-loaded, with three concise sentences that each add value: the first states the core purpose, the second specifies ideal use cases, and the third provides usage context. There is no wasted text.

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 lack of annotations and output schema, the description is somewhat complete but has gaps. It covers purpose and usage well, but omits behavioral details like error responses, performance characteristics, or output structure, which are important for an agent to use it effectively.

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 100% description coverage, so the schema already documents the 'url' parameter adequately. The description adds marginal value by implying the types of URLs supported ('text, JSON, XML, csv, tsv, etc.'), but does not provide additional syntax or format details beyond what the schema states.

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 ('Extracts') and resource ('raw text content directly from URLs'), and distinguishes it from siblings by emphasizing 'without browser rendering' and 'structured data formats', contrasting with tools like get-rendered-html that likely involve rendering.

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 on when to use this tool ('Ideal for structured data formats', 'Best used when fast, direct access to the source content is needed without processing dynamic elements'), but does not explicitly mention when not to use it or name specific alternatives among siblings like get-markdown.

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

Related 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/tatn/mcp-server-fetch-python'

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