Skip to main content
Glama

proxy_replay_session

Replay recorded HTTP requests from a session with filtering options and safety previews to test API interactions or debug network traffic.

Instructions

Replay selected requests from a recorded/imported session. Default mode is dry_run for safety.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
session_idYesSession ID
modeNodry_run previews replay plan; execute sends the requestsdry_run
limitNo
offsetNo
sortNodesc
methodNoHTTP method filter
hostname_containsNoFilter by hostname substring
url_containsNoFilter by URL substring
status_codeNoResponse status code filter
from_tsNoUnix ms lower-bound timestamp
to_tsNoUnix ms upper-bound timestamp
textNoGeneric text filter
exchange_idsNoExplicit exchange IDs to replay (overrides query filters)
target_base_urlNoOptional base URL override (keeps original path+query)
timeout_msNoPer-request timeout in milliseconds

Implementation Reference

  • Implementation of the 'proxy_replay_session' tool handler. It registers the tool with the MCP server, defines the input schema using zod, and delegates the execution to `proxyManager.replaySession`.
    server.tool(
      "proxy_replay_session",
      "Replay selected requests from a recorded/imported session. Default mode is dry_run for safety.",
      {
        session_id: z.string().describe("Session ID"),
        mode: z.enum(["dry_run", "execute"]).optional().default("dry_run")
          .describe("dry_run previews replay plan; execute sends the requests"),
        limit: z.number().optional().default(100),
        offset: z.number().optional().default(0),
        sort: z.enum(["asc", "desc"]).optional().default("desc"),
        method: z.string().optional().describe("HTTP method filter"),
        hostname_contains: z.string().optional().describe("Filter by hostname substring"),
        url_contains: z.string().optional().describe("Filter by URL substring"),
        status_code: z.number().optional().describe("Response status code filter"),
        from_ts: z.number().optional().describe("Unix ms lower-bound timestamp"),
        to_ts: z.number().optional().describe("Unix ms upper-bound timestamp"),
        text: z.string().optional().describe("Generic text filter"),
        exchange_ids: z.array(z.string()).optional().describe("Explicit exchange IDs to replay (overrides query filters)"),
        target_base_url: z.string().optional()
          .describe("Optional base URL override (keeps original path+query)"),
        timeout_ms: z.number().optional().default(15000).describe("Per-request timeout in milliseconds"),
      },
      async ({
        session_id,
        mode,
        limit,
        offset,
        sort,
        method,
        hostname_contains,
        url_contains,
        status_code,
        from_ts,
        to_ts,
        text,
        exchange_ids,
        target_base_url,
        timeout_ms,
      }) => {
        try {
          const result = await proxyManager.replaySession(session_id, {
            mode,
            limit,
            offset,
            sort,
            method,
            hostnameContains: hostname_contains,
            urlContains: url_contains,
            statusCode: status_code,
            fromTs: from_ts,
            toTs: to_ts,
            text,
            exchangeIds: exchange_ids,
            targetBaseUrl: target_base_url,
            timeoutMs: timeout_ms,
          });
          return {
            content: [{ type: "text", text: truncateResult({ status: "success", ...result }) }],
          };
        } catch (e) {
          return { content: [{ type: "text", text: JSON.stringify({ status: "error", error: toError(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