Skip to main content
Glama

create_client_script

Create ServiceNow client scripts for onLoad, onChange, onSubmit, or onCellEdit events. Specify the table, script, and activation settings to automate client-side behavior.

Instructions

Create a new client script (onLoad, onChange, onSubmit, onCellEdit) (requires SCRIPTING_ENABLED=true)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesScript name
typeYes"onLoad" | "onChange" | "onSubmit" | "onCellEdit"
tableYesTable this client script applies to
activeNoWhether to activate the script (default: true)
globalNoRun script globally (default: false)
scriptYesClient-side JavaScript. Use g_form, g_user, etc.
field_nameNoField name (required for onChange/onCellEdit)
Behavior4/5

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

Annotations already indicate it is a write operation (readOnlyHint=false) and non-destructive. The description adds the key environmental requirement of SCRIPTING_ENABLED=true and the allowable script types, which are not present in annotations. This provides useful behavioral context beyond the structured metadata.

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?

The description is a single, compact sentence that front-loads the essential purpose and includes the prerequisite inline. Every word contributes value, with no filler or redundancy.

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

Completeness3/5

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

The schema is rich, but the description omits usage context and does not mention that 'active' defaults to true, which could lead to unintentional activation. It covers the basic purpose and requirement but lacks guidance on when to choose this tool over siblings or the side effects of creation, so it is adequate but not complete.

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?

The schema has 100% coverage with individual parameter descriptions, so the description does not need to duplicate them. The parenthetical list of script types adds some context for the 'type' parameter, but overall the description adds minimal meaning beyond the schema, earning the baseline 3.

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 action ('Create') and the resource ('client script'), and enumerates the specific script types (onLoad, onChange, onSubmit, onCellEdit). It distinguishes this tool from siblings like create_business_rule and create_script_include by being client-script-specific.

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?

The description implies usage by naming the resource type, and mentions a prerequisite (SCRIPTING_ENABLED=true), but does not explicitly state when to use it versus alternatives like create_ui_policy or update_client_script. No exclusions or alternative recommendations are provided, leaving usage guidance primarily implicit.

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