Skip to main content
Glama
khoa-na

antigravity-mcp

by khoa-na

generate-tests

Generate thorough unit tests for a source file, targeting frameworks like pytest, unittest, or jest. Specify the file and framework to produce tests directly or save them to an output file.

Instructions

Generate thorough unit tests for a specified source code file.

Parameters:

  • target_file: Relative or absolute path to the file you want to test.

  • test_framework: Test framework (e.g. 'pytest', 'unittest', 'jest', 'go test'). Default: 'pytest'.

  • workspace: Workspace root directory.

  • write_to_file: If True, writes the generated tests directly into output_file.

  • output_file: Destination file path for generated tests (e.g. 'tests/test_auth.py').

  • model: Target model ID (default: gemini-3.8-flash-high).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modelNo
workspaceNo
output_fileNo
target_fileYes
write_to_fileNo
test_frameworkNopytest

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observedv2.0.0

TDQS

A3.9/5.0
Behavior3/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It does disclose the write_to_file behavior ('If True, writes the generated tests directly into output_file') and reveals defaults for test_framework and model. However, it does not explain what happens when write_to_file is False, whether existing files are overwritten, whether the tool makes external API calls via the model parameter, or whether the target file is modified in any way.

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 efficient and well-structured. A single sentence states the purpose, followed by a cleanly formatted parameter list. Every line adds information, and the most important behavioral switch (write_to_file) is described in its own line. No filler or redundant content.

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?

The tool has six parameters, no annotations, and an output schema (which presumably explains return structure). The description covers all parameters and the core purpose, but leaves open important operational questions: what happens if write_to_file is false, does it create/overwrite directories, and what file types or languages are supported. Given the presence of an output schema, return-value documentation is not the main gap, but operational behavior could be more complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate, and it largely does. Each of the six parameters receives a meaningful explanation: target_file specifies relative/absolute path, test_framework gives concrete examples and a default, output_file includes a sample path, and write_to_file explains its effect. A few descriptions remain thin (workspace is just 'Workspace root directory'), but overall the parameter semantics are solidly above baseline.

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 opens with a clear verb and resource: 'Generate thorough unit tests for a specified source code file.' It is immediately distinguishable from sibling tools like ask-gemini, review-diff, or ping, which serve different purposes. The scope (source code file) and action (generate tests) are specific and unambiguous.

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 implies when to use the tool—whenever unit tests are needed for a file—but it never explicitly contrasts this with alternatives such as ask-gemini or ask-antigravity, which could also generate test code conversationally. There is no when-not-to-use guidance or prerequisite clarification, so usage context is implied rather than stated.

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

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/khoa-na/antigravity-mcp'

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