Skip to main content
Glama

test-proxy-connection

Verify proxy connectivity for a specified cryptocurrency exchange by inputting its ID, ensuring proper integration with the CCXT MCP Server.

Instructions

Test the proxy connection with a specified exchange

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
exchangeYesExchange ID to test connection with (e.g., binance)

Implementation Reference

  • The core handler function that implements the logic for testing the proxy connection. It checks if proxy is enabled via environment variable, retrieves proxy config, and returns validation results or error messages.
    }, async ({ exchange }) => {
      try {
        const useProxy = process.env.USE_PROXY === 'true';
        if (!useProxy) {
          return {
            content: [{
              type: "text",
              text: JSON.stringify({
                success: false,
                message: "Proxy is not enabled. Enable it first with set-proxy-config"
              }, null, 2)
            }]
          };
        }
        
        const proxyConfig = getProxyConfig();
        if (!proxyConfig) {
          return {
            content: [{
              type: "text",
              text: JSON.stringify({
                success: false,
                message: "Proxy is enabled but not properly configured"
              }, null, 2)
            }]
          };
        }
        
        // Since we can't create a standalone test here without potentially affecting 
        // the exchange cache, we'll just return the current configuration
        return {
          content: [{
            type: "text",
            text: JSON.stringify({
              message: "Proxy configuration looks valid",
              proxyUrl: proxyConfig.url,
              note: "To test actual connectivity, try fetching data from an exchange using one of the other tools"
            }, null, 2)
          }]
        };
      } catch (error) {
        log(LogLevel.ERROR, `Error testing proxy: ${error instanceof Error ? error.message : String(error)}`);
        return {
          content: [{
            type: "text",
            text: `Error: ${error instanceof Error ? error.message : String(error)}`
          }],
          isError: true
        };
      }
    });
  • Zod schema defining the input parameter 'exchange' as a required string.
    exchange: z.string().describe("Exchange ID to test connection with (e.g., binance)"),
  • Registration of the 'test-proxy-connection' tool using server.tool(), including name, description, schema, and inline handler function.
    server.tool("test-proxy-connection", "Test the proxy connection with a specified exchange", {
      exchange: z.string().describe("Exchange ID to test connection with (e.g., binance)"),
    }, async ({ exchange }) => {
      try {
        const useProxy = process.env.USE_PROXY === 'true';
        if (!useProxy) {
          return {
            content: [{
              type: "text",
              text: JSON.stringify({
                success: false,
                message: "Proxy is not enabled. Enable it first with set-proxy-config"
              }, null, 2)
            }]
          };
        }
        
        const proxyConfig = getProxyConfig();
        if (!proxyConfig) {
          return {
            content: [{
              type: "text",
              text: JSON.stringify({
                success: false,
                message: "Proxy is enabled but not properly configured"
              }, null, 2)
            }]
          };
        }
        
        // Since we can't create a standalone test here without potentially affecting 
        // the exchange cache, we'll just return the current configuration
        return {
          content: [{
            type: "text",
            text: JSON.stringify({
              message: "Proxy configuration looks valid",
              proxyUrl: proxyConfig.url,
              note: "To test actual connectivity, try fetching data from an exchange using one of the other tools"
            }, null, 2)
          }]
        };
      } catch (error) {
        log(LogLevel.ERROR, `Error testing proxy: ${error instanceof Error ? error.message : String(error)}`);
        return {
          content: [{
            type: "text",
            text: `Error: ${error instanceof Error ? error.message : String(error)}`
          }],
          isError: true
        };
      }
    });
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 states the tool tests a proxy connection but doesn't explain what 'test' entails (e.g., whether it performs a network check, returns latency, or validates credentials), what happens on failure, or if it has side effects like logging. This is a significant gap for a tool with potential operational implications.

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 purpose without unnecessary words. It's appropriately sized and front-loaded, with every part contributing to understanding the tool's function.

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 lack of annotations and output schema, the description is incomplete. It doesn't explain what the test involves, what results to expect (e.g., success/failure status, latency metrics), or potential errors. For a tool that likely interacts with network configurations, more context is needed to guide effective use.

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%, with the parameter 'exchange' clearly documented in the input schema. The description adds no additional meaning beyond the schema (e.g., it doesn't clarify the format of 'exchange' beyond the example in the schema or explain why testing is needed). 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 action ('Test') and the resource ('proxy connection with a specified exchange'), providing a specific verb+resource combination. However, it doesn't distinguish this tool from potential alternatives like 'get-proxy-config' or 'set-proxy-config' among the sibling tools, which would require explicit differentiation for a score of 5.

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 prerequisites (e.g., after configuring a proxy), exclusions, or comparisons to sibling tools like 'get-proxy-config' or 'set-proxy-config', leaving the agent without context for selection.

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/doggybee/mcp-server-ccxt'

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