smart_query
Resolve a natural-language request into a ServiceNow table + encoded query and (optionally) run it. Maps keywords to common tables (incident, change_request, problem, sc_request, sn_vul_vulnerable_item, cmdb_ci, sys_user, …), then infers…
Instructions
Resolve a natural-language request into a ServiceNow table + encoded query and (optionally) run it. Maps keywords to common tables (incident, change_request, problem, sc_request, sn_vul_vulnerable_item, cmdb_ci, sys_user, …), then infers conditions for priority (P1/critical/high), open vs closed state, "assigned to me"/unassigned, and time windows (today, yesterday, this/last week, this/last month, last N days). Conditions whose field does not exist on the resolved table are dropped and reported in unmatched_intents. Returns the interpretation (table, encoded_query, conditions) plus matching records. Set execute=false to preview the query without running it, or pass table to override resolution.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Max records to return when executed (default 10, max 1000) | |
| table | No | Optional: force this table instead of auto-resolving from keywords | |
| execute | No | Run the resolved query (default true). false = preview only. | |
| description | Yes | Natural-language request, e.g. "P1 incidents still open from last month" / "先月の未解決 P1 インシデント" |