Skip to main content
Glama

lock_wait_rca

Build the InnoDB wait-for tree, identify the root blocker, and parse the latest deadlock from SHOW ENGINE INNODB STATUS to diagnose lock-wait issues.

Instructions

[READ] Build the InnoDB wait-for tree, name the root blocker, and parse the last deadlock out of SHOW ENGINE INNODB STATUS.

Pass 'pairs' (as from lock_waits) for pure/offline analysis, or omit to pull the current lock-wait graph live.

Args: pairs: Injected lock-wait pairs {blockedId, blockingId, ...}; if omitted, pulled live (flavor-branched). include_deadlock: Also parse the LATEST DETECTED DEADLOCK section from SHOW ENGINE INNODB STATUS (default True). target: Target name from config; omit for the default.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pairsNo
targetNo
include_deadlockNo
Behavior4/5

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

No annotations are provided, so the description carries the full burden. It starts with '[READ]', clearly indicating a read-only operation. It explains the core behavior (build wait-for tree, identify root blocker, parse deadlock) and notes that the live path is 'flavor-branched'. It does not disclose return format or edge cases, but the main behaviors are transparent.

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?

The description is well-structured with a concise purpose sentence, usage guidance, and an Args section. It is not overly verbose, but the Args block repeats some default values already in the schema. Overall, it is efficient and front-loaded.

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

Completeness4/5

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

Given the tool's complexity (deadlock analysis) and lack of output schema, the description explains the inputs and high-level output expectations ('name the root blocker, parse the last deadlock'). It does not detail the response structure, but it provides enough for an agent to select and invoke the tool correctly. Sibling context helps establish its role.

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

Parameters5/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 compensate. The 'Args' section explains all three parameters: pairs (injected lock-wait pairs, omitted for live), include_deadlock (parse deadlock, default True), and target (target name, omit for default). This goes beyond the schema's bare types and defaults, providing crucial meaning for invocation.

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?

The description clearly states the tool's function: 'Build the InnoDB wait-for tree, name the root blocker, and parse the last deadlock out of SHOW ENGINE INNODB STATUS.' This specifies the verb (build, name, parse) and the resource (InnoDB wait-for tree and deadlock). It is distinct from sibling tools like lock_waits, which only list waits.

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?

The description provides clear context on when to use it: 'Pass pairs (as from lock_waits) for pure/offline analysis, or omit to pull the current lock-wait graph live.' This explains the two modes and references a sibling tool. However, it does not explicitly state when not to use it or name alternative tools for comparison.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/AIops-tools/MySQL-AIops'

If you have feedback or need assistance with the MCP directory API, please join our Discord server