Skip to main content
Glama

proxy_update_rule

Modify HTTP/HTTPS interception rules to capture, mock, or transform network traffic by updating matchers, handlers, and priorities.

Instructions

Modify an existing interception rule.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
rule_idYesRule ID to update
descriptionNoNew description
priorityNoNew priority
matcherNoNew matcher config
handlerNoNew handler config

Implementation Reference

  • The handler implementation for the `proxy_update_rule` tool, which calls `proxyManager.updateRule`.
    server.tool(
      "proxy_update_rule",
      "Modify an existing interception rule.",
      {
        rule_id: z.string().describe("Rule ID to update"),
        description: z.string().optional().describe("New description"),
        priority: z.number().optional().describe("New priority"),
        matcher: matcherSchema.optional().describe("New matcher config"),
        handler: handlerSchema.optional().describe("New handler config"),
      },
      async ({ rule_id, description, priority, matcher, handler }) => {
        try {
          const updates: Record<string, unknown> = {};
          if (description !== undefined) updates.description = description;
          if (priority !== undefined) updates.priority = priority;
          if (matcher !== undefined) updates.matcher = matcher;
          if (handler !== undefined) updates.handler = handler;
    
          const rule = await proxyManager.updateRule(rule_id, updates);
          return {
            content: [{
              type: "text",
              text: JSON.stringify({ status: "success", rule }),
            }],
          };
        } catch (e) {
          return { content: [{ type: "text", text: JSON.stringify({ status: "error", error: String(e) }) }] };
        }
      },
    );

Tool Definition Quality

Score is being calculated. Check back soon.

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