Skip to main content
Glama
dandgabr
by dandgabr

Mitm Set Map Local

mitm_set_map_local

Rewrite matching URL requests to serve a mocked response from an allowlisted local file or directory. Use a regex pattern to route traffic to local content.

Instructions

Serve a mocked response for requests matching a URL regex from a local file or directory. The path MUST be inside allowed_mock_roots (R3).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
paramsYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
okYes
errorNo
rule_idNo
rendered_specNo
canonical_pathNoCanonical, allowlist-validated path that was registered.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.5/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 behavioral disclosure burden. It explains the high-level effect and the path constraint, but does not disclose that this mutates mitmproxy rule state, requires an active session, or say whether existing matching rules are replaced or overridden.

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?

Two sentences with no redundancy: the first states the action and target, the second adds the essential constraint. The most important operational rule is front-loaded.

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?

The nested schema plus output schema cover the parameter details and return value shape, so the description need not repeat those. However, with no annotations and no mention of session-state requirements or rule-replacement behavior, the description is only minimally complete for a state-changing tool.

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?

The tool description itself adds no parameter-level detail, but the nested schema thoroughly documents url_pattern, local_path, filter_expression, and the strict-path/allowlist preconditions. Although the context signal reports 0% top-level coverage, the schema does the semantic heavy lifting, so the baseline of 3 is appropriate.

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 uses a specific verb ('Serve') and clearly identifies the resource: requests matching a URL regex. It also specifies the source ('local file or directory'), distinguishing it from the sibling mitm_set_map_remote without ambiguity.

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 description makes the core use case clear and states the critical allowlist precondition ('path MUST be inside allowed_mock_roots'), but it does not explicitly say when to prefer this over mitm_set_map_remote or other mock/modify tools. Usage guidance is therefore implied rather than explicit.

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