Skip to main content
Glama
itunified-io

mcp-postgres

by itunified-io

pg_upsert

Insert or update rows in a PostgreSQL table, handling conflicts on specified columns. Requires explicit confirmation for execution.

Instructions

Insert or update on conflict. Requires confirm=true.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tableYesTable name
schemaNoSchema name (default: 'public')
targetYesTarget name from ~/.dbx/targets/
valuesYesJSON array of values to insert
columnsYesJSON array of column names
confirmYesMust be 'true' to execute this destructive operation
conflict_columnsYesJSON array of columns for ON CONFLICT clause
Behavior2/5

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

With no annotations, the description carries full burden. It indicates destructiveness via 'confirm=true' but fails to disclose return behavior, side effects, or what happens on conflict beyond 'update'.

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?

Description is very brief (two sentences) and front-loads the purpose. Could be improved by adding a bit more context without becoming verbose.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool with 7 required parameters and no output schema, the description lacks details on return values, prerequisites (e.g., needing a connection), and precise behavior of the upsert logic.

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 coverage is 100%, so baseline is 3. Description adds no parameter-specific meaning; the name 'pg_upsert' and brief purpose already imply the conflict_columns purpose.

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?

Description clearly states 'Insert or update on conflict' which explains the upsert functionality. However, it does not explicitly differentiate from sibling tools pg_insert and pg_update, leaving ambiguity for agents.

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

Usage Guidelines2/5

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

Only mentions 'Requires confirm=true' as a usage requirement. No guidance on when to use this tool over pg_insert or pg_update, nor any prerequisites like an active connection.

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/itunified-io/mcp-postgres'

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