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, and fails with ACT-032 if any action's targetVar is not a registered fact.

Input Schema

TableJSON 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. Changed5 schema fields changed
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • removedInput schema / additionalProperties
      Removed value: -false
    • addedInput schema / properties / groupId / pattern
      Added value: +"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    • addedInput schema / properties / ruleId / pattern
      Added value: +"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    • addedInput schema / properties / versionId / pattern
      Added value: +"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
  2. Changed1 schema field changed
    • changedInput schema / properties / rule / description
      Previous value: -"JSON string of UpdateRuleRequest: { name?, priority?, condition?, actions?, mutexGroup?, mutexMode?, mutexStrategy?, mutexLimit?, isEnabled? }"New value: +"JSON string of UpdateRuleRequest: { name?, condition?, actions?, mutexGroup?, mutexMode?, mutexStrategy?, mutexLimit?, isEnabled? }"
  3. First observed

TDQS

A4.5/5.0
Behavior5/5

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

Goes well beyond the destructiveHint=true annotation: it discloses partial-update semantics, hard structural limits on a new condition tree (25 SINGLE nodes, 10 nesting levels), the non-obvious side effect that saving re-validates every action including unchanged ones, and the specific failure code ACT-032 for unregistered targetVar. This is exactly the hidden behavior an agent needs before a destructive mutation.

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 tight sentences, each carrying distinct information: scope, update semantics, and validation constraints. The most load-bearing facts (DRAFT-only, partial update) come first, with no filler.

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

Completeness5/5

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

No output schema exists, yet the description covers what an agent must know: where the update is legal (DRAFT), how partial updates behave, the structural limits on conditions, and the failure mode with its error code. Nothing material is missing for a destructive mutation tool.

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, but the description adds real meaning to the opaque `rule` JSON payload by constraining the condition tree shape and calling out the targetVar requirement on actions. It does not document the other payload keys (mutexGroup, mutexStrategy, etc.) that the schema only names.

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?

States a specific verb (update) and resource (an existing rule) and adds a crucial scope constraint: it only works in a DRAFT version. That scope qualifier distinguishes it from sibling tools like lexq_rules_create, lexq_rules_toggle, and lexq_rules_reorder without the agent needing to open any schema.

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 DRAFT-version restriction implies usage context and the partial-update behavior ('Only provided fields are changed') tells the agent how to call it, but there is no explicit routing guidance — e.g., whether enabling/disabling a rule should go through lexq_rules_toggle instead, or what to do when the rule is in a published version.

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