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"]
    }
Behavior3/5

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

With no annotations provided, the description carries the full burden. It discloses key behavioral traits like 'without browser rendering' and 'fast, direct access', but lacks details on error handling, rate limits, or authentication needs. It does not contradict annotations.

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 front-loaded with the core purpose, followed by usage guidelines, all in three concise sentences with zero waste. Every sentence adds value without redundancy.

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 no annotations and no output schema, the description is adequate for a simple retrieval tool but lacks details on return values, error cases, or performance constraints. It covers the basics but could be more complete for a tool with potential complexity in handling various data formats.

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?

Schema description coverage is 100%, so the schema already documents the 'url' parameter. The description adds some context by listing acceptable formats (JSON, XML, CSV, TSV, plain text), but does not provide additional syntax or format details beyond what the schema implies.

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 specific action ('retrieves raw text content') and resource ('from a URL'), distinguishing it from siblings like get_markdown or get_rendered_html by emphasizing 'without browser rendering' and 'direct access to source content'.

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?

It provides clear context on when to use ('ideal for structured data formats', 'best used when fast, direct access to source content is needed without processing dynamic elements'), but does not explicitly mention when not to use or name specific alternatives among siblings.

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

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