Skip to main content
Glama

make_http_request

Execute HTTP requests (GET, POST, PUT, DELETE) with custom headers and body using curl, enabling integration with Puppeteer MCP Server for web automation tasks.

Instructions

Make an HTTP request with curl

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
bodyYesBody to include in the request
headersYesHeaders to include in the request
typeYesType of the request. GET, POST, PUT, DELETE
urlYesUrl to make the request to

Implementation Reference

  • The switch case handler for the 'make_http_request' tool, which delegates to the makeRequest utility function.
    case "make_http_request": {
      const response = await makeRequest(
        args.url,
        args.type,
        args.headers,
        args.body
      );
      return {
        content: [{ type: "text", text: JSON.stringify(response, null, 2) }],
        isError: false,
      };
    }
  • Input schema definition for the make_http_request tool, defining parameters like type, url, headers, body.
    {
      name: "make_http_request",
      description: "Make an HTTP request with curl",
      inputSchema: {
        type: "object",
        properties: {
          type: {
            type: "string",
            description: "Type of the request. GET, POST, PUT, DELETE",
          },
          url: {
            type: "string",
            description: "Url to make the request to",
          },
          headers: {
            type: "object",
            description: "Headers to include in the request",
          },
          body: {
            type: "object",
            description: "Body to include in the request",
          },
        },
        required: ["type", "url", "headers", "body"],
      },
    },
  • index.ts:278-280 (registration)
    Registration of the tools list (TOOLS array including make_http_request) for ListToolsRequestSchema.
    server.setRequestHandler(ListToolsRequestSchema, async () => ({
      tools: TOOLS,
    }));
  • The makeRequest helper function that implements the core HTTP request logic using fetch.
    export async function makeRequest(
      url: string,
      type: string,
      headers: Record<string, string>,
      body: any
    ) {
      try {
        const response = await fetch(url, {
          method: type,
          headers,
          body:
            body && (type === "POST" || type === "PUT")
              ? JSON.stringify(body)
              : undefined,
        });
    
        if (!response.ok) {
          throw new Error(`HTTP error! status: ${response.status}`);
        }
    
        return {
          status: response.status,
          data: await response.text(),
          headers: Object.fromEntries(response.headers),
        };
      } catch (error) {
        console.error("Error making request:", error);
        throw error;
      }
    }
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It mentions 'with curl', hinting at underlying implementation, but fails to disclose critical traits: whether it handles authentication, rate limits, error responses, timeouts, or what the return format looks like. For a tool making HTTP requests, this leaves significant gaps in understanding its behavior.

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 extremely concise with a single sentence, 'Make an HTTP request with curl', which is front-loaded and wastes no words. Every part of the sentence contributes to understanding the tool's basic function, making it efficient and well-structured.

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 making HTTP requests, no annotations, no output schema, and 4 parameters, the description is incomplete. It doesn't explain what the tool returns, how errors are handled, or any behavioral nuances. For a tool with this functionality, more context is needed to be fully helpful to an AI agent.

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, clearly documenting all 4 parameters (body, headers, type, url). The description adds no additional meaning beyond what the schema provides, such as examples or constraints. With high schema coverage, the baseline score of 3 is appropriate, as the schema does the heavy lifting.

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

Purpose3/5

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

The description states the tool's purpose as 'Make an HTTP request with curl', which is clear but vague. It specifies the verb ('Make') and resource ('HTTP request'), but lacks specificity about what curl entails or how it differs from sibling tools like puppeteer_navigate or semantic_search_requests. It doesn't distinguish itself from alternatives, leaving ambiguity about its scope.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives. With siblings like puppeteer_navigate (for browser navigation) and semantic_search_requests (for search-related requests), there's no indication of appropriate contexts, exclusions, or prerequisites. Usage is implied only by the tool name, not explained.

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

Related 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/jwaldor/mcp-scrape-copilot'

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