Skip to main content
Glama

proxy_list_tls_fingerprints

Retrieve unique JA3/JA4 TLS client fingerprints from captured proxy traffic, with occurrence counts and hostname filter support.

Instructions

List unique client JA3/JA4 fingerprints across captured traffic with occurrence counts.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoMax fingerprints to return (default: 20)
hostname_filterNoFilter by hostname substring

Implementation Reference

  • The async handler function that executes the tool's logic: filters traffic by optional hostname_filter, aggregates JA3/JA4 fingerprints with counts and associated hostnames, sorts by frequency, and returns truncated JSON results.
    async ({ limit, hostname_filter }) => {
      let traffic = proxyManager.getTraffic();
    
      if (hostname_filter) {
        const h = hostname_filter.toLowerCase();
        traffic = traffic.filter((t) => t.request.hostname.toLowerCase().includes(h));
      }
    
      // Aggregate JA3 fingerprints
      const ja3Counts = new Map<string, { count: number; hostnames: Set<string> }>();
      const ja4Counts = new Map<string, { count: number; hostnames: Set<string> }>();
    
      for (const t of traffic) {
        if (t.tls?.client?.ja3Fingerprint) {
          const fp = t.tls.client.ja3Fingerprint;
          const entry = ja3Counts.get(fp) || { count: 0, hostnames: new Set() };
          entry.count++;
          entry.hostnames.add(t.request.hostname);
          ja3Counts.set(fp, entry);
        }
        if (t.tls?.client?.ja4Fingerprint) {
          const fp = t.tls.client.ja4Fingerprint;
          const entry = ja4Counts.get(fp) || { count: 0, hostnames: new Set() };
          entry.count++;
          entry.hostnames.add(t.request.hostname);
          ja4Counts.set(fp, entry);
        }
      }
    
      // Sort by count descending
      const ja3List = [...ja3Counts.entries()]
        .sort((a, b) => b[1].count - a[1].count)
        .slice(0, limit)
        .map(([fp, { count, hostnames }]) => ({
          fingerprint: fp,
          count,
          hostnames: [...hostnames].slice(0, 5),
        }));
    
      const ja4List = [...ja4Counts.entries()]
        .sort((a, b) => b[1].count - a[1].count)
        .slice(0, limit)
        .map(([fp, { count, hostnames }]) => ({
          fingerprint: fp,
          count,
          hostnames: [...hostnames].slice(0, 5),
        }));
    
      return {
        content: [{
          type: "text" as const,
          text: truncateResult({
            status: "success",
            totalExchangesWithTls: traffic.filter((t) => t.tls?.client).length,
            ja3: ja3List,
            ja4: ja4List,
          }),
        }],
      };
    },
  • Input schema defining optional 'limit' (number, default 20) and 'hostname_filter' (string) parameters for proxy_list_tls_fingerprints.
    {
      limit: z.number().optional().default(20).describe("Max fingerprints to return (default: 20)"),
      hostname_filter: z.string().optional().describe("Filter by hostname substring"),
    },
  • Registration of the tool via server.tool() with name 'proxy_list_tls_fingerprints' and description 'List unique client JA3/JA4 fingerprints across captured traffic with occurrence counts.'
    server.tool(
      "proxy_list_tls_fingerprints",
      "List unique client JA3/JA4 fingerprints across captured traffic with occurrence counts.",
      {
        limit: z.number().optional().default(20).describe("Max fingerprints to return (default: 20)"),
        hostname_filter: z.string().optional().describe("Filter by hostname substring"),
      },
      async ({ limit, hostname_filter }) => {
        let traffic = proxyManager.getTraffic();
    
        if (hostname_filter) {
          const h = hostname_filter.toLowerCase();
          traffic = traffic.filter((t) => t.request.hostname.toLowerCase().includes(h));
        }
    
        // Aggregate JA3 fingerprints
        const ja3Counts = new Map<string, { count: number; hostnames: Set<string> }>();
        const ja4Counts = new Map<string, { count: number; hostnames: Set<string> }>();
    
        for (const t of traffic) {
          if (t.tls?.client?.ja3Fingerprint) {
            const fp = t.tls.client.ja3Fingerprint;
            const entry = ja3Counts.get(fp) || { count: 0, hostnames: new Set() };
            entry.count++;
            entry.hostnames.add(t.request.hostname);
            ja3Counts.set(fp, entry);
          }
          if (t.tls?.client?.ja4Fingerprint) {
            const fp = t.tls.client.ja4Fingerprint;
            const entry = ja4Counts.get(fp) || { count: 0, hostnames: new Set() };
            entry.count++;
            entry.hostnames.add(t.request.hostname);
            ja4Counts.set(fp, entry);
          }
        }
    
        // Sort by count descending
        const ja3List = [...ja3Counts.entries()]
          .sort((a, b) => b[1].count - a[1].count)
          .slice(0, limit)
          .map(([fp, { count, hostnames }]) => ({
            fingerprint: fp,
            count,
            hostnames: [...hostnames].slice(0, 5),
          }));
    
        const ja4List = [...ja4Counts.entries()]
          .sort((a, b) => b[1].count - a[1].count)
          .slice(0, limit)
          .map(([fp, { count, hostnames }]) => ({
            fingerprint: fp,
            count,
            hostnames: [...hostnames].slice(0, 5),
          }));
    
        return {
          content: [{
            type: "text" as const,
            text: truncateResult({
              status: "success",
              totalExchangesWithTls: traffic.filter((t) => t.tls?.client).length,
              ja3: ja3List,
              ja4: ja4List,
            }),
          }],
        };
      },
    );
  • src/index.ts:67-67 (registration)
    Top-level registration call to registerTlsTools(server) which registers all TLS-related tools including proxy_list_tls_fingerprints.
    registerTlsTools(server);
  • truncateResult utility used to serialize/truncate the tool's JSON output to stay within MCP token limits (24000 chars).
    export function truncateResult(data: unknown, indent?: number): string {
      const full = JSON.stringify(data, null, indent);
      if (full.length <= MAX_RESULT_CHARS) return full;
    
      if (Array.isArray(data)) {
        let lo = 0;
        let hi = data.length;
        while (lo < hi) {
          const mid = (lo + hi + 1) >>> 1;
          if (JSON.stringify(data.slice(0, mid), null, indent).length <= MAX_RESULT_CHARS - 200) {
            lo = mid;
          } else {
            hi = mid - 1;
          }
        }
        const truncated = data.slice(0, lo);
        return JSON.stringify({
          items: truncated,
          truncated: true,
          showing: lo,
          total: data.length,
          message: `Showing ${lo} of ${data.length} items. Use filter/limit params to narrow results.`,
        }, null, indent);
      }
    
      return full.slice(0, MAX_RESULT_CHARS - 100) + "\n... [truncated, total " + full.length + " chars]";
    }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description must disclose behavioral traits. It does not state whether the operation is read-only, if it affects capture state, or what scope of traffic is considered (e.g., current session only). The agent cannot infer safety or side effects.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, concise sentence that is front-loaded with the core purpose. Every word adds value; no unnecessary information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description covers the basic functionality adequately for a simple tool with 2 optional parameters and no output schema. However, it lacks context such as read-only nature or that it operates on the current capture session. Sibling tool count is high but not addressed.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% with both parameters described. The description adds no additional parameter semantics beyond the schema, but it does mention 'occurrence counts' in the output, which is helpful. Baseline 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb 'list' and the resource 'unique client JA3/JA4 fingerprints' with additional detail 'occurrence counts'. It distinguishes itself from sibling tools like proxy_get_tls_fingerprints (which likely returns specific details) and proxy_list_fingerprint_presets (presets vs captured traffic).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives (e.g., proxy_get_tls_fingerprints) nor mentions prerequisites like an active capture session. There is no explicit 'when not to use' or context for selection.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

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