Skip to main content
Glama

generate_tests

Generate saveable test suites (unit, integration, performance) from a specification or existing code, returning structured file content without writing to disk.

Instructions

Generate a full, saveable test-suite (unit/integration/performance) as file(s) from a specification or existing code — distinct from write_tests, which returns inline review-style test code. Returns structured, saveable file content — never writes to disk itself.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
specYesCode to test or specification of behavior to cover
modelNoModel to use (default: deepseek-chat)
providerNoAI Provider
frameworkNoTest framework (e.g. Jest, Vitest, JUnit, xUnit, PyTest)
test_scopeNoScope of tests (e.g. Unit, Integration, Performance, or combination)
target_folderNoTarget folder for the generated test file(s)
project_contextNoExisting project conventions the tests must match
naming_conventionNoTest file/naming convention
Behavior4/5

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

With no annotations provided, the description carries full responsibility for behavioral disclosure. It reveals a key trait: 'never writes to disk itself' and indicates output is 'structured, saveable file content.' It does not mention error handling, permissions, or other side effects, but the core safety behavior is transparently disclosed.

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 two sentences, compact, and front-loaded with the main purpose before the distinction. Every phrase adds value, especially the explicit contrast with write_tests and the safety clarification about not writing to disk.

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 8 parameters, no annotations, and no output schema, the description covers the essential context: what it does, the key alternative, and the return behavior. It is slightly light on details like how target_folder is used or what 'full' means, but the schema covers parameter details and the description provides enough behavioral context.

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?

All 8 parameters are documented with descriptions in the schema (100% coverage), so the baseline is 3. The tool description adds a little context by mentioning 'specification or existing code' and 'unit/integration/performance,' but it does not provide additional syntax or format details beyond 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 generates a 'full, saveable test-suite (unit/integration/performance) as file(s)' from a specification or existing code, naming the resource (test suite) and the action (generate). It explicitly differentiates itself from sibling write_tests, which returns inline review-style code, making the purpose unmistakable.

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 distinguishes generate_tests from write_tests by explaining that write_tests 'returns inline review-style test code,' implying generate_tests is for saveable file content. This provides clear when-to-use guidance and an explicit alternative, satisfying the highest bar.

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