Skip to main content
Glama

proxy_session_start

Start persistent network traffic capture for proxy analysis, storing data on disk with configurable session parameters.

Instructions

Start persistent on-disk capture for the current proxy run.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
session_nameNoOptional session name
capture_profileNopreview=body previews only, full=full request/response bodiespreview
storage_dirNoCustom storage directory
max_disk_mbNoSession disk cap in MB

Implementation Reference

  • The handler implementation for the `proxy_session_start` tool, which delegates to `proxyManager.startSession` after verifying that the proxy is running.
    async ({ session_name, capture_profile, storage_dir, max_disk_mb }) => {
      try {
        if (!proxyManager.isRunning()) {
          return { content: [{ type: "text", text: JSON.stringify({ status: "error", error: "Proxy is not running. Start it first with proxy_start." }) }] };
        }
        const session = await proxyManager.startSession({
          sessionName: session_name,
          captureProfile: capture_profile,
          storageDir: storage_dir,
          maxDiskMb: max_disk_mb,
        });
        return {
          content: [{ type: "text", text: JSON.stringify({ status: "success", session }) }],
        };
      } catch (e) {
        return { content: [{ type: "text", text: JSON.stringify({ status: "error", error: toError(e) }) }] };
      }
    },
  • The registration of the `proxy_session_start` tool within the McpServer, including input schema validation using Zod.
    server.tool(
      "proxy_session_start",
      "Start persistent on-disk capture for the current proxy run.",
      {
        session_name: z.string().optional().describe("Optional session name"),
        capture_profile: z.enum(["preview", "full"]).optional().default("preview")
          .describe("preview=body previews only, full=full request/response bodies"),
        storage_dir: z.string().optional().describe("Custom storage directory"),
        max_disk_mb: z.number().optional().default(1024).describe("Session disk cap in MB"),
      },
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