Skip to main content
Glama

Set the routing rules of a listener

set_rules
DestructiveIdempotent

REPLACES the http/https listener's rules: each sends a hostname and/or path prefix to an http pool (up to 25). They are evaluated most specific first, whatever the order sent; anything unmatched goes to the default pool. No wildcard hostname on https. Each https hostname gets a certificate once it points to the load balancer. Scope: network.write.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "lb": "<lb>",
      "listener": "<listener>",
      "rules": "<rules>"
    },
    "name": "set_rules"
  }
}

Input Schema

NameRequiredDescriptionDefault
lbYesLoad balancer id, as returned by list_load_balancers or create_load_balancer.
rulesYesThe listener's full list of rules, up to 25; [] sends everything to the default pool.
listenerYesListener id, from get_load_balancer.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / rules / description
      Added value: +"The listener's full list of rules, up to 25; [] sends everything to the default pool."
  2. First observed

TDQS

A4.5/5.0
Behavior5/5

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

Annotations already declare destructive=true, idempotent=true, openWorld=true, and the description adds substantial behavior beyond them: the entire existing rule set is destroyed and replaced, evaluation precedence is independent of send order, unmatched requests hit the default pool, wildcard hostnames are rejected on https, and certificates are provisioned as a side effect. It also declares the required write scope, which annotations cannot express.

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?

Tight and front-loaded, with the replacement verb and 25-rule limit in the first clause. The remaining sentences are all substantive constraints, though the dense packing of four separate caveats into one paragraph makes it slightly harder to scan than it could be.

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?

For a destructive, idempotent mutation with no output schema, the definition covers replacement semantics, precedence, fallback routing, https restrictions, certificate side effects, and required scope. The main remaining gap is what the call returns or how it reports per-rule validation failures on a malformed https wildcard.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3; the description earns extra credit by explaining that order within the rules array is semantically irrelevant and that specificity drives matching, which the schema's per-field descriptions do not convey. The 25-rule cap and hostname/path-prefix roles are largely mirrored from the schema, keeping it short of a 5.

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?

Opens with a specific verb in caps ('REPLACES') bound to a precise resource (the http/https listener's rules) and explains what a rule is (hostname and/or path prefix to an http pool). An agent can immediately tell this is a full-list write on listener routing, distinct from upsert_listener or set_targets.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Makes the replacement semantics unmistakable and adds evaluative context: rules are matched most-specific-first regardless of submitted order, unmatched traffic falls to the default pool, and https cannot use wildcard hostnames. It stops short of naming an alternative tool or stating when to prefer a full set versus an incremental upsert, so it is clear but not fully routed.

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.