Skip to main content
Glama

ai_test_cases

Read-only

AI unit test generator — Generate a runnable unit test file for a function or module, with a list of the cases covered (normal, edge and error). Pick the framework or let it choose: jest, vitest, pytest, go test, JUnit and others. Price: $0.01 USDC (Base, via x402).

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "code": "<code>"
    },
    "name": "ai_test_cases"
  }
}

Input Schema

NameRequiredDescriptionDefault
codeYesthe code to test
languageNooptional language
frameworkNooptional test framework

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, openWorldHint=true, and destructiveHint=false, so the safety profile is covered. The description adds useful behavioral context beyond annotations: it discloses the price ($0.01 USDC via x402) and that the output includes a runnable test file plus a list of cases covered. It does not mention rate limits, maximum code size, or authentication details beyond the price.

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 front-loaded with the core purpose, then adds the output details, framework choices, and price in two compact sentences. Every sentence contributes useful information with no redundant or vague wording.

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?

For a simple AI generation tool with full schema coverage and no output schema, the description is largely complete: it explains what is generated, what cases are covered, framework selection, and cost. Minor gaps remain around limits, authentication mechanics, and supported languages, but these are not central to correct invocation.

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 coverage is 100%, so the baseline is 3. The description adds meaningful parameter context: the framework can be one of jest, vitest, pytest, go test, JUnit and others, or omitted to let the tool choose. It also implies that language is optional, although it does not elaborate on supported languages.

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?

The description states a specific verb and resource ('Generate a runnable unit test file for a function or module') and clarifies that it also lists normal, edge, and error cases. It is clearly distinguishable from sibling tools like ai_code_review or ai_explain_code, though it does not explicitly name any alternative.

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?

Usage is implied: use this when you need unit tests for code, and you may either pick a framework or let the tool choose. There is no explicit when-to-use guidance versus alternatives, no exclusions, and no prerequisites beyond providing code.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources