Skip to main content
Glama
getproxykit

ProxyKit-mcp

Official

Create mock rule

create_mock_rule

Create a persistent mock rule that matches HTTP requests across the capture proxy and standalone mock server, returning the saved rule with its assigned ID.

Instructions

Create a mock rule. The rule fires for matching requests through both the capture proxy and the standalone mock server, and is persisted in the engine database. Returns the created rule with its assigned id.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesHuman-readable rule name.
methodYesHTTP method to match. Use "*" for any method.
dynamicNoEnable response_body templating.
enabledNoWhether the rule is active. Defaults to true.
delay_msNoArtificial response delay in milliseconds.
status_codeYesResponse status code 100–599.
url_patternYesGlob, regex, or literal path matched against the request URL.
response_bodyNoResponse body verbatim. Use templating tokens like {{faker.name}} / {{uuid}} / {{now}} when dynamic=true.
response_headersNoMap of header name → value to attach to the mocked response.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.6/5.0
Behavior4/5

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

Annotations already declare readOnly=false, idempotent=false, destructive=false, so the write profile is covered. The description adds genuine context beyond that: the rule fires in two distinct interception paths and is persisted in the engine database, which tells the agent about scope and durability.

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?

Three sentences, front-loaded with purpose, then behavior, then return value. Nothing is redundant and each sentence carries distinct information.

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

Completeness4/5

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

With no output schema, the description usefully states that it returns the created rule with its assigned id, and it covers persistence and firing scope for a 9-parameter mutation tool. The only gap is the absence of any hint about where this sits relative to create_mock_from_request.

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 description coverage is 100% across all 9 parameters, so the schema already documents name, method, url_pattern, status_code, dynamic templating tokens, headers, and delay. The description adds no parameter-level detail, which is the correct baseline when the schema does the heavy lifting.

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 states a specific verb+resource ("Create a mock rule") and clarifies the runtime scope: the rule fires through both the capture proxy and the standalone mock server. It does not differentiate itself from the sibling create_mock_from_request, which is a plausible confusion point, so it falls short of a 5.

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 when-to-use guidance and no mention of the alternative create_mock_from_request, which creates a mock from observed traffic versus this tool's manual rule definition. The behavioral scope hints at where the rule applies but gives the agent no routing criteria.

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