Skip to main content
Glama

generate_code

Generate a new single file from a specification. Returns structured, saveable content without writing to disk.

Instructions

Generate a brand-new single file (Repository, Service, Controller, DTO, Entity, Validator, Middleware, Background Job, Migration, Stored Procedure, View, Interface, Extension, Configuration, etc.) from a specification using DeepSeek. Returns structured, saveable file content — never writes to disk itself.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
specYesFull specification of what to generate: purpose, inputs/outputs, behavior, dependencies
modelNoModel to use
languageNoTarget programming language (e.g. typescript, csharp, python)
providerNoAI Provider
file_nameNoDesired file name
file_typeNoKind of file (e.g. Repository, Service, Controller, DTO, Entity, Validator, Middleware, Background Job, Migration, Stored Procedure, View, Interface, Extension, Configuration)
frameworkNoFramework in use (e.g. ASP.NET Core, NestJS, Express, Spring Boot)
architectureNoArchitecture to follow (e.g. Clean Architecture, Onion, Vertical Slice, Modular Monolith, Microservices, CQRS, Repository+UoW)
coding_styleNoCoding style/formatting conventions to follow
project_rulesNoProject-specific rules or constraints the generated code must respect
target_folderNoTarget folder/namespace the generated file(s) belong to
design_patternNoSpecific design pattern(s) to apply
project_contextNoExisting project tree, dependencies, namespaces, or conventions the output must match
naming_conventionNoNaming convention to follow (e.g. PascalCase classes, camelCase methods)
Behavior4/5

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

With no annotations, the description carries the transparency burden. It discloses the key behaviors: returns content, never writes to disk, and uses DeepSeek. This is useful for an agent to know there are no filesystem side effects. However, it does not mention potential length limits, model cost, or exact response schema.

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 a single, well-structured sentence that front-loads the core action ('Generate a brand-new single file') and packs in a comprehensive list of file types plus a critical behavioral caveat. It avoids redundant boilerplate and earns each word.

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 14 parameters and no output schema, the description provides a concise but adequate overview: generation source (specification), model (DeepSeek), and return format (structured, saveable content). It does not detail parameter relationships or the exact JSON return envelope, but the schema fills parameter gaps and the key output behavior is clear.

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?

The input schema already has 100% description coverage for all 14 parameters, including detailed definitions for spec, file_type, and other fields. The description adds no parameter-specific semantics beyond what the schema provides, only referencing 'specification' and file type examples already in 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?

Description states the tool generates a brand-new single file from a specification, enumerating supported file types (Repository, Service, Controller, etc.). It distinguishes itself by returning saveable content and explicitly not writing to disk, a unique trait among sibling generation tools.

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 implies appropriate usage: use when you need a single generated file's content for review/saving rather than direct disk writes. It contrasts with tools like generate_files by emphasizing 'single file' and 'never writes to disk itself', but does not explicitly name alternative tools or exclusions.

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/Abbas-F-R/DeepSeek-MCP'

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