create_ui_action
Create custom UI actions on ServiceNow forms, lists, or context menus. Define labels, scripts, conditions, and visibility to tailor user interaction.
Instructions
Create a new UI Action (button or link) on a form (requires SCRIPTING_ENABLED=true)
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"name": "<name>",
"table": "<table>",
"action_name": "<action_name>"
},
"name": "create_ui_action"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Button/link label visible to users | |
| type | No | "button" | "context_menu" | "related_link" | "list_button" | |
| table | Yes | Table to add this action on | |
| active | No | Whether to activate immediately (default: true) | |
| script | No | Server-side script to execute when clicked | |
| condition | No | Condition to show/hide the action | |
| action_name | Yes | Internal action name (no spaces) | |
| form_button | No | Show on form (default: true) | |
| list_button | No | Show on list (default: false) |