get_raw_text
Extract raw text content directly from URLs for structured data formats like JSON, XML, CSV, or plain text. Bypasses browser rendering to provide fast, unprocessed source data.
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:127-134 (handler)Handler case for the 'get_raw_text' tool that fetches raw text content from the provided URL using the getRawTextString helper and returns it as text content.case "get_raw_text": { return { content: [{ type: "text", text: (await getRawTextString(url)) }] }; }
- src/index.ts:57-66 (schema)Input schema definition for the 'get_raw_text' tool, specifying an object with a required 'url' string property.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:54-67 (registration)Registration of the 'get_raw_text' tool in the ListToolsRequestSchema handler, including name, description, and input schema.{ 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:167-171 (helper)Helper function that implements the core logic of fetching raw text content from a URL using axios.get and returning the response data.export async function getRawTextString(request_url: string) { const response = await axios.get(request_url); const data = response.data; return data; }