Skip to main content
Glama

Loutre

add_rule

Add a conditional response to a route: when the request matches the conditions (query, header, path param, body field), the mock answers with this status, body and latency. Rules are evaluated in order, the first match wins; x-loutre-* headers keep priority.

Input Schema

NameRequiredDescriptionDefault
bodyNoJSON body of the response
nameNoHuman-readable label of the rule
slugYesSubdomain of the mock, e.g. "brisk-otter"
whenYesEvery condition must hold
routeYesRoute identifier, lowercase method: "get:/users/{id}"
statusNo
latencyMsNo
ownerTokenNoOwner token received at creation (not needed when the account is connected with an API token)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

B3.4/5.0
Behavior3/5

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

No annotations exist, so the description carries the full burden. It usefully discloses the evaluation model (ordered, first-match-wins, x-loutre-* header priority) — real behavioral value — but says nothing about authorization (ownerToken vs API token), whether adding a duplicate/conflicting rule errors, or how existing rules are affected.

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 dense sentences with the core action front-loaded and no filler. The second sentence earnestly adds evaluation semantics rather than padding, though it could be split for scanability.

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 an 8-parameter, nested, no-annotation, no-output-schema mutation tool, the description covers matching semantics well but leaves auth requirements and failure/conflict behavior unstated — material gaps given nothing else documents them.

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 75%, so the schema already documents slug, route, when-subfields, ownerToken and the dotted-path body syntax. The description adds the useful framing that conditions span query/header/path param/body field, but contributes no new detail on status, latencyMs, name, or auth parameters.

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?

Opens with a specific verb+resource: 'Add a conditional response to a route', and immediately clarifies the mechanism (conditions match → mock answers with status, body, latency). This distinguishes it from unconditional siblings like set_response, though it never names any sibling explicitly.

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 implies the use case (conditional/route-specific mocking) and gives evaluation context ('rules are evaluated in order, first match wins'), but it never states when to prefer this over set_response or set_behavior, nor any prerequisites or exclusions.

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