Skip to main content
Glama
rahulkr
by rahulkr

clear_proxy

Remove HTTP proxy configurations from Android devices to restore direct network connections for development and testing workflows.

Instructions

Clear HTTP proxy settings

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
device_serialNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The clear_proxy tool handler. Decorated with @mcp.tool() for automatic registration in the MCP server. Executes an ADB command to clear the global HTTP proxy setting by setting it to ":0".
    @mcp.tool()
    def clear_proxy(device_serial: str | None = None) -> str:
        """Clear HTTP proxy settings"""
        return run_adb(["shell", "settings", "put", "global", "http_proxy", ":0"], device_serial)
  • Core utility function used by clear_proxy (and all other tools) to execute ADB commands safely, handling device targeting, timeouts, and error capture.
    def run_adb(args: list[str], device_serial: str | None = None, timeout: int = 30) -> str:
        """Run an ADB command and return output"""
        cmd = ["adb"]
        if device_serial:
            cmd.extend(["-s", device_serial])
        cmd.extend(args)
        
        try:
            result = subprocess.run(cmd, capture_output=True, text=True, timeout=timeout)
            if result.returncode != 0 and result.stderr:
                return f"Error: {result.stderr}"
            return result.stdout
        except subprocess.TimeoutExpired:
            return "Error: Command timed out"
        except Exception as e:
            return f"Error: {str(e)}"
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. 'Clear HTTP proxy settings' implies a write operation that changes device configuration, but it doesn't specify whether this requires specific permissions, if changes are immediate or require reboot, what happens to existing proxy configurations, or potential side effects. This is inadequate for a mutation tool with zero annotation coverage.

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 extremely concise at just three words, front-loading the essential information with zero wasted words. It efficiently communicates the core purpose without unnecessary elaboration.

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 this is a configuration mutation tool with no annotations but with an output schema, the description is minimally adequate. It states what the tool does but lacks important context about behavioral implications, success/failure conditions, and relationship to sibling tools. The existence of an output schema helps but doesn't compensate for the missing behavioral transparency.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has only one optional parameter (device_serial) with 0% schema description coverage. The description doesn't mention parameters at all, which is acceptable since there's only one optional parameter and the schema provides basic information. However, it could clarify when device_serial is needed versus using a default device.

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 ('Clear') and resource ('HTTP proxy settings'), making the purpose immediately understandable. However, it doesn't distinguish this tool from sibling tools like 'set_proxy' or other configuration tools, which would require more specific 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 like 'set_proxy' or other configuration management tools. There's no mention of prerequisites, typical use cases, or what happens after clearing proxy settings.

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/rahulkr/r_adb_mcp_server'

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