Skip to main content
Glama
heroku

Heroku MCP server

Official
by heroku

pg_locks

Analyze and resolve database locks and blocking transactions. Identify blocked queries, investigate deadlocks, monitor lock states, and improve performance by diagnosing concurrency issues.

Instructions

Analyze database locks and blocking transactions. Use this tool when you need to: 1) Identify blocked queries and lock chains, 2) Investigate deadlock situations, 3) Monitor transaction lock states, 4) Resolve blocking issues affecting performance. The tool helps diagnose and resolve database concurrency problems.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
appYesThe name of the Heroku app whose database locks to view.
databaseNoConfig var containing the connection string, unique name, ID, or alias of the database. To access another app's database, prepend the app name to the config var or alias with `APP_NAME::`. If omitted, DATABASE_URL is used.
truncateNoWhen true, truncates queries to 40 characters.
Behavior3/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions the tool helps 'diagnose and resolve' problems, implying both read and potential action capabilities, but doesn't specify if it's purely diagnostic or can take corrective actions. It doesn't address permissions, rate limits, or what specific output format to expect.

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

Conciseness5/5

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

The description is efficiently structured with a clear purpose statement followed by a bulleted list of use cases and a concluding sentence. Every sentence adds value with no redundant information. The front-loaded structure immediately communicates the tool's core function.

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?

For a diagnostic tool with 3 parameters and 100% schema coverage but no output schema, the description provides strong purpose and usage guidance. However, without annotations or output schema, it could better specify what information is returned (e.g., lock types, transaction IDs, query snippets) and any behavioral constraints.

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%, so the schema already fully documents all three parameters. The description doesn't add any parameter-specific information beyond what's in the schema. The baseline score of 3 is appropriate when the schema does the heavy lifting for parameter documentation.

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 purpose with specific verbs ('analyze', 'diagnose', 'resolve') and resources ('database locks', 'blocking transactions', 'concurrency problems'). It distinguishes itself from sibling tools by focusing on PostgreSQL lock analysis rather than general database operations or app management.

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

Usage Guidelines5/5

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

The description explicitly lists four specific scenarios when to use this tool: 1) identify blocked queries and lock chains, 2) investigate deadlock situations, 3) monitor transaction lock states, and 4) resolve blocking issues affecting performance. This provides clear guidance on when this tool is appropriate versus other database or monitoring tools.

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

Related 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/heroku/heroku-mcp-server'

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