Skip to main content
Glama

generate_tests

Create comprehensive test suites from provided code, choose a testing framework, and set a target coverage percentage to validate behavior.

Instructions

Engineer generates comprehensive test suite for the provided code

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeYesThe code to generate tests for (min 10 characters)
test_frameworkNoTesting framework to use (default: jest)jest
coverage_targetNoTarget code coverage percentage (default: 80)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.0.0

TDQS

C2.9/5.0
Behavior2/5

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

No annotations are provided, so the description carries full behavioral burden. It doesn't disclose what the generated tests look like, whether they are saved to files, how they are returned, or any constraints (e.g., may not achieve 100% coverage). Nothing about side effects or permissions.

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?

Single sentence, front-loaded, and no wasted words. It could be slightly more specific but is efficient overall.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The tool has 3 parameters, no output schema, and no annotations. The description is minimal and doesn't compensate for the lack of structured behavioral data. It should explain return values, test generation behavior, or limitations.

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 no additional parameter meaning beyond what the schema provides. Baseline 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource: 'generates comprehensive test suite for the provided code.' Clear what the tool does. However, it doesn't differentiate from siblings like implement_code or review_code, leaving some ambiguity about where it fits in the workflow.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance on when to use this tool versus alternatives. It doesn't mention when to call it (e.g., after writing code, before review) or what prerequisites exist. The agent must infer usage from the name and description alone.

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