Skip to main content
Glama
adaptive-pg-mcp (PostgreSQL)

adaptive-pg-mcp (PostgreSQL)

update_rows

Destructive

Modify table rows that match a WHERE filter in PostgreSQL, automatically rolling back changes above 100 rows and reporting affected plus returning rows.

Instructions

Updates the rows of one table that match a where filter. Rolls back a call that changes more than 100 rows, triggers and cascades included. Returns rowsAffected and up to 1,000 returning rows.

Input Schema

NameRequiredDescriptionDefault
setYesThe columns to set and their new values.
tableYesThe table or view to update, by exact name.
whereYesConditions joined by AND that pick the rows to update.
schemaNoThe schema, by exact name. Defaults to public.
databaseYesThe database to run on.
returningNoColumns to return from each changed row. Omit to return none.

Output Schema

NameRequiredDescriptionDefault
rowsYesThe result rows, each an array in column order.
columnsYesThe result columns, in order.
rowsAffectedYesThe number of rows changed.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4/5.0
Behavior5/5

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

Adds real behavioral context beyond the annotations: an automatic rollback when more than 100 rows would change, and the warning that triggers and cascades are included in that count. This is exactly the kind of side-effect disclosure an agent needs before a destructive mutation, and it complements rather than repeats destructiveHint=true.

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

Conciseness5/5

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

Three short sentences with zero filler: scope first, safety guard second, return contract third. Every clause carries information an agent would otherwise have to discover by trial.

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?

With an output schema present and rich annotations, the description covers the essentials: mutation scope, the rollback threshold, cascade behavior, and return shape. Minor omissions such as transaction/atomicity semantics or permission requirements keep it from being fully complete.

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 parameters are already well documented. The description adds only one meaningful detail beyond the schema — the 1,000-row cap on 'returning' — which is useful but limited; 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?

States a specific verb and resource ('Updates the rows of one table that match a where filter'), scoping it to a single table and a filter predicate. It does not name or distinguish itself from siblings like execute_sql or insert_rows, so the agent must infer the boundary from the name alone.

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

Usage Guidelines3/5

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

The description implies usage through the 'where filter' phrasing but never states when to choose this over execute_sql or execute_ddl, nor any prerequisites. The when-to-use case is inferable from the tool name but not spelled out.

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