Discover Table Schema
discover_table_schemaRetrieve the full schema of a ServiceNow table, including fields, types, references, choice values, relationships, UI policies, and business rules. Ideal for understanding table structure before querying or scripting.
Instructions
Discover the full schema of a ServiceNow table including all fields, types, references, and optionally choice values, relationships, UI policies, and business rules.
Returns the table name, label, parent class, and for each field: name, label, type, maxLength, mandatory, readOnly, referenceTable, and defaultValue.
Key use cases:
Understand the structure of a table before querying or scripting against it
Discover reference fields to understand table relationships
Find choice values for dropdown fields
Review UI policies and business rules that affect the table
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 ServiceNow table name to discover (e.g., "incident", "sys_user", "cmdb_ci"). | |
| include_choices | No | Include choice values for fields that have them (e.g., priority, state). Queries sys_choice. | |
| include_relationships | No | Include relationship information extracted from reference fields. | |
| include_ui_policies | No | Include UI policies defined on the table. | |
| include_business_rules | No | Include business rules defined on the table. |