Skip to main content
Glama

create_approval_rule

Creates an approval rule that automatically generates approval requests when a record matches specified conditions, enabling automated approvals in ServiceNow.

Instructions

Create an approval rule that automatically generates approval requests when a record matches given conditions (requires WRITE_ENABLED=true). Uses the Approval Rules table (sysrule_approvals).

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": {
      "name": "<name>",
      "table": "<table>",
      "approver_type": "<approver_type>",
      "approver": "<approver>"
    },
    "name": "create_approval_rule"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameYesRule name
orderNoExecution order relative to other rules (default: 100)
tableYesTable this rule applies to (e.g. "sc_request", "change_request")
activeNoActivate the rule immediately (default: true)
approverYessys_id of the approving user or group
conditionNoEncoded query that determines when the rule fires (leave blank for always)
approver_typeYes"user" | "group" — whether the approver is a user or a group

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.2

TDQS

A3.7/5.0
Behavior4/5

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

Annotations already declare it is a non-readonly, open-world, non-idempotent, non-destructive write, so the bar is lower. The description adds real value on top: the WRITE_ENABLED prerequisite (an auth/config gate the annotations don't convey) and the key side effect that rules fire automatically on matching records. It stops short of warning about duplicate rules on repeated calls or what the response contains.

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?

Two tight sentences with no filler; the side effect and prerequisite are front-loaded before the implementation detail about sysrule_approvals. Very little to trim, though the parenthetical table name is the least essential element.

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 7-parameter mutation with annotations but no output schema, the description covers the purpose, the prerequisite, and the runtime effect. It does not address duplicate-creation risk or the returned identifier, which are minor gaps given the rich schema.

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%, with every one of the 7 parameters described in the schema (condition semantics, approver sys_id, approver_type values, defaults for order/active). The description adds no parameter-level meaning beyond noting the condition determines when the rule fires, so the baseline 3 applies.

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?

Specific verb+resource ('Create an approval rule') plus the resulting behavior ('automatically generates approval requests when a record matches given conditions') and the underlying table (sysrule_approvals). This distinguishes it from generic record-creation siblings and from create_business_rule by domain, though it never names an alternative explicitly.

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?

Provides one actionable prerequisite ('requires WRITE_ENABLED=true'), which tells the agent when the call will succeed. It does not say when to prefer this over create_business_rule, submit_for_approval, or preview_approval_routing, so guidance is implied rather than explicit.

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