Create a new RationalBloks project from a JSON schema.
⚠️ CRITICAL RULES - READ BEFORE CREATING SCHEMA:
1. FLAT FORMAT (REQUIRED):
✅ CORRECT: {users: {email: {type: "string", max_length: 255}}}
❌ WRONG: {users: {fields: {email: {type: "string"}}}}
DO NOT nest under 'fields' key!
2. FIELD TYPE REQUIREMENTS:
• string: MUST have "max_length" (e.g., max_length: 255)
• decimal: MUST have "precision" and "scale" (e.g., precision: 10, scale: 2)
• datetime: Use "datetime" NOT "timestamp"
• ALL fields: MUST have "type" property
3. AUTOMATIC FIELDS (DON'T define):
• id (uuid, primary key)
• created_at (datetime)
• updated_at (datetime)
4. USER AUTHENTICATION:
❌ NEVER create "users", "customers", "employees" tables with email/password
✅ USE built-in app_users table
Example:
{
"employee_profiles": {
"user_id": {type: "uuid", foreign_key: "app_users.id", required: true},
"department": {type: "string", max_length: 100}
}
}
5. AUTHORIZATION:
Add user_id → app_users.id to enable "only see your own data"
Example:
{
"orders": {
"user_id": {type: "uuid", foreign_key: "app_users.id"},
"total": {type: "decimal", precision: 10, scale: 2}
}
}
6. FIELD OPTIONS:
• required: true/false
• unique: true/false
• default: any value
• enum: ["val1", "val2"]
• foreign_key: "table.id"
AVAILABLE TYPES: string, text, integer, decimal, boolean, uuid, date, datetime, json, uuid_array, integer_array, text_array, float_array
Array types store PostgreSQL native arrays with automatic GIN indexing:
• uuid_array: UUID[] — for sets of references (e.g., tensor coordinates)
• integer_array: BIGINT[] — for dimension indices, integer sets
• text_array: TEXT[] — for tags, categories, label sets
• float_array: DOUBLE PRECISION[] — for weight vectors, scores
GIN-indexed operators: @> (contains), <@ (contained_by), && (overlaps)
BACKEND ENGINE:
• python (default): FastAPI backend — mature, full-featured
• rust: Axum backend — faster cold starts, lower memory, high performance
WORKFLOW:
1. Use get_template_schemas FIRST to see valid examples
2. Create schema following ALL rules above
3. Call this tool (optionally choose backend_type: "python" or "rust")
4. Monitor with get_job_status (2-5 min deployment)
After creation, use get_job_status with returned job_id to monitor deployment.