Skip to main content
Glama

add_mock_rule

Append a new conditional rule to an existing mock API endpoint. Token-efficient partial update.

Input Schema

NameRequiredDescriptionDefault
ruleYesA single conditional rule. Rules are evaluated in ascending priority order. The first rule whose conditions ALL match will override the mock's default response. If no rule matches, the mock's default responseBody/responseStatus is returned as the fallback.
mockIdYesDatabase ID of the mock endpoint
projectIdYesDatabase ID of the project

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

C2.9/5.0
Behavior2/5

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

With no annotations, the description carries the full transparency burden, and it discloses little: 'Append' implies persistent mutation but nothing is said about error behavior for a missing mockId, whether the rule can be undone, or whether the created rule is returned. It also omits that rule ordering/evaluation semantics matter, leaving that entirely to nested schema text.

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 short sentences with the action front-loaded and no filler. The second sentence is the weakest part, since 'Token-efficient partial update' is an unsubstantiated marketing fragment rather than information.

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?

For a mutation tool with nested-object parameters, no annotations, and no output schema, the description is thin: it neither describes the result of the append nor the failure modes. The rich schema compensates for the parameter detail, but the behavioral framing an agent needs before writing is largely absent.

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% and the nested rule object is exhaustively documented (operators, conditionLogic, priority, webhook options). The description itself adds nothing about projectId, mockId, or the rule payload, so the baseline 3 applies.

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?

States a specific verb ('Append') and resource ('a new conditional rule to an existing mock API endpoint'), which clearly separates it from remove_mock_rule and update_mock by implication. It does not explicitly name those siblings, so an agent must infer the boundary rather than being told.

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?

The only guidance is the fragment 'Token-efficient partial update,' which vaguely hints at preferring this over update_mock but never names an alternative or a condition for choosing it. There is no statement of prerequisites (mock must already exist) or when this tool should not be used.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources