Skip to main content
Glama

proxy_get_session_exchange

Retrieve a specific network exchange from recorded proxy sessions using sequence numbers or exchange IDs to analyze captured traffic.

Instructions

Get one exchange from a recorded session by seq or exchange ID.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
session_idYesSession ID
seqNoSequence number in session
exchange_idNoOriginal exchange ID
include_bodyNoInclude persisted full body data when available

Implementation Reference

  • Implementation of the proxy_get_session_exchange tool handler. It validates input and calls proxyManager.getSessionExchange.
    server.tool(
      "proxy_get_session_exchange",
      "Get one exchange from a recorded session by seq or exchange ID.",
      {
        session_id: z.string().describe("Session ID"),
        seq: z.number().optional().describe("Sequence number in session"),
        exchange_id: z.string().optional().describe("Original exchange ID"),
        include_body: z.boolean().optional().default(true).describe("Include persisted full body data when available"),
      },
      async ({ session_id, seq, exchange_id, include_body }) => {
        try {
          if (seq === undefined && !exchange_id) {
            return { content: [{ type: "text", text: JSON.stringify({ status: "error", error: "Provide seq or exchange_id." }) }] };
          }
          const result = await proxyManager.getSessionExchange(session_id, {
            seq,
            exchangeId: exchange_id,
            includeBody: include_body,
          });
          return {
            content: [{ type: "text", text: truncateResult({ status: "success", ...result }) }],
          };
        } catch (e) {
          return { content: [{ type: "text", text: JSON.stringify({ status: "error", error: toError(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