Build
updateProperty() — Schema Manager
Change an existing column on a data table.
Contract source
@gsb-core/mcp-docs:getDefDocs("updateProperty") Updates an existing property in an entity definition.
Request Format
updateProperty({
entityDefId: string, // ID of the entity definition to modify
propertyName: string, // Name of the property to update
property: GsbProperty, // Updated property definition
token?: string, // Authentication token
tenantCode?: string // Optional tenant code
}): Promise<{
success: boolean,
data?: boolean, // Success status
error?: string
}>
Important Notes
- The
namefield in the property object identifies which property to update - Only the fields provided in the property object will be updated
- Some property attributes cannot be changed after creation (e.g.,
definition_id)
Response Format
{
"success": boolean,
"data": boolean, // True if property was updated successfully
"error": "string" // Present only if success is false
}
Example
const property = {
name: "address", // Identifies which property to update
title: "Updated Address",
description: "Updated customer address",
isRequired: true,
maxLength: 200
};
const result = await updateProperty({
entityDefId: "entity-id",
propertyName: "address",
property: property,
token: "your-auth-token"
});
Safe vs. Unsafe Updates
Safe Updates (No data loss risk)
titledescriptionorderNumberisSearchableisIndexedformModeslistScreens
Potentially Unsafe Updates (May affect data)
isRequired(if changing from false to true)isUnique(if changing from false to true)maxLength(if decreasing)regex(if adding or making more restrictive)
Unsafe Updates (May require data migration)
definition_id(changing data type)refEntDef_id(changing referenced entity)refType(changing relationship type)