Skip to main content
Glama

insert_rows

Insert multiple rows into a PostgreSQL table in one batch operation. Use for bulk data insertion where all rows share the same column structure.

Instructions

Insert multiple rows into a PostgreSQL table in one batch.

Use this tool for bulk inserts where every row has the same columns.

  • table_name: table target, optionally schema-qualified

  • rows: list of objects mapping column names to values

  • returning_columns: optional list of columns to return from inserted rows

Notes:

  • Every row must use the same columns in the same order.

  • Arrays can be passed as JSON lists and psycopg adapts them automatically.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
table_nameYes
rowsYes
returning_columnsNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior3/5

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

No annotations are provided, so the description carries the full burden. It discloses key behavioral traits: it's a write operation (implied by 'Insert'), handles batch processing, requires consistent column structure across rows, and mentions automatic JSON list adaptation for arrays. However, it lacks details on permissions, error handling, transaction behavior, or rate limits, leaving gaps for a mutation tool.

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 appropriately sized and front-loaded: the first sentence states the core purpose, followed by bullet points for parameters and notes. Every sentence adds value (e.g., usage context, parameter details, constraints), with no redundant or wasted information, making it efficient and well-structured.

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's complexity (a mutation with 3 parameters, 0% schema coverage, no annotations, but with an output schema), the description is largely complete. It covers purpose, usage, parameters, and constraints. However, as a mutation tool without annotations, it could benefit from more behavioral details (e.g., side effects, error cases), though the output schema reduces the need to explain return values.

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

Parameters5/5

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

Schema description coverage is 0%, so the description must compensate fully. It adds significant meaning beyond the schema: explains 'table_name' as 'table target, optionally schema-qualified', 'rows' as 'list of objects mapping column names to values', and 'returning_columns' as 'optional list of columns to return from inserted rows'. This clarifies the purpose and format of each parameter effectively.

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 specific action ('Insert multiple rows into a PostgreSQL table in one batch'), identifies the resource ('PostgreSQL table'), and distinguishes it from sibling tools like 'insert_row' (singular) by emphasizing 'bulk inserts' and 'multiple rows'. It explicitly defines the scope and verb.

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 guidance on when to use this tool ('for bulk inserts where every row has the same columns') and implicitly distinguishes it from alternatives like 'insert_row' (for single rows) and 'execute_readonly_sql' (for queries). It also includes usage notes ('Every row must use the same columns in the same order'), offering clear context for application.

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/antonov2010/mcp-dev'

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