Skip to main content
Glama

trace-session

Read-only

Identify which sessions to trace on a single database instance by session ID, blockers, or long-running transactions, with logins pulled from the encrypted store so no password is sent.

Instructions

dbabrain common.cli trace-session: Which sessions to trace on one instance. 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].

  • session_id: One session.

  • blocking_only: Only blockers.

  • min_tran_seconds: Only transactions open this long.

  • key: The secret-store passphrase, when not in the environment.

  • key_base64: The same, base64.

  • connection: The database login, complete: db_type, host, port, username, password - and, where they apply, database, instance_name, service_name, sqlserver_driver, sqlserver_tls_verify and sql_access (the 8i bridge); server_id an...

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": "trace-session"
  }
}

Input Schema

NameRequiredDescriptionDefault
requestNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, destructiveHint=false and openWorldHint, so the safety profile is covered. The description does add genuinely useful behavior not in the annotations: credentials are resolved from the node's inventory and encrypted secret store, so no password travels in the request, and an optional secret-store passphrase can be supplied via key/key_base64. It stops short of explaining what the tool actually returns or how 'trace' semantics work.

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

Conciseness3/5

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

The scoping sentence is front-loaded, which is good, but the body degenerates into a long field-by-field dump copied from CLI help, and it is cut off mid-item. It reads as pasted reference material rather than a curated definition.

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 described, and the parameter surface is largely covered. However, for a tool whose name hinges on the ambiguous term 'trace', the definition never explains what happens during the call or how results should be interpreted, and the truncated connection/server_id text leaves gaps.

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

Parameters4/5

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

Schema coverage is 0% and the schema exposes a single opaque free-form 'request' object, so the description carries nearly the whole burden and does so well by enumerating target, session_id, blocking_only, min_tran_seconds, key, key_base64 and the full connection sub-structure. It also explains the server_id-vs-target duality and that credential fields are filled from inventory. It loses points for truncating mid-sentence ('server_id an...'), leaving the list incomplete.

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

Purpose3/5

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

The opening line 'Which sessions to trace on one instance' names the resource (sessions) and the scope (one instance), but it is a noun phrase with no clear verb, leaving it ambiguous whether the tool lists candidate sessions, enables tracing, or reports tracing status. It also never distinguishes itself from any sibling such as db-activity, which an agent would plausibly confuse it with.

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 when-to-use or when-not-to-use guidance and no named alternative. The field list implies filter-based querying (blocking_only, min_tran_seconds), but the agent is left to infer this; nothing states prerequisites such as needing a reachable instance or an authorized credential.

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