Skip to main content
Glama
mako10k

Web Proxy MCP Server

by mako10k

proxy_add_target

Add a new domain to monitor through the proxy server for traffic analysis, with options to capture headers and body data.

Instructions

Add a new target domain for proxy monitoring

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
domainYesDomain to monitor (e.g., example.com)
descriptionNoOptional description of the target
enabledNoWhether the target is active
captureHeadersNoCapture request/response headers
captureBodyNoCapture request/response body

Implementation Reference

  • Input schema definition for the proxy_add_target tool including domain (required), description, enabled, captureHeaders, and captureBody parameters.
    proxy_add_target: {
      name: "proxy_add_target",
      description: "Add a new target domain for proxy monitoring",
      inputSchema: {
        type: "object",
        properties: {
          domain: {
            type: "string",
            description: "Domain to monitor (e.g., example.com)"
          },
          description: {
            type: "string",
            description: "Optional description of the target"
          },
          enabled: {
            type: "boolean",
            description: "Whether the target is active",
            default: true
          },
          captureHeaders: {
            type: "boolean",
            description: "Capture request/response headers",
            default: true
          },
          captureBody: {
            type: "boolean",
            description: "Capture request/response body",
            default: false
          }
        },
        required: ["domain"]
      }
    },
  • Tool handler case statement that validates arguments, calls targetManager.addTarget, and formats success response with target stats.
    case 'proxy_add_target':
      const added = this.targetManager.addTarget(
        args.domain,
        args.description,
        {
          enabled: args.enabled,
          captureHeaders: args.captureHeaders,
          captureBody: args.captureBody
        }
      );
      return {
        content: [{
          type: "text",
          text: `Target added: ${args.domain}\nStatus: ${added ? 'success' : 'already exists'}\nMonitored domains: ${this.targetManager.getStats().enabled}`
        }]
      };
  • Core addTarget method in TargetManager: normalizes domain, applies defaults for config options, stores in Map, updates PAC file, logs, returns true.
    addTarget(domain, config = {}) {
      // Pre-conditions
      if (!domain || typeof domain !== 'string') {
        throw new Error('Domain is required and must be a string');
      }
    
      const targetConfig = {
        domain: domain.toLowerCase(),
        enabled: config.enabled !== false,
        includeSubdomains: config.includeSubdomains !== false,
        description: config.description || '',
        captureHeaders: config.captureHeaders !== false,  // Default to true
        captureBody: config.captureBody !== false,        // Default to true
        addedAt: new Date(),
        ...config
      };
    
      // Post-conditions: validate critical fields
      console.assert(typeof targetConfig.captureHeaders === 'boolean', 'captureHeaders must be boolean');
      console.assert(typeof targetConfig.captureBody === 'boolean', 'captureBody must be boolean');
      console.assert(typeof targetConfig.enabled === 'boolean', 'enabled must be boolean');
      
      this.targets.set(domain.toLowerCase(), targetConfig);
      this._updatePacFile();
      
      console.log(`✅ Target added: ${domain} (captureHeaders=${targetConfig.captureHeaders}, captureBody=${targetConfig.captureBody})`);
      
      return true;
    }
  • index.js:66-74 (registration)
    MCP ListToolsRequestHandler registration that dynamically exposes proxy_add_target schema from TOOLS object.
    this.server.setRequestHandler(ListToolsRequestSchema, async () => {
      return {
        tools: Object.entries(TOOLS).map(([name, tool]) => ({
          name,
          description: tool.description,
          inputSchema: tool.inputSchema
        }))
      };
    });
  • index.js:77-99 (registration)
    MCP CallToolRequestHandler registration that routes tool calls by name to ToolHandlers.handleTool, enabling proxy_add_target execution.
    this.server.setRequestHandler(CallToolRequestSchema, async (request) => {
      const { name, arguments: args } = request.params;
    
      try {
        const result = await this.toolHandlers.handleTool(name, args || {});
    
        if (result.isError) {
          throw new McpError(
            ErrorCode.InternalError,
            result.error
          );
        }
    
        return result;
    
      } catch (error) {
        console.error(`Tool error [${name}]:`, error.message);
        throw new McpError(
          ErrorCode.InternalError,
          `Tool execution failed: ${error.message}`
        );
      }
    });
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. It states the tool adds a target but doesn't describe what happens after addition (e.g., whether monitoring starts immediately, if there are rate limits, authentication requirements, or potential side effects like server restarts). For a mutation tool with zero annotation coverage, this leaves significant behavioral gaps.

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, focused sentence that immediately conveys the core function without unnecessary words. It's front-loaded with the essential action and resource, making it highly efficient. Every word earns its place in this minimal but complete statement.

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?

For a mutation tool with no annotations and no output schema, the description is insufficiently complete. It doesn't address what the tool returns (success/failure indicators, created target ID), error conditions, or behavioral implications. Given the complexity of adding a monitoring target with multiple configuration parameters, more contextual information would be helpful for the 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?

Schema description coverage is 100%, so the schema fully documents all 5 parameters. The description adds no parameter-specific information beyond what's in the schema (e.g., it doesn't explain domain format constraints or interactions between capture settings). With high schema coverage, the baseline score of 3 is appropriate as the description doesn't enhance parameter understanding.

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 ('Add') and resource ('new target domain for proxy monitoring'), making the purpose immediately understandable. It distinguishes from siblings like 'proxy_list_targets' or 'proxy_remove_target' by specifying creation rather than querying or deletion. However, it doesn't explicitly contrast with 'proxy_update_target' which might share some functional overlap.

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., whether the proxy server must be running), when not to use it, or how it relates to siblings like 'proxy_update_target' for modifying existing targets. The agent must infer usage from the tool name 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