sn_table_query
Query ServiceNow table records using encoded filters, field selection, sorting, and limit/offset paging to retrieve matching records and totals.
Instructions
Read records from a ServiceNow table with the Table API. Returns count (records in this reply), total (all matching records, when the instance reports it) and records. Use limit and offset to page through large results.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"table": "<table>"
},
"name": "sn_table_query"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | How many records to return. Default 20, at most 200. | |
| query | No | ServiceNow encoded query. Example: active=true^priority=1. Leave out to match every record. | |
| table | Yes | Table name, lowercase letters, digits and underscores only. Example: incident. | |
| fields | No | Comma separated list of columns to return. Example: number,short_description,state. Leave out to get every column. | |
| offset | No | How many records to skip, for paging. Default 0. | |
| order_by | No | Column to sort by, oldest or smallest first. Put DESC in front for the reverse order. Example: DESCsys_created_on. | |
| display_value | No | false returns stored values (the default), true returns display values such as names for references, all returns both. |