Use the AI Command Builder to create and refine slash commands and code snippets with context-aware suggestions.
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.
How It Works
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:
"Create a command that searches incidents by short description and assignment group"
"Write a GlideAggregate snippet that counts open incidents by category"
"Make a command that opens the UI Builder page for a given experience"
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.
Creating Commands with AI
When building a slash command, the AI generates:
Command name — A short, descriptive name (max 5 characters)
URL — With the right table, query parameters, and variables
Hint — A description shown when browsing commands
Fields — The fields to display in inline results
Overwrite URL — If the command should open a different page than the list
You can refine the result by providing follow-up instructions, like "add a scope switch" or "include the assignment group in the fields".
Creating Snippets with AI
When building a code snippet, the AI generates:
Name — A descriptive name for search
Prefix — A shorthand trigger for quick access
Category — Script, Client, Server, or Other
Context — Where the snippet should appear
Code — Working code with descriptive placeholders
The generated code follows ServiceNow best practices and uses the appropriate API for your chosen context (client-side or server-side).
Tips
Be specific — The more detail you provide, the better the result. Mention table names, field names, and the behavior you expect.
Iterate — Use follow-up messages to refine the generated result without starting over.
Review before saving — Always check the generated code or URL to make sure it matches your intent.
Your Data & Privacy
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.
What is sent
Your chat prompt — the text you typed in the AI side panel.
What you have already typed into the editor form on the Manage page, if anything:
Snippets: prefix, name, description, category, context, and the code in the editor.
Recent turns of the current chat (up to the last 10 messages) so follow-ups keep context.
Your Pro access token, to authenticate the request and count tokens for billing.
Long fields (script, snippet body) are truncated before sending, and the whole prompt is capped at ~3,900 characters.
What is NOT sent
No ServiceNow record data — no GlideRecord values, no sys_ids, no field values from any record.
No instance URL, hostname, or user identity from ServiceNow.
No cookies, session tokens, or authentication from your ServiceNow session.
No page DOM, no open-tab scraping, no browsing history. Tab suggestions in the panel are generated locally in your browser; only the one you explicitly click becomes part of your prompt.
Nothing is sent passively. A request is made only when you click Generate.
Where it goes
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.