Skip to main content
Glama

detect_table_locks

Map lock levels (AccessExclusiveLock, ShareLock) acquired per SQL statement in a migration to identify table locks before execution.

Instructions

Map out lock levels (AccessExclusiveLock, ShareLock) acquired per statement in migration.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sqlYesRaw SQL migration text to inspect.
dialectNoTarget SQL dialect (default: 'postgres').

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

C2.9/5.0
Behavior2/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 says nothing about whether the SQL is executed or only parsed, whether the operation is read-only, or what happens with unsupported dialects. For an analysis tool operating on raw SQL, the execution/safety profile is a meaningful omission.

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 core concept (lock levels per statement) front-loaded and zero filler. It is efficient, though it errs toward terseness given the absence of annotations and output schema.

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 and no annotations, the description should explain the return shape and execution semantics. It does convey the essential idea (lock levels mapped per statement), which is the minimum viable for this analysis tool, but leaves the response format and read-only behavior unspecified.

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 description coverage is 100% for both parameters (sql, dialect), so the schema already documents them fully. The description adds no syntax, format, or dialect-handling detail beyond what the schema provides, which matches the baseline 3.

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 states a specific verb ('Map out') and resource ('lock levels ... acquired per statement in migration'), naming concrete examples (AccessExclusiveLock, ShareLock) that make the scope unambiguous. It is clearly distinguishable from siblings like inspect_schema_diff or generate_dry_run_plan, though it never names them explicitly.

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 statement, no prerequisite, and no mention of the three sibling tools. The 'in migration' phrasing implies a migration-analysis context, but the agent gets no guidance on when to pick this over analyze_migration_safety.

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