Skip to main content
Glama

Update Rule

lexq_rules_update
Destructive

Update an existing rule in a DRAFT version. Only provided fields are changed. A new condition tree must stay within 25 conditions (SINGLE nodes) and 10 levels of nesting below the root. Saving re-checks every action in the rule, including ones you did not change. Saving fails with P-064 if a value in the new condition tree or in any action is over the value limits that lexq_rules_create lists, with ACT-032 if an action's targetVar is not a registered fact, with ACT-035 if a MUTATE_FACT uses a registered fact that is not a NUMBER fact, and with ACT-036 if a SET_FACT value does not match the data type of its targetVar.

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": {
      "groupId": "<groupId>",
      "versionId": "<versionId>",
      "ruleId": "<ruleId>",
      "rule": "<rule>"
    },
    "name": "lexq_rules_update"
  }
}

Input Schema

NameRequiredDescriptionDefault
ruleYesJSON string of UpdateRuleRequest: { name?, condition?, actions?, mutexGroup?, mutexMode?, mutexStrategy?, mutexLimit?, isEnabled? }
ruleIdYesRule ID
groupIdYesPolicy group ID
versionIdYesVersion ID

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.3/5.0
Behavior5/5

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

Although annotations already establish mutation and destructiveness, the description adds substantial behavior beyond them: partial update semantics, a condition-tree size and nesting cap, full revalidation of every action including unchanged ones, and the exact failure codes (P-064, ACT-032, ACT-035, ACT-036) with their triggering conditions. This is precisely the pre-call context an agent needs before mutating a rule.

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?

The description is front-loaded with the core action and partial-update rule before moving into constraints and error codes. The final error-code sentence is long and would benefit from a list or line breaks, but no sentence is filler and every constraint stated is operationally relevant.

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 mutation with no output schema, the description covers update semantics, validation rules, and failure modes well. It does not address authorization expectations, concurrency/staleness, or how to retrieve the current rule before updating, which keeps it from a 5.

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 100% and the rule payload shape is documented in the schema, so the structured data carries the parameter burden. The description adds useful constraints on the rule's condition tree and actions, but does not add field-level meaning beyond what the schema provides, matching the baseline for full coverage.

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?

The description opens with a specific verb and resource ('Update an existing rule') plus a scope qualifier ('in a DRAFT version'), which distinguishes it from sibling create/delete/toggle/get operations. An agent can identify exactly what this tool does without opening the schema.

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?

It gives the governing precondition (the rule must be in a DRAFT version) and clarifies partial-update semantics ('Only provided fields are changed'), which is the key invocation pattern. It stops short of naming alternatives or exclusion cases, such as what to do for a non-draft rule, so it earns a solid 4 rather than 5.

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.