Save definition
upsert_definitionCreate a business definition on a connection, such as "active customer", or replace the one with the same name (names match in any case). Give a plain-language description and, when there is one, the SQL that computes it in the connection's dialect. AI tools read definitions from get_context. Changes what every AI tool and person on this connection reads, and is recorded in SaturnSQL with your name. Only make it when the user asked for it or confirmed it. Needs the write scope, the connection's owner or an admin, and a plan that includes Context.
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": {
"connectionId": "<connectionId>",
"name": "<name>"
},
"name": "upsert_definition"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sql | No | SQL expression or query that computes it. null removes it; omit to keep the current SQL when replacing. | |
| name | Yes | The term, e.g. "active customer". | |
| description | No | What it means. Omit to keep the current text when replacing. | |
| connectionId | Yes | Connection id from list_connections. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | No | ||
| sql | No | SQL expression or query in the connection's dialect, when the definition has one. | |
| name | No | ||
| updatedAt | No | ||
| description | No |