Skip to main content
Glama

create_business_rule

Create a new business rule (requires SCRIPTING_ENABLED=true). ServiceNow supports ES2021 async/await in scripts.

Instructions

Create a new business rule (requires SCRIPTING_ENABLED=true). ServiceNow supports ES2021 async/await in scripts.

Input Schema

NameRequiredDescriptionDefault
nameYesRule name
whenYes"before" | "after" | "async" | "display"
orderNoExecution order (default: 100)
tableYesTable this rule applies to
activeNoWhether to activate the rule (default: true)
scriptYesServer-side JavaScript. ServiceNow supports ES2021 (async/await, ?., ??).
conditionNoOptional condition script
action_deleteNoFire on record delete (default: false, matching ServiceNow UI default). See action_insert note.
action_insertNoFire on record insert (default: true). Irrelevant for when="display"/"query". A rule with when="before"/"after"/"async" and action_insert/action_update/action_delete all false will never fire.
action_updateNoFire on record update (default: true). See action_insert note.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv1.15.1
    • addedInput schema / properties / action_delete
      Added value: +{
      +  "description": "Fire on record delete (default: false, matching ServiceNow UI default). See action_insert note.",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / action_insert
      Added value: +{
      +  "description": "Fire on record insert (default: true). Irrelevant for when=\"display\"/\"query\". A rule with when=\"before\"/\"after\"/\"async\" and action_insert/action_update/action_delete all false will never fire.",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / action_update
      Added value: +{
      +  "description": "Fire on record update (default: true). See action_insert note.",
      +  "type": "boolean"
      +}
  2. First observedv1.0.2

TDQS

A3.5/5.0
Behavior3/5

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

Annotations already declare the operation is not read-only, not idempotent, open-world, and non-destructive. The description adds a meaningful environment prerequisite and notes ES2021 async/await support, but does not mention duplicate-name behavior, return value, or broader side effects of creating 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.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two short sentences, front-loaded with the core action and a critical prerequisite. There is no redundant or wasted text.

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 a 10-parameter creation tool with no output schema, the description covers the key enablement prerequisite but omits what is returned after creation and any duplicate or failure behavior. The rich input schema and annotations compensate partially, but the definition remains only minimally complete.

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 100%, so the schema already documents all 10 parameters thoroughly. The description does not add parameter-level semantics beyond noting that scripts support ES2021 features, which the schema also states for the script field.

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?

States a specific verb ('Create') and resource ('business rule'), making its purpose clear. It does not explicitly differentiate from sibling tools such as update_business_rule or list_business_rules, but the create semantics are unambiguous.

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?

Adds a useful prerequisite ('requires SCRIPTING_ENABLED=true'), which helps determine whether the tool can be used. However, it gives no explicit guidance on when to use this versus update_business_rule, list_business_rules, or other rule-related tools.

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