Skip to main content
Glama

create_usem_rule

Create a USEM/VR automation rule. Provide the rule_type and a fields object matching that table allowlist (e.g. name/rule_name, active, order, condition, assignment_group, ttr_max).

Instructions

Create a USEM/VR automation rule. Provide the rule_type and a fields object matching that table allowlist (e.g. name/rule_name, active, order, condition, assignment_group, ttr_max). Every field is read back after the write; a value ServiceNow did not store fails with FIELDS_NOT_SAVED. remediation_task with assignment_type 5 (Group by field) also needs assignment_group_fields — a field path on the finding that matches one of field_1..6 (e.g. "assignment_group"). The Table API cannot write that field, so it is set by a run-once server script and additionally requires SCRIPTING_ENABLED=true. Create rules inactive and enable them with set_usem_rule_active after checking them. [Write — requires WRITE_ENABLED=true; admin-level config change]

Input Schema

NameRequiredDescriptionDefault
fieldsYesColumn/value map for the rule record. Schema allows the union of all USEM rule fields; runtime also restricts fields to the selected rule_type.
rule_typeYesWhich rule family to operate on: assignment (sn_sec_wf_assign_rule), remediation_task, remediation_target (TTR/SLA targets), risk_calculator + calculator_rule + risk_field + risk_score_weight + calculator_config (risk scoring), classification + classification_rule, exception_rule + exception_config, rollup (score rollup), approval, auto_close, exclusion
wait_secondsNoOnly used for script-written fields (assignment_group_fields): how long to wait for the run-once job (0-120, default 60).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.15.1

TDQS

A4.8/5.0
Behavior5/5

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

Goes well beyond the annotations (which only say write, non-destructive, non-idempotent, open-world). It discloses read-back verification with the FIELDS_NOT_SAVED failure mode, the Table API's inability to write assignment_group_fields and the run-once script workaround, the SCRIPTING_ENABLED gate, and the WRITE_ENABLED admin-level requirement. No contradiction with readOnlyHint=false.

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?

Purpose is front-loaded, every sentence carries non-redundant information, and the density is justified by the tool's complexity. The long conditional sentence about remediation_task/assignment_group_fields is heavy, and the WRITE_ENABLED gate sits in a trailing bracketed tag rather than near the front, which is a minor structural weakness.

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?

With no output schema, the description still explains return behavior via the read-back guarantee and the FIELDS_NOT_SAVED error. Prerequisites, side effects (script-run field write), sequencing with set_usem_rule_active, and the write gate are all covered, leaving nothing an agent needs before calling it unstated.

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 already 100%, so the baseline is 3; the description adds real value by tying the fields object to a per-rule_type allowlist and by spelling out the conditional requirement and value format for assignment_group_fields ('a field path on the finding that matches one of field_1..6'). It stops short of enumerating allowlists per type or mentioning wait_seconds, so it is not fully additive.

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 and resource ('Create a USEM/VR automation rule') and immediately scopes it to a rule_type plus a per-type field allowlist. It is clearly separable from update_usem_rule and set_usem_rule_active, the latter of which is explicitly named as the follow-up step.

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

Usage Guidelines5/5

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

Gives explicit workflow guidance ('Create rules inactive and enable them with set_usem_rule_active after checking them'), names the sibling that performs the enable step, and details a conditional prerequisite for remediation_task with assignment_type 5. This tells the agent both when to use this tool and how to sequence it relative to alternatives.

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

Deploy Server

Other Tools