Build
updateEntityDef() — Schema Manager
Change the metadata of an existing data table.
Contract source
@gsb-core/mcp-docs:getDefDocs("updateEntityDef") Updates an existing entity definition with new schema information.
Request Format
updateEntityDef(
entityDef: GsbEntityDef, // Entity definition object with ID
token: string, // Authentication token
tenantCode?: string // Optional tenant code
): Promise<{
success: boolean,
data?: boolean, // Success status
error?: string
}>
Important Notes
- The
idfield in the entityDef object is required for updates - Only the fields provided in the entityDef object will be updated
- To update properties, use the dedicated property management methods
Response Format
{
"success": boolean,
"data": boolean, // True if update was successful
"error": "string" // Present only if success is false
}
Example
const entityDef = {
id: "12345", // Required for update
title: "Updated Customer Information",
description: "Updated customer data storage"
};
const result = await updateEntityDef(entityDef, "your-auth-token");
Schema Evolution
When updating entity definitions:
- Changing
nameordbTableNamewill rename the database table - Setting
isActive: falsewill disable operations on the entity - Updating
publicAccesswill change security settings - Modifying
activityLogLevelwill change audit trail behavior
Be careful when updating entity definitions in production systems, as some changes may affect existing data or application behavior.