Skip to main content
Glama

create_business_rule

Create a ServiceNow business rule by specifying table, trigger, and server-side JavaScript, with support for ES2021 async/await.

Instructions

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

Input Schema

TableJSON 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
Behavior3/5

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

Annotations already declare readOnlyHint=false, idempotentHint=false, and destructiveHint=false, so the write, non-idempotent, non-destructive nature is pre-disclosed. The description adds the requirement that SCRIPTING_ENABLED must be true, which is a useful behavioral constraint, and notes ES2021 support for scripts. Yet it does not disclose other behaviors like update set context or potential side effects beyond what openWorldHint already suggests.

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?

The description is compact and front-loaded, with the core action in the first sentence. The second sentence about ES2021 support is a minor detail that does not bloat the description, keeping it appropriately concise.

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?

Given the tool's complexity (7 params, 4 required, no output schema) and good annotations, the description covers the essential action and a key prerequisite. However, it does not mention what the tool returns after creation, nor how it interacts with update sets or other environment settings. This leaves some gaps for a mutation tool.

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?

The input schema provides 100% coverage with descriptions for all 7 parameters, so the baseline is 3. The description's mention of ES2021 support is already present in the script parameter's schema description, so it does not add new meaning to the parameters. It adds no additional information about parameter formats or constraints.

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 'Create a new business rule', a specific verb+resource that clearly distinguishes it from siblings like update_business_rule, list_business_rules, and get_business_rule. The added prerequisite about SCRIPTING_ENABLED=true provides clarity about the operation's context.

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?

The description implies the tool is for creating new business rules and explicitly notes a prerequisite (SCRIPTING_ENABLED=true). It also provides guidance on script syntax (ES2021 async/await). However, it does not mention alternatives or exclusions, such as using update_business_rule for modifications.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/aartiq/servicenow-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server