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

adaptive-pg-mcp (PostgreSQL)

delete_rows

Destructive

Deletes rows from one table that match a WHERE filter and returns affected or returning rows. Rolls back changes exceeding 100 rows to prevent accidental bulk deletes.

Instructions

Deletes 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
tableYesThe table or view to delete from, by exact name.
whereYesConditions joined by AND that pick the rows to delete.
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
Behavior4/5

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

Goes well beyond the annotations by disclosing the automatic rollback above 100 affected rows and that triggers and cascades are included in that count – a critical guard an agent cannot infer from destructiveHint=true alone. It also previews the return shape (rowsAffected plus up to 1,000 returning rows).

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, front-loaded with the action and filter, then the safety guard, then the return contract. No filler and no repetition of the name or title.

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?

An output schema exists, so return values need not be fully explained, and the description still summarizes them. The only minor gap is that it never mentions permissions or which alternative tools overlap with this mutation.

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 fully documented and the description only echoes 'where filter' and the returning cap. It adds no syntax or semantics the schema does not cover, so the baseline 3 applies.

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 and resource with precise scope: 'Deletes the rows of one table that match a where filter.' That framing distinguishes it from update_rows, read_rows and insert_rows without needing to name them, and rules out multi-table or unfiltered deletion.

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?

Usage is implied by the verb and the required where clause, but there is no explicit guidance such as when to prefer update_rows over delete+insert, or when execute_sql is the better route. The 100-row rollback is a safety behavior rather than a when-to-use rule.

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