Skip to main content
Glama
dandgabr
by dandgabr

Mitm Modify Headers

mitm_modify_headers

Modify HTTP headers in intercepted traffic: set a new value or remove an existing header on requests or responses matching your filter.

Instructions

Set or remove an HTTP header on matching requests/responses (mitmproxy modify_headers).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
paramsYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
okYes
errorNo
rule_idNo
rendered_specNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

C2.9/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It conveys a mutating effect, but does not disclose that SET replaces existing headers, REMOVE deletes matching headers and adds nothing back, or that filter_expression controls request/response direction; these details live in the schema rather than the tool description.

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 front-loaded sentence with no filler. It names the action, target, and scope immediately, making every word useful.

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?

An output schema and a rich nested input schema cover much of the invocation burden. The description is sufficient as a purpose statement but incomplete on its own for a mutation tool with no annotations, leaving operational caveats and usage context to be discovered from the schema.

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

Parameters2/5

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

The description gives no parameter-level guidance: it does not explain session_id, header_name, header_value, operation, or filter_expression. 'Set or remove' and 'matching' map only loosely onto the schema, and with schema description coverage reported at 0%, the description needed to compensate and did not.

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

Purpose4/5

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

The description names a concrete action ('set or remove'), a resource ('HTTP header'), and a scope ('matching requests/responses'), so an agent can understand what this tool does at a glance. It maps to the underlying mitmproxy option, but it does not explicitly distinguish itself from the sibling mitm_modify_body beyond the header/body distinction.

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?

There is no guidance about when to use this tool versus alternatives such as mitm_modify_body or mitm_filter_flows, and no exclusions or prerequisites. The phrase 'matching requests/responses' hints at filtering, but does not tell the agent when this tool should or should not be chosen.

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