Build
Schema Manager API
Manage definitions and properties through the schema service contract.
Contract source
@gsb-core/mcp-docs:getDefDocs Overview
The GSB Schema Management API provides a comprehensive set of operations for managing entity definitions (data tables) in your GSB applications. All operations require authentication via a token, and optionally accept a tenant code.
Key Concepts
- Entity Definition: Represents a data table in the database
- Property: Represents a column in a data table
- Property Definition: Defines the data type and behavior of properties
- References: Define relationships between entities
Available Documentation
Each method below has its own reference page under /guides/schema-manager/. MCP and CLI
clients read the same text through the getSchemaManagerDocs and inspectSchemaDocs tools.
Entity Definition Management
- getCommonPropertyDefs: Get available property data types
- createEntityDef: Create a new data table
- updateEntityDef: Update an existing data table
- getEntityDef: Get a data table by ID
- queryEntityDefs: Get paginated list of data tables
Property Management
- addProperty: Add a column to a data table
- removeProperty: Remove a column from a data table
- updateProperty: Update a column in a data table
Best Practices
Entity Definition Naming
- Use PascalCase for entity names
- Use singular nouns
- Be descriptive but concise
- Avoid special characters
- Start with a letter
Property Naming
- Use camelCase for property names
- Be descriptive
- Use consistent naming patterns
- Prefix boolean properties with 'is' or 'has'
Schema Design
- Normalize appropriately
- Use references instead of duplicating data
- Add appropriate indexes
- Set searchable fields
- Define required fields
- Set appropriate field lengths