sql-target-add
Add or replace a SQL task target by specifying the server, instance or database, credentials, time window, notifications, and output so runs execute and report correctly.
Instructions
dbabrain common.cli sql-target-add: A SQL task's WHERE and WHEN.
Changes or removes something. A command on the emergency-operations list takes confirm: "yes" and a reason in its request, as on the command line.
Request fields (pass them as request):
sql_id (required): The task.
server_id (required): The machine.
target_no: The target number.
instance_name: The instance.
service_name: A label.
database_name: One database.
credential_name: Which login in users.json; default: the instance's own.
sql_access: How to reach the SQL engine, overriding the instance's block.
time_window: When it runs.
manual_only: Only when asked for.
notify: Who hears about it.
logging_on_run: The flat form: send a message when each run starts, to logging_chat. A boolean - the parser reads it as one; the whole block goes under notify. Described as an object until 0.27.0, so R49 refused the form the command'...
alert_on_error: The flat form: send a message when a run fails, to error_chat. A boolean - the parser reads it as one; the whole block goes under notify. Described as an object until 0.27.0, so R49 refused the form the command's own ...
logging_chat: Progress chat level.
logging_chat_id: Or a chat id.
error_chat: Failure chat level.
error_chat_id: Or a chat id.
output: What it does with its result set.
output_chat: Where the result goes.
output_chat_id: Or a chat id.
output_max_rows: Rows sent to a chat.
active: Switched on.
note: Why it exists.
replace: Overwrite this target.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "sql-target-add"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| request | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |