Skip to main content
Glama

diogenes-database-intelligence-mcp

Transaction Concurrency Anomaly & Isolation Level Hazard Auditor

audit_transaction_isolation
Read-onlyIdempotent

Audits database transaction workflows for concurrency anomalies, dirty reads, non-repeatable reads, and deadlock risks. Use when reviewing financial transfer procedures, inventory decrement operations, or multi-step checkout workflows; for calculating connection pool headroom, use calculate_pool_headroom instead. Stateless read-only edge call (max 32 KB, 60 RPM): accepts 'transaction_steps' ('target_isolation_level' defaults to 'read_committed'), supports '?demo=true' or L402 (15 sats), and returns HTTP 400 if invalid.

Input Schema

NameRequiredDescriptionDefault
transaction_stepsYesSequential SQL commands or description of business operations within the transaction.
strict_deadlock_checkNoWhether to perform exhaustive cross-table lock acquisition ordering analysis.
target_isolation_levelNoCandidate SQL isolation level: read committed, repeatable read, or serializable.

Output Schema

NameRequiredDescriptionDefault
deadlock_riskYesDeadlock risk severity rating (NEGLIGIBLE, MODERATE, HIGH_REVERSED_LOCK_ORDER).
recommended_isolationYesOptimal transaction isolation level to ensure ACID safety for the workload.
vulnerable_to_dirty_readsYesTrue if transactions could read uncommitted intermediate state from other sessions.
vulnerable_to_phantom_readsYesTrue if concurrent inserts could introduce phantom rows between sequential reads.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Goes well beyond the annotations, which only declare readOnly/idempotent/non-destructive/closed-world. The description adds statelessness, a 32 KB payload cap, a 60 RPM rate limit, demo-mode and L402 (15 sats) payment paths, the default isolation level, and a 400-on-invalid-input failure mode — all operationally decisive for an agent orchestrating the call.

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?

Three sentences, front-loaded with the purpose before the alternative and the operational constraints. The middle sentence is heavily parenthetical (nested quotes around parameter names plus payment/rate-limit clauses), which slightly hurts scannability but every clause carries real information.

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

Completeness5/5

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

An output schema exists, all three parameters are documented, annotations cover the safety profile, and the description supplies limits, auth/payment mode, defaults, and error behavior. Nothing an agent needs to invoke this correctly is missing.

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 100%, so the baseline is 3; the description earns an extra point by disclosing that target_isolation_level defaults to 'read_committed', a default the schema does not state. The remaining parameters, notably strict_deadlock_check, are left entirely to the schema, so it stops short of full compensation.

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

Purpose5/5

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

States a specific verb (audits) and resource (database transaction workflows) with enumerated failure modes: concurrency anomalies, dirty reads, non-repeatable reads, deadlock risks. It also explicitly names the sibling it is not (calculate_pool_headroom), so an agent can discriminate without opening either schema.

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

Usage Guidelines4/5

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

Gives concrete triggering contexts (financial transfer procedures, inventory decrement operations, multi-step checkout workflows) and routes the connection-pool-headroom case to calculate_pool_headroom. Clear positive guidance and one explicit exclusion, though no general statement of when this tool is inappropriate (e.g., non-transactional SQL review, which might belong to validate_sql_query_ast or analyze_query_plan).

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources