count_table
Count records in a ServiceNow table matching a query filter, returning only an integer. Use it for 'how many' questions without retrieving record data.
Instructions
Count records in a ServiceNow table matching a sysparm_query filter. Returns ONLY an integer count — no record data. Use this for 'how many' questions: 'how many P1 incidents this week?', 'what % of assets are Dell?'. Subject to the same table + query filter allowlist as query_table.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | No | sysparm_query filter string. Example: 'active=true^priority=1'. Some identity-revealing filters (like caller_id) are denied. Max 500 chars. | |
| table | Yes | ServiceNow table name. Must be in the allowlist (same as query_table). |