Skip to main content
Glama
mako10k

Web Proxy MCP Server

by mako10k

proxy_get_pac_file

Retrieve the current Proxy Auto-Configuration (PAC) file content to configure browser proxy settings for automated web traffic monitoring and analysis.

Instructions

Get the current PAC (Proxy Auto-Configuration) file content

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
proxyHostNoProxy server hostlocalhost
proxyPortNoProxy server port

Implementation Reference

  • The main handler logic for the proxy_get_pac_file tool. It calls targetManager.generatePacFile to generate the PAC content and returns it formatted as a text response with syntax highlighting.
    case 'proxy_get_pac_file':
      const pacContent = this.targetManager.generatePacFile(
        args.proxyHost,
        args.proxyPort
      );
      
      return {
        content: [{
          type: "text",
          text: `📄 PAC File Content:\n\n\`\`\`javascript\n${pacContent}\n\`\`\``
        }]
      };
  • Tool schema definition including name, description, and input validation schema for proxyHost and proxyPort parameters.
    proxy_get_pac_file: {
      name: "proxy_get_pac_file",
      description: "Get the current PAC (Proxy Auto-Configuration) file content",
      inputSchema: {
        type: "object",
        properties: {
          proxyHost: {
            type: "string",
            description: "Proxy server host",
            default: "localhost"
          },
          proxyPort: {
            type: "number",
            description: "Proxy server port",
            default: 8080
          }
        }
      }
    },
  • Supporting utility function that generates the actual PAC file JavaScript content based on currently enabled proxy targets, handling subdomains and formatting the proxy rules.
      generatePacFile(proxyHost = 'localhost', proxyPort = 8080) {
        const enabledTargets = Array.from(this.targets.values())
          .filter(target => target.enabled);
    
        const domainChecks = enabledTargets.map(target => {
          if (target.includeSubdomains) {
            return `    if (host === "${target.domain}" || host.endsWith(".${target.domain}")) return "PROXY ${proxyHost}:${proxyPort}";`;
          } else {
            return `    if (host === "${target.domain}") return "PROXY ${proxyHost}:${proxyPort}";`;
          }
        }).join('\n');
    
        return `function FindProxyForURL(url, host) {
        host = host.toLowerCase();
        
        // Proxy specific domains through our proxy server
    ${domainChecks}
        
        // All other traffic goes direct
        return "DIRECT";
    }
    
    // Generated by Web Proxy MCP Server
    // Last updated: ${new Date().toISOString()}
    // Active targets: ${enabledTargets.length}`;
      }
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 a read operation ('Get'), implying it's likely non-destructive, but does not specify if authentication is required, rate limits apply, or what the output format is. For a tool with zero annotation coverage, this is a significant gap in transparency.

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, clear sentence that efficiently conveys the tool's purpose without unnecessary words. It is front-loaded and appropriately sized, making it easy to understand at a glance.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity is low (simple retrieval with two optional parameters) and schema coverage is high, the description is adequate but incomplete. It lacks output details (no output schema) and behavioral context, which are important for a tool in a proxy management context. It meets minimum viability but has clear gaps.

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 both parameters ('proxyHost' and 'proxyPort') well-documented in the schema, including defaults. The description adds no additional meaning beyond the schema, such as explaining how these parameters affect the PAC file retrieval. With high schema coverage, the baseline score of 3 is appropriate.

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 verb 'Get' and the resource 'current PAC (Proxy Auto-Configuration) file content', making the purpose specific and understandable. However, it does not distinguish this tool from siblings like 'proxy_get_performance_metrics' or 'proxy_get_traffic_log', which also retrieve data but for different resources, so it lacks explicit differentiation.

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, such as when to retrieve PAC file content instead of other proxy-related data like traffic logs or performance metrics. There is no mention of prerequisites, context, or exclusions, leaving usage entirely implicit.

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