Search Code Artifacts
servicenow_search_artifactsSearch ServiceNow developer artifacts—business rules, script includes, client scripts, UI actions, and REST operations—by name or script content to locate relevant code.
Instructions
Search across ServiceNow developer artifacts — business rules, script includes, client scripts, UI actions, and scripted REST operations — by name or script content.
Args:
search_term (string): Text to search in artifact names and scripts
artifact_types (array): Which artifact types to search. Default: all.
"business_rule" — sys_business_rule
"script_include" — sys_script_include
"client_script" — sys_script_client
"ui_action" — sys_ui_action
"rest_operation" — sys_ws_operation (Scripted REST)
table_name (string): Filter by the table the artifact applies to (e.g., 'incident')
active_only (boolean): Only return active artifacts (default: true)
limit (number): Max results per artifact type (default 10)
response_format: Output format
Returns: Matching artifacts with name, type, table, and script preview
Examples:
Find all incident business rules → artifact_types=["business_rule"], table_name="incident"
Search for a function → search_term="calculatePriority"
Find OAuth script includes → search_term="oauth", artifact_types=["script_include"]
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Max results per artifact type | |
| table_name | No | Filter by the table the artifact targets (e.g., 'incident') | |
| active_only | No | Only return active artifacts (default: true) | |
| search_term | No | Text to search in names and script content | |
| artifact_types | No | Artifact types to search | |
| response_format | No | Output format: 'markdown' (default) for human-readable or 'json' for structured data | markdown |