Skip to main content
Glama

generate_seed

Generates a seed file for a resource, inserting faker-generated realistic records into the database for Prisma, Drizzle, or Mongoose.

Instructions

Creates a database seed file for a resource — a script that inserts realistic development data into your database so you don't manually populate tables while building features. The seed file is ORM-aware: it outputs to prisma/seeds/.ts for Prisma, db/seeds/.ts for Drizzle, or seeds/.ts for Mongoose. Each seed record uses faker-generated realistic values matching the resource's field types. Run generate_resource first for the resource you want to seed. After generating, you run the seed via 'npm run seed' in the project directory to insert the data. Use count to control how many records to generate — 10 is fine for development, 50-100 for load testing or demo environments. Maximum 1000.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
resourceYesResource name in PascalCase — must start with an uppercase letter. Must match an existing resource generated by generate_resource. Examples: 'Product', 'User', 'Appointment'.
countNoNumber of seed records to generate. Use 5-10 for quick development setups where you just need sample data. Use 50-100 for demo environments, load testing, or populating dropdowns with realistic options. Max 1000.
dirNoAbsolute or relative path to the BackGen-generated project directory. Defaults to the current working directory. Example: '/home/user/projects/my-api'.
Behavior4/5

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

With no annotations, the description carries full burden. It discloses ORM-awareness, output paths, faker usage, prerequisite (generate_resource), and how to run the seed. It does not mention error handling for missing resource or invalid dir, nor idempotency. Overall, it covers key behaviors well with minor gaps.

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 a single paragraph of about 150 words, adequately concise but could be better structured (e.g., bullet points for counts, output paths). It front-loads the main action but repeats count guidance. Some sentences could be trimmed for brevity without loss.

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 no output schema and no annotations, the description covers purpose, prerequisite, usage, output paths, and execution steps. It lacks return value description and error scenarios, but overall it is fairly complete for a 3-parameter tool with clear schema descriptions.

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 description coverage is 100%, so baseline is 3. The tool description adds little beyond the schema: it repeats count usage and prerequisite for resource but does not introduce new semantic details. The parameter information in description is largely redundant with the schema.

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's purpose: creating a database seed file for a resource with realistic data. It uses specific verbs ('Creates a database seed file') and distinguishes itself by mentioning the prerequisite generate_resource, which is a sibling tool. The purpose is unambiguous and differentiates from other tools like generate_factory implicitly.

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 provides clear usage context: use after generate_resource, for development or load testing, with count recommendations. However, it does not explicitly state when not to use this tool or compare it to alternatives like generate_factory. The prerequisite is clearly stated, but more explicit guidance on when to choose seed vs factory would improve clarity.

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/IbrahimKhaled19/BackGen'

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