Skip to main content
Glama
mako10k

Web Proxy MCP Server

by mako10k

proxy_analyze_traffic

Analyze captured HTTP/HTTPS traffic patterns and statistics to monitor proxy activity, identify trends, and group data by domain, method, status, or time period.

Instructions

Analyze captured traffic patterns and statistics

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
domainNoAnalyze specific domain only
timeframeNoTime frame for analysis24h
groupByNoGroup analysis results bydomain

Implementation Reference

  • Tool handler case that validates args, calls trafficAnalyzer.analyzeTraffic(), and formats the response.
    case 'proxy_analyze_traffic':
      if (!this.trafficAnalyzer) {
        return { error: "Traffic analyzer not available", isError: true };
      }
    
      const analysis = this.trafficAnalyzer.analyzeTraffic({
        domain: args.domain,
        timeframe: args.timeframe,
        groupBy: args.groupBy
      });
    
      return {
        content: [{
          type: "text",
          text: `📊 Traffic Analysis (${args.timeframe})\n\n${JSON.stringify(analysis, null, 2)}`
        }]
      };
  • Tool definition with name, description, and inputSchema for validation.
    proxy_analyze_traffic: {
      name: "proxy_analyze_traffic",
      description: "Analyze captured traffic patterns and statistics",
      inputSchema: {
        type: "object",
        properties: {
          domain: {
            type: "string",
            description: "Analyze specific domain only"
          },
          timeframe: {
            type: "string",
            enum: ["1h", "24h", "7d", "30d", "all"],
            description: "Time frame for analysis",
            default: "24h"
          },
          groupBy: {
            type: "string",
            enum: ["domain", "method", "status", "hour"],
            description: "Group analysis results by",
            default: "domain"
          }
        }
      }
    },
  • Core implementation of traffic analysis: filters entries, computes summary stats and grouped data.
    analyzeTraffic(options = {}) {
      const entries = this.getEntries({
        domain: options.domain,
        since: this._getTimeframeSince(options.timeframe || '24h')
      });
    
      if (entries.length === 0) {
        return {
          summary: {
            totalRequests: 0,
            uniqueDomains: 0,
            timeframe: options.timeframe || '24h'
          }
        };
      }
    
      const analysis = {
        summary: {
          totalRequests: entries.length,
          uniqueDomains: new Set(entries.map(e => e.domain)).size,
          timeframe: options.timeframe || '24h',
          avgResponseTime: this._calculateAverage(entries.map(e => e.responseTime)),
          errorRate: entries.filter(e => e.statusCode >= 400).length / entries.length
        },
        grouped: this._groupEntries(entries, options.groupBy || 'domain')
      };
    
      return analysis;
    }
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 'analyze' but doesn't specify what analysis entails (e.g., statistical summaries, trend detection), whether it's read-only or modifies data, or any constraints like rate limits or authentication needs. This leaves significant gaps for a tool that likely processes captured traffic data.

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 appropriately sized for a tool with a clear purpose and well-documented parameters, making it easy to parse and understand quickly.

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 traffic analysis and lack of annotations or output schema, the description is insufficient. It doesn't explain what 'analyze' produces (e.g., aggregated statistics, visualizations), how results are returned, or any prerequisites like needing captured traffic data first. For a tool with 3 parameters and no structured output, more context is needed for 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 clear descriptions for all parameters (domain, timeframe, groupBy) including enums and defaults. The description adds no additional parameter semantics beyond what the schema provides, such as explaining how 'groupBy' affects output or what 'analyze' means in practice. Baseline 3 is appropriate given 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 ('analyze') and resource ('captured traffic patterns and statistics'), making the tool's purpose understandable. It doesn't explicitly differentiate from siblings like 'proxy_get_traffic_log' or 'proxy_get_performance_metrics', which appear to be related but distinct tools for accessing raw logs or specific metrics rather than analyzing patterns.

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 'proxy_get_traffic_log' (likely for raw logs) and 'proxy_get_performance_metrics' (likely for specific metrics), there's no indication of when analysis is preferred over simple retrieval, leaving the agent to guess based on tool names alone.

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/mako10k/mcp-web-proxy'

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