Skip to main content
Glama
flyanima

Open Search MCP

by flyanima

test_httpbin

Test HTTP requests and responses by sending various HTTP methods to HTTPBin endpoints for debugging and validation purposes.

Instructions

Test HTTP requests and responses using HTTPBin

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
methodNoHTTP method to testGET
endpointNoHTTPBin endpoint to testget

Implementation Reference

  • Primary registration of the 'test_httpbin' tool, including name, description, input schema, and execute handler function that simulates HTTPBin API responses.
    registry.registerTool({
      name: 'test_httpbin',
      description: 'Test HTTP requests and responses using HTTPBin',
      category: 'testing',
      source: 'HTTPBin',
      inputSchema: {
        type: 'object',
        properties: {
          method: {
            type: 'string',
            enum: ['GET', 'POST', 'PUT', 'DELETE', 'PATCH'],
            description: 'HTTP method to test',
            default: 'GET'
          },
          endpoint: {
            type: 'string',
            description: 'HTTPBin endpoint to test',
            default: 'get'
          }
        },
        required: []
      },
      execute: async (args: ToolInput): Promise<ToolOutput> => {
        try {
          const { method = 'GET', endpoint = 'get' } = args;
    
          // Simulate HTTPBin response
          const mockResponse = {
            args: {},
            headers: {
              'Accept': 'application/json',
              'User-Agent': 'Open-Search-MCP/1.0'
            },
            origin: '127.0.0.1',
            url: `https://httpbin.org/${endpoint}`,
            method: method
          };
    
          return {
            success: true,
            data: {
              method,
              endpoint,
              response: mockResponse,
              status: 'success'
            },
            metadata: {
              tool: 'test_httpbin',
              timestamp: new Date().toISOString()
            }
          };
        } catch (error) {
          return {
            success: false,
            error: `HTTPBin test failed: ${error instanceof Error ? error.message : String(error)}`,
            data: null
          };
        }
      }
    });
  • The core handler (execute function) for 'test_httpbin' that processes input parameters (method, endpoint) and returns a mocked HTTPBin response.
    execute: async (args: ToolInput): Promise<ToolOutput> => {
      try {
        const { method = 'GET', endpoint = 'get' } = args;
    
        // Simulate HTTPBin response
        const mockResponse = {
          args: {},
          headers: {
            'Accept': 'application/json',
            'User-Agent': 'Open-Search-MCP/1.0'
          },
          origin: '127.0.0.1',
          url: `https://httpbin.org/${endpoint}`,
          method: method
        };
    
        return {
          success: true,
          data: {
            method,
            endpoint,
            response: mockResponse,
            status: 'success'
          },
          metadata: {
            tool: 'test_httpbin',
            timestamp: new Date().toISOString()
          }
        };
      } catch (error) {
        return {
          success: false,
          error: `HTTPBin test failed: ${error instanceof Error ? error.message : String(error)}`,
          data: null
        };
      }
    }
  • Input schema defining parameters for the test_httpbin tool: HTTP method (enum) and endpoint (string).
    inputSchema: {
      type: 'object',
      properties: {
        method: {
          type: 'string',
          enum: ['GET', 'POST', 'PUT', 'DELETE', 'PATCH'],
          description: 'HTTP method to test',
          default: 'GET'
        },
        endpoint: {
          type: 'string',
          description: 'HTTPBin endpoint to test',
          default: 'get'
        }
      },
      required: []
    },
  • src/index.ts:245-245 (registration)
    Top-level registration call in main server initialization that registers the test_httpbin tool via the jsonplaceholder-tools module.
    registerJSONPlaceholderTools(this.toolRegistry);    // 2 tools: test_jsonplaceholder, test_httpbin
Behavior2/5

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

No annotations are provided, so the description carries full burden for behavioral disclosure. It mentions 'test HTTP requests and responses' which implies read-only testing, but doesn't clarify if this makes actual network calls, what the response format is, whether it's safe for production, or any rate limits. The description is too vague to understand the tool's behavior beyond basic purpose.

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 with zero waste. It's appropriately sized and front-loaded with the core purpose. Every word earns its place without redundancy or unnecessary elaboration.

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 no annotations and no output schema, the description is incomplete for a tool that presumably makes HTTP calls. It doesn't explain what the tool returns, error handling, or practical use cases. For a testing tool with potential network implications, more context is needed to understand its operation and limitations.

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 both parameters ('method' and 'endpoint') with descriptions and defaults. The description adds no additional parameter semantics beyond what's in the schema. Baseline 3 is appropriate when the schema does the heavy lifting.

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 tool's purpose: 'Test HTTP requests and responses using HTTPBin'. It specifies the verb ('test') and resource ('HTTP requests and responses'), and mentions the service ('HTTPBin'). However, it doesn't differentiate from sibling tools like 'test_jsonplaceholder' or explain what makes HTTPBin unique versus other testing tools.

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. It doesn't mention when to choose HTTPBin over other testing tools like 'test_jsonplaceholder' or when HTTP requests/responses testing is appropriate versus other sibling tools focused on research, search, or analysis. No context or exclusions are provided.

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/flyanima/open-search-mcp'

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