Skip to main content
Glama

toggleHttpsInterception

Enable or disable HTTPS interception to manage and monitor network requests through the Whistle proxy server. Control secure traffic analysis for improved debugging and rule management.

Instructions

启用或禁用HTTPS拦截

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
enabledYes是否启用HTTPS拦截

Implementation Reference

  • src/index.ts:350-360 (registration)
    Registers the 'toggleHttpsInterception' MCP tool with name, description, input schema, and handler function that proxies to WhistleClient.
    server.addTool({
      name: "toggleHttpsInterception",
      description: "启用或禁用HTTPS拦截",
      parameters: z.object({
        enabled: z.boolean().describe("是否启用HTTPS拦截"),
      }),
      execute: async (args) => {
        const result = await whistleClient.toggleHttpsInterception(args.enabled);
        return formatResponse(result);
      },
    });
  • MCP tool handler (execute function) that calls the underlying WhistleClient method and formats the response.
    execute: async (args) => {
      const result = await whistleClient.toggleHttpsInterception(args.enabled);
      return formatResponse(result);
    },
  • Zod schema defining the input parameter 'enabled' as boolean for toggling HTTPS interception.
    parameters: z.object({
      enabled: z.boolean().describe("是否启用HTTPS拦截"),
    }),
  • Core helper method in WhistleClient class that performs the actual HTTP POST to toggle HTTPS interception in Whistle server.
    async toggleHttpsInterception(enabled: boolean): Promise<any> {
      const formData = new URLSearchParams();
      formData.append("clientId", `${Date.now()}-${Math.floor(Math.random() * 100)}`);
      formData.append("interceptHttpsConnects", enabled ? "1" : "0");
    
      const response = await axios.post(
        `${this.baseUrl}/cgi-bin/intercept-https-connects`,
        formData,
        {
          headers: {
            "Content-Type": "application/x-www-form-urlencoded",
          },
        }
      );
      return response.data;
    }
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. It states the tool enables or disables HTTPS interception, implying a mutation operation, but doesn't disclose behavioral traits such as permissions required, side effects, whether changes are reversible, or rate limits. This is a significant gap 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 a single, efficient sentence in Chinese that directly states the tool's function without any wasted words. It's appropriately sized and front-loaded, 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.

Completeness2/5

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

Given this is a mutation tool with no annotations and no output schema, the description is incomplete. It lacks information about what the tool returns, error conditions, or the impact of toggling HTTPS interception (e.g., on security or performance). The description should provide more context to compensate for the missing structured data.

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?

The schema description coverage is 100%, with the single parameter 'enabled' clearly documented in the schema as a boolean for enabling/disabling HTTPS interception. The description doesn't add any meaning beyond what the schema provides, so the baseline score of 3 is appropriate given the schema handles the parameter documentation.

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 ('启用或禁用' meaning 'enable or disable') and the resource ('HTTPS拦截' meaning 'HTTPS interception'), providing a specific verb+resource combination. However, it doesn't differentiate from sibling tools like 'toggleHttpInterception' or 'toggleProxy', which have similar toggle patterns but target different resources.

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 'toggleHttpInterception' or 'toggleProxy', nor does it mention prerequisites or exclusions. It's a basic functional statement without context about appropriate scenarios.

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/7gugu/whistle-mcp'

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