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

adaptive-pg-mcp (PostgreSQL)

insert_rows

Destructive

Inserts rows into a PostgreSQL table. Rolls back calls changing more than 100 rows, triggers and cascades included, and returns affected count plus requested returning rows.

Instructions

Inserts rows into one table. 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
rowsYesThe rows to insert. An omitted column takes its default.
tableYesThe table or view to insert into, by exact name.
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

A3.9/5.0
Behavior4/5

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

Annotations already flag destructiveHint=true and the absence of idempotency, so the safety profile is largely covered. The description adds genuinely new behavioral facts: a hard rollback threshold at 100 affected rows, that triggers and cascades count toward that limit, and that the call returns rowsAffected plus capped 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 sentences, zero filler, with the operation stated first and the consequential rollback limit immediately after. Nothing here could be removed without losing information.

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?

An output schema exists, so return shape doesn't need explaining, and the 100% parameter coverage handles the inputs. What remains — the silent rollback guardrail, trigger/cascade counting, and single-table restriction — is exactly the non-obvious information an agent needs before calling a destructive write.

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 every parameter including rows, table, schema, database, and returning is already documented with defaults. The description adds only the 1,000-row cap on the returning output, which is a marginal contribution beyond the schema's baseline.

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 ("Inserts rows into one table") and bounds scope to a single table, which separates it in practice from update_rows, delete_rows, and the free-form execute_sql. It never names those siblings explicitly, which keeps it short of a 5.

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: use this to add rows rather than to modify or remove them. There is no explicit when-to-use or when-not guidance, and no steer toward execute_sql for cases this tool can't express (e.g. multi-table inserts).

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