Skip to main content
Glama
dandgabr
by dandgabr

Mitm Modify Body

mitm_modify_body

Replace matched text in HTTP request/response payloads using regex substitution. Apply rules to selected flows to modify or delete body fragments.

Instructions

Regex-substitute inside matching request/response payloads (mitmproxy modify_body, DOTALL).

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

B3.1/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 reveals that the tool mutates payloads and applies DOTALL regex, but it does not disclose side effects, whether both directions are handled, how filtering selects items, reversibility, or any permissions/session requirements.

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; the primary verb and target are first, and the parenthetical adds the mitmproxy reference. It is as compact as possible while conveying the core action.

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

Completeness2/5

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

For a mutating tool with a nested rule object and a filter_expression parameter, the description is too thin. It lacks information about session context, scope of matching, and when to use payload modification, though the presence of an output schema reduces the need to document return values.

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?

Schema description coverage is 0%, so the tool description should compensate, but it only restates regex substitution and DOTALL. It does not explain the rule object, pattern/replacement syntax, filter_expression semantics, or session_id usage, leaving parameter understanding to the nested schema alone.

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 opens with a specific operation ('Regex-substitute') and a specific resource ('matching request/response payloads'), and it names the mitmproxy primitive 'modify_body'. This is enough for an agent to distinguish it from payload-agnostic siblings like mitm_modify_headers or mitm_execute_command.

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 choose this tool over alternatives, no exclusion criteria, and no mention of prerequisites such as an active proxy session. The intended context must be inferred entirely from the operation name.

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