Skip to main content
Glama
call518

MCP PostgreSQL Operations

get_current_database_info

Retrieve details about your active PostgreSQL database connection, including name, encoding, locale, and size, to confirm context in multi-database environments.

Instructions

[Tool Purpose]: Get information about the current database connection

[Exact Functionality]:

  • Show the name of the currently connected database

  • Display database-specific information like encoding, locale, and size

  • Provide connection context for clarity in multi-database environments

[Required Use Cases]:

  • When user asks "what database am I connected to?", "current database", etc.

  • When clarifying database context for analysis operations

  • When troubleshooting connection issues or confirming target database

[Strictly Prohibited Use Cases]:

  • Requests for database structure changes or creation/deletion

  • Requests for user authentication or permission changes

  • Requests for configuration modifications

Args: database_name: Target database to get info for (uses default connection if omitted)

Returns: Current database name and related information for connection clarity

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
database_nameNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/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 effectively describes the tool's behavior as a read-only operation (implied by 'Get information'), specifies it provides connection context, and clarifies it uses a default connection if no database_name is provided. However, it doesn't mention potential rate limits, error conditions, or authentication requirements, leaving some behavioral aspects uncovered.

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 clear sections ([Tool Purpose], [Exact Functionality], etc.) and front-loaded key information. It's appropriately sized for the tool's complexity, with no redundant sentences. A minor point: the 'Args' and 'Returns' sections are somewhat redundant with the structured fields, but they're brief and integrated.

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?

Given the tool's low complexity (1 optional parameter), no annotations, but with an output schema (which handles return values), the description is complete. It covers purpose, usage guidelines, behavioral aspects, and parameter semantics adequately, providing all necessary context for an AI agent to use the tool correctly without over-explaining.

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?

The description adds meaningful context for the single parameter beyond the schema (which has 0% coverage). It explains that database_name is optional ('uses default connection if omitted') and specifies it's the 'Target database to get info for,' clarifying its role. This compensates well for the low schema coverage, though it doesn't detail format constraints (e.g., string requirements).

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 explicitly states the tool's purpose as 'Get information about the current database connection' with specific details about what information is retrieved (name, encoding, locale, size, connection context). It clearly distinguishes from siblings like get_database_list (which lists databases) or get_database_schema_info (which provides schema details) by focusing on the current connection's metadata.

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 provides explicit guidance with '[Required Use Cases]' (e.g., when user asks about current database, clarifying context, troubleshooting) and '[Strictly Prohibited Use Cases]' (e.g., structure changes, authentication, configuration modifications). This clearly defines when to use this tool versus alternatives, including exclusions.

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/call518/MCP-PostgreSQL-Ops'

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