Synchronize assets into Sonar
Mirror approved external observations into Sonar’s shared Inventory.
Use the sync MCP profile to mirror observations from an approved external source into Sonar's
shared Inventory. This interface can write discovered assets; it cannot create programs, scopes, or
scope membership.
Derive observations from source evidence
Read the engagement or system-of-record files and map only facts they contain. Do not invent parent relationships, infer a program boundary from a hostname, or promote unverified data.
Common writable records include domains, IP addresses, domain/IP relationships, ports, HTTP paths, verification enrichment, technologies and their bindings, and mobile apps.
Read the live schemas
Use the returned field names and examples for the deployed Sonar version. Do not copy old database column names. The output-schema page explains why physical write contracts remain separate from logical Inventory entities.
Push parent-before-child waves
Send one upsert_assets call per table in these waves:
domains,ip_addresses;ports,http_ports,http_paths,technologies,domain_ip_addresses;verify_http_paths,http_path_technologies,port_technologies.
Wait for each parent wave's response before sending children. For sync-stream http_ports, send
the IP-keyed shape { ip, port, service }; do not use the workflow-only domain-keyed alternative.
mobiles has no dependency in these waves and may be sent as its own table call.
Compare sent and accepted counts
For every table, record:
A returned call is not a full sync
When M < N, preserve the gap and investigate the live schema, missing parents, invalid fields, or unsupported relationships. Do not report a full sync merely because the call itself returned.
Repeat safely
Re-sending the current canonical observation is expected. Conflict-key upserts avoid duplicate
logical records and refresh updated_at, so a sync worker can re-derive complete current state
instead of maintaining a fragile local checkpoint.
Asset upsert does not associate rows with a program scope. Sonar's AI-resolution lifecycle owns that later association under existing scope rules.