sndev.io / docs

schema

Query and cache table field schemas from your ServiceNow instance.

The schema command fetches field definitions for any ServiceNow table and caches them locally with a 14-day TTL. Cached schemas are used by execute to validate manifest inputs before sending requests to your instance.
sn schema [--refresh] <table-name>

Query and cache table field schemas.

Arguments

NameRequiredDescription
table-nameYesThe ServiceNow table to query (e.g., incident, sys_script_include).

Flags

FlagDefaultDescription
--refreshForce re-fetch from instance, bypassing the 14-day cache.

Examples

sn schema incident
incident (87 fields, cached 2026-04-01)
active boolean
assigned_to reference → sys_user
category string (choice)
...
sn schema --refresh sys_script_include
Refreshing schema for sys_script_include...
sys_script_include (24 fields, cached 2026-04-05)
Schemas include inherited fields from parent tables. The cache is scoped per instance — switching SN_INSTANCE in .env fetches fresh schemas automatically.