Skip to main content
Glama

redact_har

Creates a sanitized HAR copy for safe sharing by masking authorization headers, cookies, tokens, passwords, API keys, query strings, and body secrets. Review the output before sharing.

Instructions

Write a sanitized copy of a HAR that is safe to share: masks Authorization, Cookie/Set-Cookie, tokens/passwords/API keys in headers, query strings, JSON and form bodies (and JWT/GitHub/AWS-shaped values anywhere). Streamed, so large files work. NEVER overwrites: fails if output exists. output must be inside the allowed directories. Review the result before sharing: secrets with innocent names buried in URL paths or HTML cannot be recognised.

Input Schema

NameRequiredDescriptionDefault
pathYes
outputYes

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.5/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and does so well: it discloses streaming behavior for large files, a hard no-overwrite guarantee ('fails if `output` exists'), a path sandbox restriction ('must be inside the allowed directories'), and an honest limitation that innocent-named secrets in URL paths or HTML cannot be recognised. These are exactly the operational traits an agent needs before invoking a file-writing tool.

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?

Four tight sentences, front-loaded with the action and redaction scope, then constraints, then the caveat. Every clause delivers actionable information; there is no filler or restatement of the name.

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

Completeness5/5

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

For a two-parameter file-writing tool with no annotations and an output schema available, this covers the essentials: what is masked, write safety, sandbox limits, and residual risk. Return values are correctly omitted since the output schema exists, and no contradicting or missing behavior leaves the agent unable to call it correctly.

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

Parameters4/5

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

Schema coverage is 0%, so the description must compensate, and it does for `output`: it is inside allowed directories and must not already exist. `path` (the source HAR) is only implicitly identifiable from 'of a HAR' — its existence requirements and path-format expectations are never stated, leaving one of two parameters under-specified.

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?

Opens with a specific verb+resource+outcome: 'Write a sanitized copy of a HAR that is safe to share'. It then enumerates exactly what is redacted (Authorization, Cookie/Set-Cookie, tokens/passwords/API keys in headers, query strings, JSON and form bodies), which distinguishes it unambiguously from the read-only analysis siblings like har_overview and request_detail.

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

Usage Guidelines3/5

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

The use case is implied rather than stated: 'safe to share' plus 'Review the result before sharing' signals this is a pre-sharing sanitization step. However, it never explicitly says when to pick this over siblings, nor does it name any alternative or exclusion case (e.g. what to do if the user just wants to inspect a HAR).

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