discover_schema
Reveals all source and target fields side-by-side, proposes staging table definition and field mappings for integration setup.
Instructions
Phase 2: Discover ALL source fields and ServiceNow target fields side by side. Returns complete field lists (every source field is included — none are skipped), auto-suggested staging table definition, and field mapping proposals.
WORKFLOW:
If sn_table is not known yet, call suggest_target_table first and confirm with the user.
After calling this, STOP and present all fields + mappings to the user for Checkpoint 1 review.
For UNMAPPED fields (sn_target=null): highlight them and ask the user to either map them to an existing SN field or confirm they should land only in staging.
Show the upsert key (coalesce) fields so the user understands duplicate prevention.
Ask: (1) Are all source fields present? (2) Any mapping corrections? (3) Approve to continue?
Only call build_artifacts after explicit user approval.
IMPORTANT — target table changes: If the user changes the sn_table AFTER this has been called, call discover_schema AGAIN from scratch. Discard all prior suggested_mappings — target fields will be completely different.
GENERIC: platform can be any string — salesforce, jira, or any registered custom connector.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| platform | Yes | Source platform — salesforce, jira, or any registered connector | |
| object_name | Yes | Source object name (Salesforce: Account/Case/..., Jira: project key, etc.) | |
| sn_table | Yes | ServiceNow target table confirmed by the user (from suggest_target_table or explicit) |