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

adaptive-pg-mcp (PostgreSQL)

read_rows

Read-onlyIdempotent

Retrieves rows from a PostgreSQL table or view with optional column selection, filters, sorting, and limit, returning at most 1,000 rows.

Instructions

Reads rows of one table or view, with an optional filter, order and limit. Returns at most 1,000 rows and 1,048,576 bytes.

Input Schema

NameRequiredDescriptionDefault
limitNoThe most rows to return. Defaults to the row cap of 1,000.
tableYesThe table or view to read, by exact name.
whereNoConditions joined by AND. Omit to read every row.
schemaNoThe schema, by exact name. Defaults to public.
columnsNoColumns to return, in order. Omit for every column the login may select.
databaseYesThe database to run on.
order_byNoThe sort order, first entry first.

Output Schema

NameRequiredDescriptionDefault
rowsYesThe result rows, each an array in column order.
columnsYesThe result columns, in order.
truncatedYesTrue when the row cap, the byte cap or limit cut off more rows.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.6/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, non-destructive and closed-world, so the safety profile is covered. The description adds genuinely useful behavioral facts the annotations lack: hard caps of 1,000 rows and 1,048,576 bytes. It does not say whether hitting those caps truncates silently or raises an error, which keeps it below a 5.

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?

Two sentences, zero filler, with the operation stated first and the return-size ceiling second. Nothing redundant or buried.

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, return values need no explanation, and all seven parameters are fully described in the schema. The remaining gap is behavioral edge cases around the row/byte caps and the permission scoping implied by "every column the login may select."

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 baseline is 3, and the description only echoes the schema ("optional filter, order and limit"). It adds no extra meaning about default schema, column projection, or operator behavior beyond what the schema already documents.

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?

The description gives a specific verb and resource ("Reads rows of one table or view") plus the three optional capabilities (filter, order, limit), so an agent immediately knows the shape of the operation. It stops short of naming a sibling such as query_sql or aggregate, so differentiation is left to inference.

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?

There is no statement of when to reach for this tool over query_sql, execute_sql, aggregate, or the write siblings like insert_rows/update_rows. The only conditional guidance ("Omit to read every row") is about a parameter default rather than tool selection.

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