{"ok":true,"site":{"host":"edaad-schema.saad-abushendi.workers.dev","url":"https://edaad-schema.saad-abushendi.workers.dev/","type":"live","desc":"edaad-schema-architect","tools":[{"name":"create_table","kind":"act","impl":"imperative","description":"Create a new database table in the visual schema designer. Call this once per table.","inputSchema":{"type":"object","properties":{"tableName":{"type":"string","description":"Name of the table (e.g. users, products)"},"columns":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string","description":"SQL type: UUID, VARCHAR, INTEGER, TEXT, BOOLEAN, DECIMAL, TIMESTAMP, etc."},"isPrimary":{"type":"boolean"}},"required":["name","type"]}}},"required":["tableName","columns"]},"hasHandler":true,"hasExecute":true,"__source":"spec","executable":true,"handlerField":"execute"},{"name":"add_relation","kind":"act","impl":"imperative","description":"Add a foreign key relationship between two tables (draws an arrow from source to target).","inputSchema":{"type":"object","properties":{"sourceTable":{"type":"string","description":"The table containing the foreign key"},"targetTable":{"type":"string","description":"The table being referenced"},"label":{"type":"string","description":"Optional label for the relation arrow (e.g. has many, belongs to)"}},"required":["sourceTable","targetTable"]},"hasHandler":true,"hasExecute":true,"__source":"spec","executable":true,"handlerField":"execute"},{"name":"analyze_schema","kind":"answer","impl":"imperative","description":"Read and analyze the current schema. Use this before making changes to understand what tables already exist.","inputSchema":{"type":"object","properties":{}},"hasHandler":true,"hasExecute":true,"__source":"spec","executable":true,"handlerField":"execute"},{"name":"list_tables","kind":"answer","impl":"imperative","description":"Returns a list of existing table names to avoid creating duplicates.","inputSchema":{"type":"object","properties":{}},"hasHandler":true,"hasExecute":true,"__source":"spec","executable":true,"handlerField":"execute"},{"name":"clear_schema","kind":"act","impl":"imperative","description":"Remove all tables and relations from the canvas. Use with caution — this cannot be undone.","inputSchema":{"type":"object","properties":{}},"hasHandler":true,"hasExecute":true,"__source":"spec","executable":true,"handlerField":"execute"},{"name":"update_column","kind":"act","impl":"imperative","description":"Modify an existing column in a table (rename, change type, set primary key).","inputSchema":{"type":"object","properties":{"tableName":{"type":"string"},"oldColumnName":{"type":"string"},"newColumnName":{"type":"string"},"newType":{"type":"string"},"isPrimary":{"type":"boolean"}},"required":["tableName","oldColumnName"]},"hasHandler":true,"hasExecute":true,"__source":"spec","executable":true,"handlerField":"execute"},{"name":"add_column","kind":"act","impl":"imperative","description":"Add a new column to an existing table. Use this to add missing fields like created_at, updated_at, or any required column that doesn't exist yet.","inputSchema":{"type":"object","properties":{"tableName":{"type":"string","description":"Name of the table to add the column to"},"columnName":{"type":"string","description":"Name of the new column"},"columnType":{"type":"string","description":"SQL type: VARCHAR, INTEGER, TIMESTAMP, BOOLEAN, TEXT, UUID, DECIMAL"},"isPrimary":{"type":"boolean","description":"Whether this column is a primary key"}},"required":["tableName","columnName","columnType"]},"hasHandler":true,"hasExecute":true,"__source":"spec","executable":true,"handlerField":"execute"},{"name":"add_timestamps_to_all_tables","kind":"act","impl":"imperative","description":"Add created_at and updated_at TIMESTAMP columns to every table that is missing them. Call this once to fix all tables in a single operation.","inputSchema":{"type":"object","properties":{}},"hasHandler":true,"hasExecute":true,"__source":"spec","executable":true,"handlerField":"execute"},{"name":"export_to_sql","kind":"act","impl":"imperative","description":"Generate and return SQL CREATE TABLE statements with FOREIGN KEY constraints for all tables in the schema.","inputSchema":{"type":"object","properties":{}},"hasHandler":true,"hasExecute":true,"__source":"spec","executable":true,"handlerField":"execute"},{"name":"suggest_improvements","kind":"act","impl":"imperative","description":"Analyze the current schema and suggest improvements such as missing timestamps, missing primary keys, or unlinked tables.","inputSchema":{"type":"object","properties":{}},"hasHandler":true,"hasExecute":true,"__source":"spec","executable":true,"handlerField":"execute"},{"name":"diagnose_schema_problem","kind":"act","impl":"imperative","description":"Diagnose a developer's problem by comparing it against the current schema. Describe the error or issue and the tool will identify mismatches, missing tables, missing columns, or broken relations.","inputSchema":{"type":"object","properties":{"problem":{"type":"string","description":"The problem or error the developer is facing (e.g. 'foreign key constraint fails on orders.user_id')"}},"required":["problem"]},"hasHandler":true,"hasExecute":true,"__source":"spec","executable":true,"handlerField":"execute"},{"name":"check_schema_consistency","kind":"answer","impl":"imperative","description":"Check whether the current schema satisfies a specific requirement. Example: 'Does this schema support multi-tenant SaaS?' or 'Can this schema handle user authentication?'","inputSchema":{"type":"object","properties":{"requirement":{"type":"string","description":"The feature or requirement to check against (e.g. 'user authentication with roles', 'soft deletes', 'multi-tenancy')"}},"required":["requirement"]},"hasHandler":true,"hasExecute":true,"__source":"spec","executable":true,"handlerField":"execute"},{"name":"import_schema_from_sql","kind":"act","impl":"imperative","description":"Parse raw SQL CREATE TABLE statements and load them into the visual canvas. Supports PostgreSQL, MySQL, and SQLite syntax. Call this when the user provides or pastes SQL code.","inputSchema":{"type":"object","properties":{"sql_text":{"type":"string","description":"The full SQL text containing CREATE TABLE statements"}},"required":["sql_text"]},"hasHandler":true,"hasExecute":true,"__source":"spec","executable":true,"handlerField":"execute"},{"name":"import_schema_from_prisma","kind":"act","impl":"imperative","description":"Parse a Prisma schema file content and load the models into the visual canvas as tables. Call this when the user provides their schema.prisma file content.","inputSchema":{"type":"object","properties":{"prisma_text":{"type":"string","description":"The full content of the Prisma schema file"}},"required":["prisma_text"]},"hasHandler":true,"hasExecute":true,"__source":"spec","executable":true,"handlerField":"execute"},{"name":"delete_table","kind":"transact","impl":"imperative","description":"Remove a table and all its relations from the canvas. Also removes any relations in other tables that point to this table.","inputSchema":{"type":"object","properties":{"tableName":{"type":"string","description":"Name of the table to delete"}},"required":["tableName"]},"hasHandler":true,"hasExecute":true,"__source":"spec","executable":true,"handlerField":"execute"},{"name":"delete_relation","kind":"transact","impl":"imperative","description":"Remove a specific relation arrow between two tables on the canvas.","inputSchema":{"type":"object","properties":{"sourceTable":{"type":"string","description":"The table that has the foreign key (arrow origin)"},"targetTable":{"type":"string","description":"The table being referenced (arrow destination)"}},"required":["sourceTable","targetTable"]},"hasHandler":true,"hasExecute":true,"__source":"spec","executable":true,"handlerField":"execute"},{"name":"rename_table","kind":"act","impl":"imperative","description":"Rename an existing table. Automatically updates all relations in other tables that reference the old name.","inputSchema":{"type":"object","properties":{"oldName":{"type":"string","description":"Current name of the table"},"newName":{"type":"string","description":"New name for the table"}},"required":["oldName","newName"]},"hasHandler":true,"hasExecute":true,"__source":"spec","executable":true,"handlerField":"execute"},{"name":"get_table_details","kind":"answer","impl":"imperative","description":"Get detailed information about a specific table: all columns with types and primary key status, all outgoing relations, and all incoming relations from other tables.","inputSchema":{"type":"object","properties":{"tableName":{"type":"string","description":"Name of the table to inspect"}},"required":["tableName"]},"hasHandler":true,"hasExecute":true,"__source":"spec","executable":true,"handlerField":"execute"}],"category":"Developer Tools","favicon":"/favicons/edaad-schema.saad-abushendi.workers.dev.svg","apiSurface":"spec","toolCount":18}}