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.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"connection": "<connection>",
"term": "<term>",
"definition": "<definition>",
"sql_expression": "<sql_expression>"
},
"name": "add_glossary_term"
}
}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. |