Skip to main content
Glama

add_map_local

Destructive

Create temporary request mocks that substitute custom bodies, headers, and status codes for matching URL patterns, with optional body-only mode and TTL expiry.

Instructions

Mock responses: matching requests get this content instead of (or, with mode=body_only, on top of) the server's answer. Expires after ttl (default 1h).

Input Schema

NameRequiredDescriptionDefault
ttlNo1h
urlYesURL pattern with * wildcards, e.g. https://api.example.com/v2/feed*
bodyNoResponse body text (use this or file)
fileNoAbsolute path of a file to serve; read on every request
modeNofull
nameNo
statusNo
headersNoExtra response headers {name: value}
methodsNoOnly these methods (default any)
content_typeNoDefault: guessed from the body or file extension
graphql_operationNoOnly this GraphQL operation (mock one query of a /graphql endpoint)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

C2.8/5.0
Behavior3/5

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

Annotations already declare destructiveHint=true and openWorldHint=true, but the description adds useful override semantics: matching requests get content instead of or on top of the server answer via mode=body_only, and the mapping expires after ttl (default 1h). It does not cover persistence, matching precedence, or conflicts with existing maps, leaving a gap for a destructive mutation tool.

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?

Two sentences, front-loaded with the core effect and then the expiry constraint. Efficient, but 'Mock responses' as an opening noun phrase is slightly less scannable than a direct action statement.

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 an 11-parameter, destructive mutation tool with no output schema, the description is thin. It explains override and TTL behavior but omits persistence, matching/ordering rules, conflict handling, and how the local map relates to remove_rule or add_map_remote.

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 coverage is 64%, and the description adds meaning for mode ('on top of' vs 'instead of') and ttl (default 1h), which the enum/default alone don't explain. However, it does not touch url wildcards, body/file exclusivity, headers, methods, or graphql_operation, so several parameters remain undocumented outside the schema.

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

Purpose3/5

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

The description explains the effect of a mock mapping ('matching requests get this content instead of... the server's answer') but never frames the tool as 'add a local mock map' and does not distinguish it from the sibling add_map_remote. The purpose is inferable but not stated with a clear verb+resource.

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 on when to use this tool versus add_map_remote, add_rewrite, or other siblings, and no prerequisites or exclusions are mentioned. The only implied usage is broad ('mock responses').

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