add_glossary_term
Define a business glossary term that maps plain-language phrases to SQL expressions. Teach the semantic layer common business terms for consistent query generation.
Instructions
Define a business glossary term that maps business language to a SQL expression.
Use to teach the semantic layer phrases like 'active customer' so future grounding and generation apply them consistently. For a named, reusable aggregate (a KPI) use add_metric instead. Returns the new term's id.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| connection | Yes | Target database connection — its name or id (case-insensitive). List the available connections with list_connections. | |
| term | Yes | The business term being defined (e.g. 'active customer'). | |
| definition | Yes | Plain-language meaning of the term. | |
| sql_expression | Yes | SQL snippet/predicate that implements the term (e.g. a WHERE condition). | |
| related_tables | No | Optional list of table names the term applies to. |