Skip to main content
Glama
MCPg - Production-grade PostgreSQL MCP Server

MCPg - Production-grade PostgreSQL MCP Server

Get PG 19 partitions status

get_pg19_partitions_status
Read-only

Check whether PG 19 MERGE PARTITIONS and SPLIT PARTITION syntax is usable on this server, returning availability, version, and fallback guidance for older versions.

Instructions

Report whether PG 19's ALTER TABLE … MERGE PARTITIONS and ALTER TABLE … SPLIT PARTITION forms are usable on this server. Never raises — driver-level errors surface as available=false. On PG ≤ 18 reports available=false and points the agent at the detach / create / attach fallback path. Returns an object with available (bool), server_version_num (int), server_version, and detail (guidance string).

Example: get_pg19_partitions_status()

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "get_pg19_partitions_status"
  }
}

Input Schema

NameRequiredDescriptionDefault
databaseNoOptional: a database id from list_databases, to target a configured secondary (read-only) database; omit for the primary. Database names that are not configured ids are rejected.

Output Schema

NameRequiredDescriptionDefault
detailYes
availableYes
server_versionYes
server_version_numYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.8.4
    • changedInput schema / properties / database / description
      Previous value: -"Optional: target a configured secondary (read-only) database by name; omit for the primary. Call list_databases to see the configured ids."New value: +"Optional: a database id from list_databases, to target a configured secondary (read-only) database; omit for the primary. Database names that are not configured ids are rejected."
  2. First observedv0.6.8

TDQS

A4.2/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true and openWorldHint=false, so the safety profile is covered. The description does add genuinely useful behavior beyond that: 'Never raises — driver-level errors surface as available=false', plus the version-gating fallback. However, much of the remaining text enumerates return fields (available, server_version_num, server_version, detail) that an output schema already supplies, so the additive value is thinner than it first appears.

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?

Front-loaded with the core question, then error semantics, then version fallback, then the return shape — a sensible order. The return-field enumeration and the bare example line are largely redundant given an output schema and a no-arg signature, costing a little tightness.

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?

For a single-parameter, read-only capability probe with an output schema, everything an agent needs is present: what is checked, that it never raises, how failures map to available=false, and what to do on older servers. Return values need not be re-explained, so no material gap remains.

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?

With one optional parameter at 100% schema description coverage, the schema already explains the `database` id targeting and the rejection of unconfigured names. The description adds nothing about that parameter, so the schema carries it; baseline 3 applies, nudged to 4 because the tool has only one optional param and the omission causes no ambiguity.

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?

States a specific verb+resource: it reports whether PG 19's `ALTER TABLE … MERGE PARTITIONS` and `SPLIT PARTITION` forms are usable on this server. That is concrete enough to separate it from neighboring capability-probe tools like get_pg19_ddl_status, get_pg19_stats_status, and get_skip_scan_status, which cover different feature areas.

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?

Usage context is clear: an agent should probe this before attempting MERGE/SPLIT PARTITIONS, and the PG ≤ 18 branch routes it to the detach / create / attach fallback path. It does not explicitly name sibling probes as alternatives or state a 'do not use if' condition, keeping it just short of a 5.

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

Deploy Server

Other Tools