Skip to main content
Glama

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)

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