Skip to main content
Glama

execute_background_script

Run server-side JavaScript scripts on ServiceNow instances to automate backend processes and execute custom logic.

Instructions

Execute a background script on the instance (server-side JavaScript). [Scripting]

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
scriptYesJavaScript code to execute
scopeNoApplication scope (default global)
Behavior2/5

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

No annotations are provided, so the description carries full burden. It states the tool executes JavaScript but lacks critical behavioral details: whether it's safe/destructive, permission requirements, execution environment constraints, error handling, or output format. The '[Scripting]' tag adds minimal context, but essential operational traits are missing for a tool that runs arbitrary code.

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 description is brief and front-loaded with the core purpose in one sentence. The '[Scripting]' tag is arguably redundant but not wasteful. It could be slightly more structured (e.g., separating usage notes), but overall it's efficient with no fluff.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (executing arbitrary server-side code), lack of annotations, and no output schema, the description is insufficient. It doesn't address safety, permissions, execution limits, or what happens on success/failure. For a potentially high-impact tool, more context is needed to guide safe and effective use.

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 description coverage is 100%, so the schema fully documents both parameters (script and scope). The description doesn't add any parameter-specific details beyond what's in the schema (e.g., script examples, scope implications). Baseline 3 is appropriate as the schema handles parameter documentation adequately.

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 clearly states the action ('Execute') and target ('background script on the instance'), specifying it's server-side JavaScript. It distinguishes from siblings by focusing on script execution rather than other operations like creating records or managing data. However, it doesn't explicitly differentiate from other script-related tools (like create_client_script or run_atf_test) beyond the 'background' aspect.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides minimal guidance, only hinting at usage with the '[Scripting]' tag. It doesn't specify when to use this tool versus alternatives (e.g., other script execution tools or client-side scripts), nor does it mention prerequisites, risks, or typical scenarios. No explicit when/when-not instructions are given.

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