AI Assistant
Use the AI Command Builder to create and refine slash commands and code snippets with context-aware suggestions.
Last updated: February 2, 2026
Last updated: February 2, 2026
The AI Assistant helps you create slash commands and code snippets using natural language. Describe what you need, and it generates a complete, ready-to-save result — including the right fields, variables, URL structure, or code.
Open the AI side panel from the Manage page (available on both the Commands and Snippets tabs). Type a plain-language description of what you want to build:
The AI reads your prompt together with whatever you've already typed into the command or snippet editor — so partially filled fields act as context — and generates a complete result. Review the output, adjust if needed, and save it directly.
You don't have to open the Manage page first. Two slash commands jump you straight into the AI Builder with your prompt already submitted:
/newcmd <description> — opens the Commands tab, starts the AI on your prompt with the current page (table, view) as context. Example: /newcmd open the caller's user record in a new tab. If you give it a finished artifact instead (a URL, script, fields list, or encoded query), it skips the AI and drops the input into the matching editor field directly — see Custom Commands for the routing table./newsnip <description> — opens the Snippets tab and runs the AI on your prompt. Example: /newsnip GlideAggregate counting incidents by category.Both commands also work without a description — they just open the editor in the "new" state and let you author from there. On Community the description is prefilled into the editor instead of running the AI, so the same keyboard path still gets you to a useful starting state.
When building a slash command, the AI generates:
You can refine the result by providing follow-up instructions, like "add a scope switch" or "include the assignment group in the fields".
When building a code snippet, the AI generates:
The generated code follows ServiceNow best practices and uses the appropriate API for your chosen context (client-side or server-side).
We know this matters — especially in regulated environments — so here is exactly what leaves your browser when you click Generate in the AI Command Builder.
Long fields (script, snippet body) are truncated before sending, and the whole prompt is capped at ~3,900 characters.
Requests go to snutils.com/api/extension/ai/generate over HTTPS, authenticated with your Pro access token. From there the prompt is forwarded to our LLM provider to produce the response. Processing, retention, and sub-processor details are covered in the Privacy Agreement.