Skip to main content
Glama

Generate Test Code

generate_test_code
Read-onlyIdempotent

Generate framework-specific test snippets from TestOps test cases by selecting a language and framework, validating compatibility, and synchronizing requested metadata before producing the code.

Instructions

Generate a current, framework-specific test snippet from a TestOps test case.

Both target selections are required. The tool validates verified TestOps language/framework compatibility locally and synchronizes only requested test-case metadata before generation.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
languageYesRequired target language. Choose Java, Python, TypeScript, JavaScript, Kotlin, PHP, or .NET. Backward-compatible aliases: java, python, ts, js, and dotnet.
metadataNoOptional metadata to synchronize: Name, Tags, Custom fields, Members, Issues, Scenario. Omit for Name, Tags, Custom fields, Scenario; use [] to disable all.
frameworkYesRequired framework compatible with language. TypeScript choices: CodeceptJS, Cucumber, Jasmine, Jest, Mocha, Playwright, Vitest, WebdriverIO, ZeroStep. Compatibility is language-specific.
test_case_idYesID of the TestOps test case to generate code for.
output_formatNoOutput format: 'json' (default) or 'plain'.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeNoGenerated source-code snippet.
languageNoRequested target programming language.
metadataNoCanonical test-case metadata selections included in generated code.
frameworkNoRequested target testing framework.
test_case_idNo
Behavior3/5

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

Annotations already indicate readOnlyHint=true and destructiveHint=false, so the description's value is limited. It adds that validation is performed locally and only requested metadata is synchronized, which provides useful but not critical behavioral context beyond annotations.

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?

The description is concise with two sentences, front-loading the main action. It efficiently communicates purpose and key requirements without unnecessary verbiage.

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?

With five parameters including enums and an output schema, the description covers the core concept but lacks details on the generated output format, error cases, or specific behavior for edge cases. It is adequate but leaves room for more 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?

Schema description coverage is 100%, so the schema already documents all parameters. The description adds minimal extra meaning (e.g., 'Both target selections are required') but does not significantly enhance understanding 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?

Description clearly states the verb 'Generate' and the resource 'test snippet from a TestOps test case', making the tool's primary function immediately obvious. It distinguishes itself from sibling tools like create_test_case or get_test_case_details by focusing on code generation.

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 mentions that both target selections (language and framework) are required, giving some usage context. However, it does not explicitly state when to use this tool vs alternatives, nor does it provide scenarios where it would not be appropriate.

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/ivanostanin/lucius-mcp'

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