Skip to main content
Glama

scan_recent_db_errors_in_logs

Read-onlyIdempotent

Scans workspace log files for recent SQL, JPA, Hibernate, constraint, and bad-data exceptions to diagnose database errors from application logs.

Instructions

Scans application log files in the current workspace (pass project_dir or log_path) for recent SQL, JPA, Hibernate, constraint, and bad-data exceptions.

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": "scan_recent_db_errors_in_logs"
  }
}

Input Schema

NameRequiredDescriptionDefault
log_pathNo
tail_linesNo
max_matchesNo
project_dirNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

B3.2/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, destructiveHint=false and openWorldHint=false, so the safety profile is covered. The description usefully adds workspace scoping and the specific exception categories it matches. It does not disclose how much of the log is read, whether results are deduplicated or capped, or what a match record contains.

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

Conciseness4/5

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

A single tight sentence with the resource and purpose front-loaded and the parameter hint in a parenthetical. No filler or repetition. Slightly compressed in a way that leaves the two undocumented parameters unaddressed.

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?

With no output schema, the description should say what a scan returns (matching lines, counts, timestamps?), and it does not. Combined with zero schema coverage on two of four parameters, there are real gaps for a tool whose whole value is the shape of its findings. Annotations do cover the safety side, which keeps this at a middling score.

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

Parameters2/5

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

Schema description coverage is 0%, so the description must carry the load, and it only covers two of four parameters. 'project_dir' and 'log_path' are mentioned but without format, precedence, or mutual-exclusivity rules, and 'tail_lines' and 'max_matches' are not addressed at all despite being meaningful controls over scan depth and result volume.

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

Purpose4/5

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

The description pairs a specific verb ('Scans') with a specific resource ('application log files in the current workspace') and enumerates the target error classes (SQL, JPA, Hibernate, constraint, bad-data exceptions). This clearly separates it from the query/remediation siblings. It stops short of explicitly contrasting itself with any named sibling, so it lands at 4 rather than 5.

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

Usage Guidelines3/5

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

Usage is only implied: an agent can infer it should call this when hunting recent DB-related exceptions in logs. The parenthetical 'pass project_dir or log_path' is argument guidance, not when-to-use guidance. There is no statement of when NOT to use it or which sibling to prefer for diagnosis versus log scanning.

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