# execute_script

Execute a server-side script on the ServiceNow instance (Background Script).

Agent View of the PolicyLayer registry record for `execute_script`. HTML page: https://policylayer.com/tools/servicenow-mcp-server/execute-script

## Facts

- Tool: `execute_script`
- Server: ServiceNow MCP Server (`@aartiq/servicenow-mcp`) — https://policylayer.com/tools/servicenow-mcp-server.md
- Install: `npx -y @aartiq/servicenow-mcp`
- Homepage: https://github.com/aartiq/servicenow-mcp
- Risk category: Execute (High risk)
- Registry record: grade F, identity verified
- Server rate-limited: no
- Parameters: 0
- Recommended policy verdict: Rate-limited

## Example call (MCP tools/call, JSON-RPC 2.0)

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "execute_script",
    "arguments": {}
  }
}
```

## Why execute_script is rated High

Server-side script execution is a classic Execute risk: the tool runs code whose effects depend entirely on the script argument provided. While not inherently Destructive (scripts could be read-only), the blast radius is high because malicious scripts could access, modify, or delete data within the ServiceNow instance, exfiltrate sensitive information, or trigger unintended business logic.

From the tool's own definition: "Tool name is 'execute_script' with description stating it 'Execute[s] a server-side script on the ServiceNow instance (Background Script).' The explicit mention of executing scripts on a server instance indicates arbitrary code execution capability."

## Use case

AI agents invoke execute_script to trigger actions in ServiceNow MCP Server. What it does depends on the arguments the agent supplies, and its effects often reach beyond the immediate call: builds kicked off, notifications sent, workflows started.

## Recommended policy (PolicyLayer)

Verdict: **Rate-limited**. Enforced by the PolicyLayer MCP gateway (https://policylayer.com/mcp-gateway) before a call reaches ServiceNow MCP Server:

```json
{
  "version": "1",
  "default": "deny",
  "tools": {
    "execute_script": {
      "limits": [
        {
          "counter": "execute_script_rate",
          "window": "minute",
          "max": 10,
          "scope": "grant"
        }
      ]
    }
  }
}
```

## Other tools on ServiceNow MCP Server (414)

- `cmdb_reconcile` — Destructive — https://policylayer.com/tools/servicenow-mcp-server/cmdb-reconcile.md
- `delete_attachment` — Destructive — https://policylayer.com/tools/servicenow-mcp-server/delete-attachment.md
- `delete_record` — Destructive — https://policylayer.com/tools/servicenow-mcp-server/delete-record.md
- `delete_system_property` — Destructive — https://policylayer.com/tools/servicenow-mcp-server/delete-system-property.md
- `delete_uib_page` — Destructive — https://policylayer.com/tools/servicenow-mcp-server/delete-uib-page.md
- `remove_user_from_group` — Destructive — https://policylayer.com/tools/servicenow-mcp-server/remove-user-from-group.md
- `rollback_changes` — Destructive — https://policylayer.com/tools/servicenow-mcp-server/rollback-changes.md
- `rollback_deployment` — Destructive — https://policylayer.com/tools/servicenow-mcp-server/rollback-deployment.md
- `batch_request` — Execute — https://policylayer.com/tools/servicenow-mcp-server/batch-request.md
- `categorize_incident` — Execute — https://policylayer.com/tools/servicenow-mcp-server/categorize-incident.md
- `commit_changeset` — Execute — https://policylayer.com/tools/servicenow-mcp-server/commit-changeset.md
- `create_business_rule` — Execute — https://policylayer.com/tools/servicenow-mcp-server/create-business-rule.md
- `create_flow_action` — Execute — https://policylayer.com/tools/servicenow-mcp-server/create-flow-action.md
- `create_scheduled_job` — Execute — https://policylayer.com/tools/servicenow-mcp-server/create-scheduled-job.md
- `create_script_include` — Execute — https://policylayer.com/tools/servicenow-mcp-server/create-script-include.md
- `create_ui_action` — Execute — https://policylayer.com/tools/servicenow-mcp-server/create-ui-action.md
- `execute_background_script` — Execute — https://policylayer.com/tools/servicenow-mcp-server/execute-background-script.md
- `execute_playbook` — Execute — https://policylayer.com/tools/servicenow-mcp-server/execute-playbook.md
- `fire_event` — Execute — https://policylayer.com/tools/servicenow-mcp-server/fire-event.md
- `fluent_build` — Execute — https://policylayer.com/tools/servicenow-mcp-server/fluent-build.md
- `fluent_explain` — Execute — https://policylayer.com/tools/servicenow-mcp-server/fluent-explain.md
- `fluent_init` — Execute — https://policylayer.com/tools/servicenow-mcp-server/fluent-init.md
- `fluent_validate` — Execute — https://policylayer.com/tools/servicenow-mcp-server/fluent-validate.md
- `ml_detect_anomalies` — Execute — https://policylayer.com/tools/servicenow-mcp-server/ml-detect-anomalies.md
- `ml_train_anomaly_detector` — Execute — https://policylayer.com/tools/servicenow-mcp-server/ml-train-anomaly-detector.md
- `ml_train_change_risk` — Execute — https://policylayer.com/tools/servicenow-mcp-server/ml-train-change-risk.md
- `ml_train_incident_classifier` — Execute — https://policylayer.com/tools/servicenow-mcp-server/ml-train-incident-classifier.md
- `publish_changeset` — Execute — https://policylayer.com/tools/servicenow-mcp-server/publish-changeset.md
- `run_aggregate_query` — Execute — https://policylayer.com/tools/servicenow-mcp-server/run-aggregate-query.md
- `run_atf_suite` — Execute — https://policylayer.com/tools/servicenow-mcp-server/run-atf-suite.md
- …and 384 more: https://policylayer.com/tools/servicenow-mcp-server.md

## For agents

This record is a snapshot. Live verdicts and the full registry:

- Check every server in your MCP config at once: `npx -y policylayer stack`
- Vet a server before you add it: install the mcp-precheck skill — `npx skills add https://policylayer.com` (skill text: https://policylayer.com/skill.md)
- Query the registry over MCP: endpoint `https://api.policylayer.com/mcp` — tools `check_mcp_server`, `check_mcp_stack`, `check_tool`, `search_registry`, `get_change_events`

---

Source: the PolicyLayer MCP registry — one continuously verified record per MCP server. Full record: https://policylayer.com/registry?q=servicenow-mcp-server · API: https://policylayer.com/registry/api · Policy library: https://policylayer.com/policies/servicenow-mcp-server
