Skip to main content
Glama
devopam

MCPg - Production-grade PostgreSQL MCP Server

Generate test row for

generate_test_row_for
Read-only

Creates a single realistic test row for a database table, using column-name heuristics and foreign key sampling to produce a valid INSERT statement for shadow migration testing.

Instructions

Generate ONE realistic test row for a table — catalogue-aware. Skips identity / generated columns (server fills them in), samples one existing row from each referenced table for FK columns (so the row inserts cleanly), and uses column-name heuristics (*_emailuser_N@example.com, *_urlhttps://example.com/r/N, *_at → recent timestamp, etc.) to make values look like data. Sibling of generate_test_data (bulk) — designed for the shadow-migration workflow where a single realistic row matters more than volume. Returns an object with insert_sql (one ready-to-execute INSERT), columns (per-column ColumnFill with sql_literal + heuristic explanation), schema, table. Does NOT execute the INSERT — caller applies via run_write when ready.

Example: generate_test_row_for(schema='public', table='orders', seed=42)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
seedNo
tableYes
schemaYes
databaseNoOptional: target a configured secondary (read-only) database by name; omit for the primary. Call list_databases to see the configured ids.
follow_foreign_keysNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
tableYes
schemaYes
columnsYes
insert_sqlYes
Behavior4/5

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

Annotations declare readOnlyHint=true, indicating no modification. The description adds behavioral context: it generates SQL but does not execute, it uses column-name heuristics for realistic values. No contradiction with annotations.

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?

The description is detailed yet concise, front-loading the core purpose and then providing behavioral details and return structure. The example is included. Every sentence is informative and earns its place.

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?

Given the tool has 5 parameters (2 required) and an output schema, the description covers the purpose, usage context, return object structure (insert_sql, columns, schema, table), and behavioral details. Minor gaps exist (seed, follow_foreign_keys details), but overall it is fairly 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 coverage is low (20%). The description adds meaning for the 'database' parameter (optional secondary DB) and implies 'follow_foreign_keys' by mentioning sampling FK columns. However, 'seed' is not explained, and 'follow_foreign_keys' behavior when false is not described. The example helps but leaves gaps.

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?

The description clearly states the tool generates one realistic test row for a table, is catalogue-aware, and distinguishes itself from the sibling 'generate_test_data' (bulk). It specifies the behavior: skipping identity/generated columns, sampling FK rows, and using heuristics for realistic values.

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

Usage Guidelines4/5

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

The description explicitly mentions it is designed for the shadow-migration workflow where a single realistic row matters more than volume, and that it does not execute the INSERT (caller uses run_write). It distinguishes from the bulk sibling, but does not exclude other potential alternatives like manual SQL generation, but this is sufficient.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/devopam/MCPg'

If you have feedback or need assistance with the MCP directory API, please join our Discord server