Skip to main content
Glama
onlyflowstech

@onlyflows/servicenow-mcp

sn_script

Execute custom JavaScript on ServiceNow to interact with GlideRecord and GlideSystem, returning gs.print() output for debugging and automation.

Instructions

Execute a background script on the ServiceNow instance. Runs server-side GlideRecord/GlideSystem JavaScript and returns output from gs.print() calls. Requires admin role. NOTE: This tool requires the optional Playwright dependency.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeYesJavaScript code to execute (GlideRecord, GlideSystem, gs.print(), etc.)
scopeNoApplication scope to run in (default: global)
confirmNoRequired for scripts containing destructive keywords (deleteRecord, deleteMultiple, setWorkflow(false))
timeoutNoTimeout in seconds (default 30, max 300)
Behavior4/5

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

With no annotations, the description carries the transparency burden and discloses key behavioral traits: admin role requirement, server-side execution, gs.print() return behavior, and the optional Playwright dependency. It does not explicitly mention that scripts may modify data, but the schema already covers the confirm parameter for destructive keywords.

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?

Three sentences, front-loaded with the main purpose, followed by execution details and a dependency note. Every sentence adds value with no filler.

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 script execution tool with 4 parameters and no output schema, the description covers the core purpose, output mechanism, auth prerequisite, and a unique dependency. It could mention potential side effects or error handling, but the schema handles the confirm parameter and the description is otherwise comprehensive.

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 the baseline is 3. The description adds minimal parameter-specific value beyond the schema—it mentions GlideRecord/GlideSystem and gs.print() but does not elaborate on scope, confirm, or timeout behavior. The schema already documents these parameters sufficiently.

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 clearly states the tool executes background scripts on the ServiceNow instance, specifically server-side GlideRecord/GlideSystem JavaScript, returning gs.print() output. This verb+resource combination distinguishes it from sibling tools like sn_query or sn_update, which perform standard operations.

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 provides clear context: it is for executing custom server-side JavaScript, requires admin role, and returns gs.print() output. It does not explicitly name alternatives or when-not-to-use, but the custom-script context implicitly differentiates it from CRUD-focused siblings.

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/onlyflowstech/servicenow-mcp'

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