{"openapi":"3.1.0","info":{"title":"Migrate-Anything API (ANY-B05)","version":"1.0.0","description":"Polymorphic lossless schema mapper, strong-type normalizer, standalone Python escape-script compiler, and row-level SHA-256 Merkle checksum verifier. In-memory processing only (zero retention/resale); empty or malformed inputs return HTTP 422 with billed_micros=0."},"servers":[{"url":"https://migrate.fastmesh.dev"},{"url":"http://127.0.0.1:8925"}],"paths":{"/health":{"get":{"summary":"Health & capability check","responses":{"200":{"description":"Service OK"}}}},"/openapi.json":{"get":{"summary":"OpenAPI 3.1.0 schema","responses":{"200":{"description":"OpenAPI JSON"}}}},"/v1/infer-schema":{"post":{"summary":"Infer strict strong-typed schema, foreign keys, and dirty-data boundaries","responses":{"200":{"description":"Inferred schema report"},"422":{"description":"Unbilled validation error (billed_micros=0)"}}}},"/v1/dry-run":{"post":{"summary":"Generate field mapping plan, coercion warnings, and lossless Merkle diff","responses":{"200":{"description":"Dry-run diff report"},"422":{"description":"Unbilled validation error (billed_micros=0)"}}}},"/v1/migrate":{"post":{"summary":"Compile target data, standalone Python migration script, rollback verifier, and Merkle receipt","responses":{"200":{"description":"Migration bundle"},"422":{"description":"Unbilled validation error (billed_micros=0)"}}}},"/v1/verify-checksum":{"post":{"summary":"Verify row-level SHA-256 Merkle parity and pinpoint mismatched rows","responses":{"200":{"description":"Checksum verification receipt"},"422":{"description":"Unbilled validation error (billed_micros=0)"}}}},"/webhooks/creem":{"post":{"summary":"Creem.io HMAC-SHA256 webhook verification (zero hardcoded secrets)","responses":{"200":{"description":"Verified webhook receipt"},"401":{"description":"Invalid signature"},"503":{"description":"Webhook secret not configured"}}}},"/mcp":{"post":{"summary":"Native JSON-RPC 2.0 MCP endpoint (initialize, tools/list, tools/call)","responses":{"200":{"description":"JSON-RPC 2.0 result"},"422":{"description":"Unbilled invalid/empty input (billed_micros=0)"}}}}},"x-mcp-tools":[{"name":"migrate_infer_schema","description":"Infer strict strong-typed schema (bool vs int, Decimal currency, ISO-8601 UTC, JSON arrays, UUID/foreign keys, nullable flags) and dirty-data boundaries from CSV, JSON/NDJSON, Airtable, SQLite/SQL, Notion, Shopify, Zapier/Make, or billing CSV. Empty/malformed input returns HTTP 422 with billed_micros=0.","inputSchema":{"type":"object","properties":{"source_data":{"description":"Raw CSV/SQL/Markdown/JSON text, structured JSON object/list, or {content_base64}."},"source_format":{"type":"string","enum":["auto","csv","json_ndjson","airtable","sql_dump","sqlite","notion","shopify","automation_json","zapier","make","billing_csv"],"default":"auto"},"target_format":{"type":"string","enum":["sqlite","postgres_ddl","json","ndjson","csv","python_dispatch","creem_ledger","woocommerce_json","medusa_json"],"default":"sqlite"},"table_name":{"type":"string","default":"records"},"redact":{"type":"boolean","default":false},"tenant_id":{"type":"string"},"no_cache":{"type":"boolean","default":false}},"required":["source_data"]}},{"name":"migrate_dry_run","description":"Run deterministic source->target field mapping, coercion warning audit, and row-level SHA-256 Merkle checksum diff preview with zero data retention.","inputSchema":{"type":"object","properties":{"source_data":{"description":"Raw export text or structured JSON payload."},"source_format":{"type":"string","enum":["auto","csv","json_ndjson","airtable","sql_dump","sqlite","notion","shopify","automation_json","zapier","make","billing_csv"],"default":"auto"},"target_format":{"type":"string","enum":["sqlite","postgres_ddl","json","ndjson","csv","python_dispatch","creem_ledger","woocommerce_json","medusa_json"],"default":"sqlite"},"table_name":{"type":"string","default":"records"},"redact":{"type":"boolean","default":false},"tenant_id":{"type":"string"},"no_cache":{"type":"boolean","default":false}},"required":["source_data"]}},{"name":"migrate_execute","description":"Compile target data + standalone runnable Python 3 migration script + rollback/round-trip verifier + row-level Merkle SHA-256 receipt.","inputSchema":{"type":"object","properties":{"source_data":{"description":"Raw export text or structured JSON payload."},"source_format":{"type":"string","enum":["auto","csv","json_ndjson","airtable","sql_dump","sqlite","notion","shopify","automation_json","zapier","make","billing_csv"],"default":"auto"},"target_format":{"type":"string","enum":["sqlite","postgres_ddl","json","ndjson","csv","python_dispatch","creem_ledger","woocommerce_json","medusa_json"],"default":"sqlite"},"table_name":{"type":"string","default":"records"},"redact":{"type":"boolean","default":false},"tenant_id":{"type":"string"},"no_cache":{"type":"boolean","default":false}},"required":["source_data"]}},{"name":"migrate_verify_checksum","description":"Verify row-level SHA-256 and Merkle root parity between source and target datasets, pinpointing missing, extra, or mutated rows.","inputSchema":{"type":"object","properties":{"source_rows":{"type":"array","items":{"type":"object"}},"target_rows":{"type":"array","items":{"type":"object"}},"source_data":{},"target_data":{},"expected_merkle_sha256":{"type":"string"},"field_mapping":{"type":"object"},"type_map":{"type":"object"},"redact":{"type":"boolean","default":false}}}}],"x-pricing-micros":{"infer_schema":25000,"dry_run":50000,"migrate":250000,"verify_checksum":25000}}