Skip to main content
Glama
aradhyas8
by aradhyas8

inspect_row

Retrieve a PostgreSQL row by its full primary key plus immediate foreign-key neighbors in one call, returning bounded related rows and status details.

Instructions

Fetch one row by its full primary key plus its depth-1 declared foreign-key neighborhood in one call. Each relation is one FK constraint: direction outgoing (rows the root references) or incoming (rows referencing the root), the related table, constraint, source_columns (referencing) paired by position with target_columns (referenced), status (ok, timeout, error), and compact rows (columns once, rows as arrays). Each relation returns up to N rows (default 5) ordered by the related table's primary key (order_by; ctid without one), never by recency; has_more means more rows existed, with no count. Relations not attempted due to the relation cap or total deadline are listed in relations_not_attempted with reason (max_relations, deadline). Values are truncated and redacted as in query, totalled in values_truncated and values_redacted. Tables without a declared primary key need query instead.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
keyYesEvery primary key column and its value, e.g. {"id": 4821}. Pass integers beyond 2^53 as strings.
tableYesSchema-qualified table name, e.g. public.users

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and does so thoroughly: it explains relation direction (outgoing/incoming), the structure of returned relation objects, row limits and ordering (never by recency), behavior of 'has_more', handling of relations not attempted (with reasons), and truncation/redaction totals. It adds substantial behavioral context beyond what the schema and absence of annotations provide.

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

Conciseness3/5

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

The description is quite long and dense, with multiple clauses packed into a single paragraph. While every sentence adds information, the lack of clear front-loading or paragraph breaks makes it harder to scan. It could benefit from more structure to separate the main action from the detailed output behavior.

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?

Given the complexity of returning a row plus its FK neighborhood, the absence of annotations, and the lack of an output schema, the description is complete enough to understand what the tool returns and how it behaves. It covers relation direction, limits, ordering, error states, and fallback conditions, leaving no critical gaps for an agent to invoke it correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema description coverage is 100%, so the schema already documents the parameters well. The description adds meaning by specifying that the key must be the full primary key and that integers beyond 2^53 can be passed as strings (though this is in the schema), and it clarifies the structure of the FK neighborhood output. While the schema does the heavy lifting, the description reinforces and extends the parameter semantics slightly.

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 clearly states the specific verb and resource: 'Fetch one row by its full primary key plus its depth-1 declared foreign-key neighborhood in one call.' This distinguishes it from the sibling 'query' by emphasizing single-row-by-primary-key retrieval and the FK neighborhood. However, the opening sentence is dense and could have been slightly more front-loaded with the core action.

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 context by stating 'Tables without a declared primary key need query instead,' which provides one exclusion and points to the alternative. However, it does not explicitly state when to use this tool versus 'query' in general, nor does it list other exclusions or prerequisites. The guidance is present but incomplete.

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

Deploy Server

Other Tools