Skip to main content
Glama

generate_db_integration_test

Generate database integration tests against a real database (Testcontainers): create/read/update/delete, transaction rollback and unique-constraint tests with your sample data. Prisma, TypeORM (TypeScript) or plain drivers (Python).

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "database": "<database>",
      "tableName": "<tableName>"
    },
    "name": "generate_db_integration_test"
  }
}

Input Schema

NameRequiredDescriptionDefault
ormNoprisma/typeorm → TypeScript + Jest; others → Python + pytest with the plain driver
modelNoPrisma model / TypeORM entity name (default: singular PascalCase of tableName)
databaseYes
operationNo
sampleRowNoA valid record without id, e.g. {"email": "a@b.co", "total_cents": 1200}
schemaSqlNoCREATE TABLE statement for the plain-driver (Python) tests
tableNameYes
entityPathNoTypeORM entity import path (default ../src/entities/<Entity>)
uniqueFieldNoColumn with a unique constraint (enables the duplicate test)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed6 schema fields changed
    • addedInput schema / properties / entityPath
      Added value: +{
      +  "description": "TypeORM entity import path (default ../src/entities/<Entity>)",
      +  "type": "string"
      +}
    • addedInput schema / properties / model
      Added value: +{
      +  "description": "Prisma model / TypeORM entity name (default: singular PascalCase of tableName)",
      +  "type": "string"
      +}
    • addedInput schema / properties / orm / description
      Added value: +"prisma/typeorm → TypeScript + Jest; others → Python + pytest with the plain driver"
    • addedInput schema / properties / sampleRow
      Added value: +{
      +  "description": "A valid record without id, e.g. {\"email\": \"a@b.co\", \"total_cents\": 1200}",
      +  "type": "object"
      +}
    • addedInput schema / properties / schemaSql
      Added value: +{
      +  "description": "CREATE TABLE statement for the plain-driver (Python) tests",
      +  "type": "string"
      +}
    • addedInput schema / properties / uniqueField
      Added value: +{
      +  "description": "Column with a unique constraint (enables the duplicate test)",
      +  "type": "string"
      +}
  2. First observed

TDQS

B3.4/5.0
Behavior3/5

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

With no annotations, the description carries the full behavior burden. It usefully discloses that tests run against a real database via Testcontainers and enumerates the test kinds produced, but it omits key operational facts: whether Docker is required, where files are written, whether existing tests are overwritten, and whether anything executes at generation time.

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?

Two dense sentences with no filler, and the most identifying information (real database, Testcontainers) is front-loaded. The stack support sentence is slightly terse and would read better as an explicit mapping, but nothing is wasted.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 9-parameter generator with no output schema and no annotations, the description covers what is produced and in which language/framework, but not how or where output lands or what runtime prerequisites exist. The 'migration' operation mode is never described anywhere in prose, which leaves a meaningful hole for a complex tool.

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 67%, so the schema documents most parameters, and the description adds meaning for a few: sample data maps to sampleRow, the ORM/language split maps to orm, and the unique-constraint test maps to uniqueField. It is silent on the 'migration' operation value and on entityPath/schemaSql, leaving real gaps at a 9-parameter surface.

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 definition uses a specific verb and resource ("Generate database integration tests") and pins down the scope with "against a real database (Testcontainers)" plus the concrete test categories (CRUD, transaction rollback, unique constraint). That phrasing implicitly separates it from generate_api_integration_test and generate_grpc_integration_test, though no sibling is named explicitly.

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 gives implied usage context: reach for this when you have a real database and want Testcontainers-backed tests, and it clarifies the target stack (Prisma, TypeORM, or plain drivers). It never states when NOT to use it, nor routes the agent toward a sibling such as generate_api_integration_test for non-database targets, so selection still requires inference.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.