query_cache
Query cached ServiceNow table data with read-only SQLite to filter, join, and inspect records; returns up to 2,000 rows and flags truncated results.
Instructions
Run read-only SQLite against a cached response. Each ServiceNow table is a SQLite table with TEXT columns. Returns at most 2000 rows; truncated is true when more matched.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sql | Yes | SQLite statements, separated by semicolons. Every cached ServiceNow table is a SQLite table with the same name and TEXT columns. Reference fields hold the sys_id of the referenced record: join on it, or request dot-walked fields such as group.name. Double-quote column names that contain dots or are SQL keywords, for example "caller_id.name", "group", "order" and "when". Only the last statement that returns rows is returned. The cache is read-only, TEMP tables are allowed. | |
| cache_name | Yes | The cache_name returned by a request tool or by list_cached_responses. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| rows | Yes | ||
| columns | Yes | ||
| row_count | Yes | ||
| truncated | Yes | ||
| cache_name | Yes |