Skip to main content
Glama
tatn

MCP Server Fetch TypeScript

by tatn

get_raw_text

Retrieve raw text content directly from URLs for structured data formats like JSON, XML, CSV, TSV, and plain text files. Access source content without browser rendering or dynamic element processing.

Instructions

Retrieves raw text content directly from a URL 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 resource containing raw text content (JSON, XML, CSV, TSV, plain text, etc.).

Implementation Reference

  • Core handler function that performs the actual fetching of raw text content from the specified URL using axios and returns the response data as a string.
    export async function getRawTextString(request_url: string) { const response = await axios.get(request_url); const data = response.data; return data; }
  • Dispatch handler in the CallToolRequestSchema that handles the 'get_raw_text' tool call by invoking getRawTextString and formatting the MCP response.
    case "get_raw_text": { return { content: [{ type: "text", text: (await getRawTextString(url)) }] }; }
  • src/index.ts:54-67 (registration)
    Tool registration entry in the ListToolsRequestSchema handler, defining the name, description, and input schema for the 'get_raw_text' tool.
    { name: "get_raw_text", description: "Retrieves raw text content directly from a URL 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.", inputSchema: { type: "object", properties: { url: { type: "string", description: "URL of the target resource containing raw text content (JSON, XML, CSV, TSV, plain text, etc.)." } }, required: ["url"] } },
  • Input schema definition for the 'get_raw_text' tool, specifying the required 'url' parameter.
    inputSchema: { type: "object", properties: { url: { type: "string", description: "URL of the target resource containing raw text content (JSON, XML, CSV, TSV, plain text, etc.)." } }, required: ["url"] }

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-typescript'

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