db-activity
Reads current database activity, blocking, waits, top queries, object definitions, or query plans from a named server using stored credentials, keeping passwords out of the model.
Instructions
dbabrain common.cli db-activity: One database object or the server's activity read: a table, a definition, what runs now, a plan.
server_id (or target) names the server; its connection or host login is completed from this node's inventory and encrypted secret store, so a request carries no password.
Request fields (pass them as request):
target: The machine or instance: a server_id, or
<db_type> <ip>[:port].credential_name: Which login in users.json; default: the instance's own.
sql_access: How to reach the SQL engine - the inventory's (the 8i bridge).
database_name: The database to read in; SQL Server: else master.
object: table-info / object-source: the object,
name,schema.nameor[schema].[name].view: db-activity: requests (default) | blocking | waits | top_queries.
sql_text: query-plan: the one statement to compile - never run.
max_rows: db-activity: rows at most, 1 to 1000 (default 50).
timeout_seconds: How long to wait.
connection: The database login, complete: db_type, host, port, username, password. The app that calls fills it from its own data/ (dbabrain.lib.data_sources.request_fill); common.cli reads no configuration (rules R09).
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": "db-activity"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| request | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |