Skip to main content
Glama

create_client_script

Add client-side JavaScript to ServiceNow forms by creating onLoad, onChange, onSubmit, or onCellEdit scripts.

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)
Behavior3/5

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

The description mentions a prerequisite (SCRIPTING_ENABLED=true) but does not disclose other behavioral traits such as what happens on creation (e.g., immediate activation, side effects, or error cases). Annotations already indicate it is not destructive, so the description adds minimal value beyond that.

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, efficient sentence containing only essential information. It is front-loaded with the action and resource, followed by a key requirement in parentheses, with no superfluous words.

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?

Given the tool has 7 parameters, no output schema, and annotations, the description is minimal but covers the core purpose. It lacks details about return values, error handling, or relationships with sibling tools like update_client_script. For a creation tool, the description is acceptable but not thorough.

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 input schema provides full descriptions for all 7 parameters, so the description adds no extra meaning. The schema already captures the script types, required fields, and defaults. The description's mention of script types is redundant with the schema's enum-like description.

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 verb 'Create' and the resource 'client script', specifies the script types (onLoad, onChange, onSubmit, onCellEdit), and includes a prerequisite. It distinguishes this tool from other 'create_*' siblings by being specific to client scripts.

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 mentions a required condition (SCRIPTING_ENABLED=true) which helps in deciding when to use the tool. However, it does not explicitly state when to avoid this tool or recommend alternatives (e.g., update_client_script for modifications).

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/nowaikit'

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