Skip to main content
Glama

proxy_enable_rule

Enable a disabled network traffic interception rule to resume capturing, modifying, or mocking HTTP/HTTPS traffic through the proxy server.

Instructions

Enable a disabled interception rule.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
rule_idYesRule ID to enable

Implementation Reference

  • The `enableRule` method in `ProxyManager` updates the `enabled` state of the rule and triggers a rebuild of the mockttp server to apply the changes.
    async enableRule(id: string): Promise<void> {
      const rule = this.rules.get(id);
      if (!rule) throw new Error(`Rule '${id}' not found`);
      rule.enabled = true;
      if (this._running) await this.rebuildMockttpRules();
    }
  • The tool handler for `proxy_enable_rule` which calls `proxyManager.enableRule`.
    async ({ rule_id }) => {
      try {
        await proxyManager.enableRule(rule_id);
        return {
          content: [{
            type: "text",
            text: JSON.stringify({ status: "success", message: `Rule '${rule_id}' enabled.` }),
          }],
        };
      } catch (e) {
        return { content: [{ type: "text", text: JSON.stringify({ status: "error", error: String(e) }) }] };
      }
    },
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/yfe404/proxy-mcp'

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