Skip to main content
Glama
luis0794

Violett MCP Server

by luis0794

fetch_url

Retrieve content from any web URL using HTTP GET requests to access online data and resources.

Instructions

Fetch content from a URL via HTTP GET request

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYesURL to fetch

Implementation Reference

  • The handler function for the 'fetch_url' tool. It extracts the URL from arguments, performs an HTTP GET request using the fetch API, retrieves the response status, headers, and body content, and returns it formatted as text content. Handles errors by returning an error message.
    case "fetch_url": {
      const url = request.params.arguments?.url as string;
      if (!url) {
        throw new Error("URL is required");
      }
    
      try {
        const response = await fetch(url);
        const content = await response.text();
        const headers = Object.fromEntries(response.headers.entries());
    
        return {
          content: [
            {
              type: "text",
              text: `HTTP ${response.status} ${response.statusText}\n\nHeaders:\n${JSON.stringify(headers, null, 2)}\n\nBody:\n${content}`,
            },
          ],
        };
      } catch (error) {
        return {
          content: [
            {
              type: "text",
              text: `Error fetching URL: ${error instanceof Error ? error.message : String(error)}`,
            },
          ],
          isError: true,
        };
      }
    }
  • Registration of the 'fetch_url' tool in the ListTools response. Includes the tool name, description, and input schema defining a required 'url' string property.
    {
      name: "fetch_url",
      description: "Fetch content from a URL via HTTP GET request",
      inputSchema: {
        type: "object",
        properties: {
          url: {
            type: "string",
            description: "URL to fetch",
          },
        },
        required: ["url"],
      },
    },
  • The input schema for the 'fetch_url' tool, specifying an object with a single required 'url' property of type string.
    inputSchema: {
      type: "object",
      properties: {
        url: {
          type: "string",
          description: "URL to fetch",
        },
      },
      required: ["url"],
    },
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions the HTTP method (GET) but doesn't cover important traits like error handling, timeout behavior, authentication needs, rate limits, or what 'content' includes (e.g., HTML, JSON). This leaves significant gaps for a tool that performs network operations.

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 a single, efficient sentence that directly states the tool's function without unnecessary words. It's front-loaded with the core action and resource, making it easy to understand at a glance. Every word earns its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity of HTTP operations and the lack of annotations and output schema, the description is incomplete. It doesn't address key aspects like response format, error cases, or behavioral constraints, which are crucial for an agent to use this tool effectively in real-world scenarios.

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?

The input schema has 100% description coverage, with the 'url' parameter clearly documented. The description adds minimal value beyond the schema by reinforcing the purpose of fetching from a URL, but doesn't provide additional context like URL format requirements or examples. This meets the baseline for high schema coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Fetch content') and resource ('from a URL via HTTP GET request'), making the purpose immediately understandable. It doesn't explicitly distinguish from the sibling 'post_data' tool, but the mention of 'GET request' provides implicit differentiation from POST operations.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage context through 'via HTTP GET request,' suggesting this is for retrieving content rather than submitting data. However, it doesn't provide explicit guidance on when to use this versus alternatives like 'post_data' or mention any prerequisites, limitations, or specific scenarios where this tool is preferred.

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/luis0794/violett-mcp-server'

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