Skip to main content
Glama

Create Row

db_create
Destructive

Insert a new row into a PostgreSQL table with live schema validation, automatic stripping of sensitive columns, and an optional dry-run mode to preview before writing.

Instructions

Inserts a new row into the specified table. All columns are validated against the live schema before execution — typos in column names or type mismatches are caught early. Sensitive columns (passwords, tokens, API keys, etc.) are automatically stripped from the input to prevent accidental credential storage. Use dry_run=true to preview the insert without actually writing to the database.

When to use:

  • "Add a new user named Jane with email jane@example.com"

  • "Create an order for customer 42 with total $99.99"

  • Any single-row INSERT operation

Parameter guidance:

  • table: the target table name (required)

  • data: JSON object of column-value pairs to insert (required). Example: {"name": "Jane Doe", "email": "jane@example.com", "role": "admin"}

  • dry_run: set to true to validate without writing (default: false)

Behavioral notes:

  • The table name and all column names are validated against the live schema.

  • The INSERT runs in a transaction — if any constraint is violated, the entire operation rolls back with a clear error message.

  • On success, returns the inserted row including any auto-generated values (e.g., id).

  • Sensitive columns in the input are silently stripped before execution.

  • For multiple inserts, call this tool once per row or use db_raw_query with an INSERT ... VALUES statement (requires confirmed=true and ALLOW_RAW_WRITES).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataYesJSON object of column values to insert
tableYesName of the table to query
dryRunNoIf true, simulates without writing
databaseNoName of the database to query (from pgautopilot.json). Omit to use the current default database.
Install Server

TDQS

A4.6/5.0
Behavior5/5

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

Even with annotations present, the description adds substantial behavioral detail: schema validation, sensitive-column stripping, transactional rollback on constraint violations, dry-run semantics, and the return value including auto-generated fields. These are meaningful behaviors not visible in the annotations or schema.

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

Conciseness4/5

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

The description is well organized into clear sections and front-loads the core purpose. It is somewhat long and repeats the schema-validation point twice, but the structure and examples make the information easy to consume.

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?

Despite having no output schema, the description explains what the tool returns on success, how dry_run behaves, and what validation or rollback guarantees exist. It is complete enough for an agent to call this tool correctly without opening the schema, and the database parameter is already covered in the input schema.

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 100%, so the schema already documents all parameters. The description adds a concrete data example and clarifies dry_run behavior, which is helpful. However, it refers to the parameter as dry_run while the schema defines dryRun, and it does not mention the database parameter at all, creating a minor invocation risk.

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 opens with a specific verb and resource: 'Inserts a new row into the specified table.' It clearly differentiates this from sibling tools by framing it as the single-row INSERT operation and even contrasts it with db_raw_query for multiple inserts.

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

Usage Guidelines5/5

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

The description provides explicit 'When to use' examples and gives a clear routing rule: for multiple inserts, call this tool once per row or use db_raw_query with confirmed=true. This tells an agent exactly when this tool is appropriate and when an alternative is better.

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

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/cyberreinxy/pgautopilot'

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