Skip to main content
Glama

db-activity

Read-only

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.name or [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

NameRequiredDescriptionDefault
requestNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

C2.4/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnlyHint=true, openWorldHint=true and destructiveHint=false, and the description is consistent with them. It adds real behavioral context the annotations do not carry: credentials are resolved from inventory plus an encrypted secret store so no password travels in the request, and rows are capped at 1 to 1000 (default 50) with a timeout. However, it does not state what the activity read returns or what 'blocking'/'waits' actually cover, so the added value is partial.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness2/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The text is compressed but poorly structured: a run-on opening sentence, inconsistent bullet formatting, and a trailing 'connection' item whose content explains the caller's app rather than this tool. Several clauses (R09, request_fill, the 8i bridge) are implementation asides that do not help tool selection. Density is not the same as conciseness.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

An output schema exists, so return values need not be spelled out, and the read-only safety profile is covered by annotations. What remains missing is scope definition — which request fields apply here and how the result differs from db-status or run-sql. For a tool with a 0%-documented nested request object, the definition is only partially sufficient.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0% — the single `request` object is `additionalProperties: true` with no field documentation — so the description carries the full burden, and it does enumerate target, credential_name, sql_access, database_name, view, max_rows and timeout_seconds with defaults and formats. The problem is that it also describes fields (`object`, `sql_text`) that appear to belong to sibling operations, leaving an agent unsure which keys this tool honors. Substantial compensation, but muddied by the conflation.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose2/5

Does the description clearly state what the tool does and how it differs from similar tools?

The opening line bundles several distinct capabilities — 'a table, a definition, what runs now, a plan' — which map to sibling tools (table-info, object-source, query-plan) rather than to db-activity alone. Only the buried `view` field ('requests (default) | blocking | waits | top_queries') actually identifies this tool's job. An agent cannot tell from the first sentence whether it is fetching object metadata or live server activity.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

There is no statement of when to use db-activity versus db-status, run-sql, table-info, or query-plan. The description instead describes the whole CLI family's request fields, which implies the tool overlaps with its siblings without resolving the choice. The only implicit routing cue is the `view` default of 'requests'.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools