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
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | URL of the target resource containing raw text content (JSON, XML, CSV, TSV, plain text, etc.). |
Implementation Reference
- src/index.ts:167-171 (handler)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; }
- src/index.ts:127-134 (handler)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"] } },
- src/index.ts:57-66 (schema)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"] }