Skip to main content
Glama

browser_har_export

Export and finalize the HAR file from a browser recording session, closing the session and optionally copying the HAR to a specified output path.

Instructions

Finalize and return the HAR file path for a recording session.

    NOTE: This CLOSES the session — Playwright only flushes the HAR buffer when
    the browser context closes. The session must have been created with record_har=True.

    output_path: copy the finished HAR to this path (e.g. 'results/run1.har').
        If omitted, the HAR stays at its auto-generated path under data/har/.

    Non-destructive checkpoint pattern (to keep browsing after capturing traffic):
      1. browser_storage_state(path='data/checkpoint.json')   # save auth/cookies
      2. browser_har_export()                                  # closes session, flushes HAR
      3. browser_new_session(storage_state='data/checkpoint.json')  # resume
    

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
session_idNo
output_pathNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

Clearly warns that the tool CLOSES the session because Playwright flushes HAR only on context close. Annotations are absent, so description carries full burden – it adequately discloses the side effect but doesn't cover error conditions or what happens if no session exists.

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

Conciseness4/5

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

Description is compact with front-loaded purpose. The checkpoint pattern adds valuable usage context without being verbose. Could be slightly shorter, but every sentence serves a purpose.

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

Completeness4/5

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

Given 2 optional parameters and a moderate complexity tool, the description covers the key side effect (session close) and provides a usage pattern. Missing session_id param explanation, but overall it's quite complete for the function.

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 description coverage is 0%, so description must compensate. It explains output_path with default behavior and example, but session_id is completely undocumented. Only one of two parameters gets semantic context.

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 'Finalize and return the HAR file path for a recording session' – a specific verb and resource. It distinguishes itself from 70+ sibling browser tools by being the only HAR export function.

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

Usage Guidelines5/5

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

Explicitly says use only with sessions created with record_har=True and provides a detailed non-destructive checkpoint pattern for continuing browsing after export, including exact steps and alternative tools (browser_storage_state, browser_new_session).

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/Evil-Bane/eyebrowse'

If you have feedback or need assistance with the MCP directory API, please join our Discord server