Skip to main content
Glama
heroku

Heroku MCP server

Official
by heroku

pg_psql

Run SQL queries to analyze, modify, or troubleshoot Heroku PostgreSQL databases. Execute commands or file-based queries with credential management for direct database access.

Instructions

Execute SQL queries against Heroku PostgreSQL databases. Use this tool when you need to: 1) Run SQL queries for database analysis, 2) Investigate database locks and performance, 3) Make schema modifications or updates, 4) Execute complex database operations. The tool provides direct SQL access with support for file-based queries and credential management.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
appYesapp to run command against
commandNoSQL command to run; file is ignored if provided; must be single line; must supply either command or file
credentialNocredential to use
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.
fileNoSQL file to run; command is ignored if provided; must be an absolute path; must supply either command or file
Behavior3/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 of behavioral disclosure. It mentions 'direct SQL access with support for file-based queries and credential management', which adds some context about capabilities, but it does not disclose critical behavioral traits such as whether queries are read-only or can modify data, potential risks of destructive operations, authentication requirements beyond credential management, or rate limits. The description provides basic operational context but leaves significant gaps for a tool with SQL execution capabilities.

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 appropriately sized and front-loaded, starting with the core purpose and followed by a bulleted list of use cases and additional features. Every sentence earns its place by clarifying usage, but it could be slightly more concise by integrating the list into a smoother narrative. Overall, it is efficient with minimal waste.

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?

Given the complexity of a SQL execution tool with no annotations and no output schema, the description is moderately complete. It covers the purpose and usage guidelines well but lacks details on behavioral traits like safety, error handling, or return values. For a tool that can perform potentially destructive operations, more context on risks and outcomes would improve completeness, making it adequate but with clear gaps.

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 documents all five parameters thoroughly (e.g., 'app' as the app to run against, 'command' as the SQL command). The description does not add meaning beyond what the schema provides, such as explaining parameter interactions or providing examples. With high schema coverage, the baseline score of 3 is appropriate, as the description does not compensate with additional semantic insights.

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 ('Execute SQL queries') and resources ('against Heroku PostgreSQL databases'), distinguishing it from sibling tools like pg_backups or pg_info which focus on backups or database information rather than direct SQL execution. It explicitly lists four use cases, making the purpose unambiguous and comprehensive.

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 for when to use this tool by listing four specific scenarios (e.g., 'Run SQL queries for database analysis', 'Make schema modifications'), but it does not explicitly state when not to use it or name alternatives among sibling tools like pg_backups for backup-related tasks or pg_info for database metadata. The guidance is helpful but lacks explicit exclusions or comparisons.

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