Skip to main content
Glama
now-sdk-ext-mcp

now-sdk-ext-mcp

Push Script to ServiceNow

push_script
DestructiveIdempotent

Updates an existing ServiceNow script record from a local file by matching the script name and type, so you can deploy code changes without creating new records.

Instructions

Push a local script file to a ServiceNow instance, updating the script field on the matching record. The file is read from the specified path and the record is found by name in the appropriate table.

IMPORTANT: This modifies code on the ServiceNow instance. The record must already exist — this updates an existing script, it does not create new ones. Pushing code is refused when the session does not permit running scripts.

Supported script types:

  • sys_script_include (Script Include)

  • sys_script (Business Rule)

  • sys_ui_script (UI Script)

  • sys_ui_action (UI Action)

  • sys_script_client (Client Script)

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": {
      "script_name": "<script_name>",
      "script_type": "<script_type>",
      "file_path": "<file_path>"
    },
    "name": "push_script"
  }
}

Input Schema

NameRequiredDescriptionDefault
instanceNoThe ServiceNow instance auth alias (e.g., "myinstance", "prod"). If not provided, falls back to the SN_AUTH_ALIAS environment variable.
file_pathYesLocal file path to read the script content from.
script_nameYesThe name of the script record to update on the instance.
script_typeYesThe type of script to push.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.5.1

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true, idempotentHint=true and openWorldHint=true, but the description adds meaningful context on top: it spells out that live code is overwritten, that no record is created, and that the call can be refused for session-permission reasons. It does not describe what a successful response returns or whether a backup of the prior script body is retained.

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?

The behavior and the IMPORTANT caveat are front-loaded before the type list, which is the right ordering for an agent scanning for safety. The bulleted type list duplicates the schema enum and could be trimmed, but it is short and scannable rather than wasteful.

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 destructive, open-world write with no output schema, the description covers the essentials: what is modified, the record-must-exist prerequisite, and the permission gate. Nothing needed to invoke it correctly appears missing, though it does not say how to confirm the update landed.

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%, so every parameter already has its own description and the enum for script_type is explicit. The description adds only mild clarification — that the record is located by name in the table implied by script_type — and the supported-types list merely restates the enum. Baseline 3 is appropriate when the schema carries the semantics.

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?

The description opens with a specific verb and resource: pushing a local script file to a ServiceNow instance and updating the script field on the matching record. It enumerates the five supported script tables, so scope is unambiguous. It stops short of naming siblings (e.g. pull_script, execute_script), leaving differentiation to inference.

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?

It states a hard exclusion clearly: the record must already exist, this updates rather than creates. It also flags the permission precondition (refused when the session does not permit running scripts). It does not point at pull_script or execute_script as the counterpart tools when the agent's intent is read or run rather than push.

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