Lookup Table Columns
lookup_columnsList or search columns on a ServiceNow table to find field names, types, and metadata. Validate column names and check attributes like mandatory or read-only status.
Instructions
List or search columns (fields) on a ServiceNow table. Queries the sys_dictionary table to find column names, types, and metadata for a given table.
Use this tool to:
List all columns on a table to see what fields are available
Validate a column name before using it in a query or script
Find the correct internal element name when you only know the display label
Check column types, whether a field is mandatory, read-only, or a reference
Returns: element name (internal), column label (display), type, max length, reference target, mandatory/read-only/active flags.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| instance | No | The ServiceNow instance auth alias (e.g., "myinstance", "prod"). If not provided, falls back to the SN_AUTH_ALIAS environment variable. | |
| table | Yes | The internal table name to look up columns for (e.g., "incident", "cmdb_ci_server", "sys_user"). Use lookup_table first if you are unsure of the exact table name. | |
| search_term | No | Optional filter to search columns by element name or label. Case-insensitive partial matching (contains). Examples: "assigned", "priority", "sys_created". If omitted, returns all columns on the table. | |
| limit | No | Maximum number of columns to return. Default is 50, max is 200. |