Skip to main content
Glama
call518

MCP PostgreSQL Operations

by call518

get_current_database_info

Retrieves details about the current PostgreSQL database connection, including name, encoding, locale, and size, to confirm which database you are targeting.

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

Input Schema

NameRequiredDescriptionDefault
database_nameNoTarget database to get info for (uses default connection if omitted)

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv3.4.3
    • addedInput schema / properties / database_name / description
      Added value: +"Target database to get info for (uses default connection if omitted)"
  2. Changed6 schema fields changedv3.4.2
    • addedInput schema / additionalProperties
      Added value: +false
    • addedInput schema / properties / database_name / anyOf
      Added value: +[
      +  {
      +    "type": "string"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • removedInput schema / properties / database_name / title
      Removed value: -"Database Name"
    • removedInput schema / properties / database_name / type
      Removed value: -"string"
    • removedOutput schema / properties / result / title
      Removed value: -"Result"
    • removedOutput schema / title
      Removed value: -"_WrappedResult"
  3. Addedv1.0.0

TDQS

A3.8/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does so reasonably: 'Get/Show/Display' make clear this is a read-only, non-destructive introspection call, and the multi-database/connection-context framing explains why it exists. It stops short of stating permission requirements or what happens when the target database is unreachable.

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

Conciseness3/5

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

The bracketed section headers make it scannable and purpose is front-loaded, but the functionality bullets largely restate the opening sentence, and several prohibited use cases (auth changes, config modifications) are things no sane agent would attempt with this tool, so they are low-value padding.

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?

The tool is simple, has an output schema documenting return values, and one fully documented optional parameter; the description covers purpose, scope, and triggers adequately. The only real gap is the unmentioned ability to target a different database via the parameter.

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 single optional database_name parameter is already documented in the schema. The description never mentions that a non-default database can be targeted, but with full schema coverage the baseline of 3 applies.

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 names a specific verb and resource ('Get information about the current database connection') and enumerates exactly what is returned (name, encoding, locale, size). It implicitly distinguishes itself from sibling get_database_list by scoping to the *current* connection, but it never names that sibling explicitly.

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?

It gives concrete trigger phrases ('what database am I connected to?') and explicit prohibited categories, which is well above typical. The exclusions, however, are out-of-scope mutating operations rather than real alternatives, and no sibling tool is offered as a substitute for overlapping cases like database size.

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