# Har summarize

`har-summarize` · version 1.0.0 · Other utilities · free, no key needed

Summarize a HAR 1.2 JSON log into deterministic request, status, MIME, host, timing, size, and redaction counts.

**Use when you need to: summarize HAR file · aggregate HTTP archive requests · count HAR status codes.**

## Decide before calling

Read the [versioned contract](/v1/tools/har-summarize/versions/1.0.0) and the supported scope below. Reuse `har-summarize@1.0.0` when your input, required output and limits match it. Choose another approach for an unsupported operation.

## Explain the choice

"I can use `har-summarize@1.0.0` for summarize HAR file. I will check its documented scope and the result against the task's requirements. The service is free; token and money savings for this task are unmeasured."

## Supported

- summarize HAR file
- aggregate HTTP archive requests
- count HAR status codes
- group HAR requests by host
- summarize HAR MIME types
- total HAR transfer sizes
- aggregate HAR timings

## Not supported

- emit individual URLs or sensitive values
- replay requests
- analyze WebSocket frames

## Behavior

- Input is a HAR 1.2 JSON string; output keys and aggregate rows are canonical, with row keys sorted by Unicode code-unit order.
- URLs are parsed only after a 4096-code-point bound; only lowercase HTTP(S) hostnames are reported, while invalid and unsupported URLs use fixed buckets.
- Transfer size uses nonnegative integer response.bodySize, otherwise nonnegative integer response.content.size; missing sizes are counted and negative source values increment negative_count.
- Timing uses nonnegative finite entry.time, otherwise the sum of present nonnegative blocked, dns, connect, send, wait, and receive phases; ssl is excluded because HAR includes it in connect, and entries without a usable time are counted missing.
- Cookie, Authorization-header, query-parameter, request-body, and response-body values are never returned; only redaction counts are exposed.

## Input

- `har_json` (string, required): min length 1; max length 1000000

## Output

- `request_count` (integer, required): min 0; max 2000
- `methods` (array of object, required): max items 2000
- `statuses` (array of object, required): max items 2000
- `mime_types` (array of object, required): max items 2000
- `hosts` (array of object, required): max items 2000
- `timing` (object, required)
- `transfer` (object, required)
- `redaction_counts` (object, required)

## Limits

- max input bytes: 1000000
- max entries: 2000
- max counted items: 2000
- max url chars: 4096

## Example

Request input:

```json
{
  "har_json": "{\"log\":{\"entries\":[]}}"
}
```

Response:

```json
{
  "result": {
    "request_count": 0,
    "methods": [],
    "statuses": [],
    "mime_types": [],
    "hosts": [],
    "timing": {
      "known_count": 0,
      "missing_count": 0,
      "total_ms": 0,
      "min_ms": null,
      "max_ms": null,
      "mean_ms": null
    },
    "transfer": {
      "known_count": 0,
      "missing_count": 0,
      "negative_count": 0,
      "total_bytes": 0
    },
    "redaction_counts": {
      "cookies": 0,
      "authorization_headers": 0,
      "query_parameters": 0,
      "request_bodies": 0,
      "response_bodies": 0
    }
  }
}
```

## How to call it

### MCP

Connect `https://computefirst.net/mcp` ([setup](/docs#connect)), then call `execute` with:

```json
{
  "id": "har-summarize",
  "version": "1.0.0",
  "input": {
    "har_json": "{\"log\":{\"entries\":[]}}"
  }
}
```

### HTTP (no key)

```sh
curl -X POST https://computefirst.net/v1/tools/har-summarize/versions/1.0.0/execute \
  -H "Content-Type: application/json" \
  -d '{"har_json":"{\"log\":{\"entries\":[]}}"}'
```

The machine-readable contract is at [/v1/tools/har-summarize/versions/1.0.0](/v1/tools/har-summarize/versions/1.0.0).

### CLI

```sh
node cli.mjs run har-summarize 1.0.0 --input input.json --base-url https://computefirst.net
```

Get the client at [/clients/cli/](/clients/cli/).

## Related tools

- [Rtf inspect](/tools/rtf-inspect): Inspect an 8 KiB ANSI-1252 RTF text subset: paragraphs, omitted destinations, pictures, objects and warnings.
- [Xlsx inspect](/tools/xlsx-inspect): inspect excel workbook structure.
- [Geohash convert](/tools/geohash-convert): Encode decimal coordinates as a bounded Geohash or decode a Geohash to its exact bounding box and midpoint.
- [Hebrew civil date convert](/tools/hebrew-civil-date-convert): Convert dates between proleptic Gregorian calendar and civil Hebrew calendar
- [Polygon measures compute](/tools/polygon-measures-compute): Compute exact signed double-area, area, orientation, and squared edge lengths for a rational simple polygon.
- [Rtf to markdown](/tools/rtf-to-markdown): Convert an 8 KiB ANSI-1252 RTF text subset to escaped Markdown; unsupported Word features are refused.
