Skip to main content
Glama

code tests

code_tests
Read-only

Generate a complete unit-test file for your code (Jest, Vitest, pytest, Go testing, JUnit...): normal, edge and error cases with mocks for network, time and randomness, the run command, and bugs spotted on the way. Costs $0.016 USDC per call (x402).

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "code_tests"
  }
}

Input Schema

NameRequiredDescriptionDefault
urlNo
codeNo
frameworkNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A3.7/5.0
Behavior4/5

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

Annotations already establish readOnlyHint=true and openWorldHint=true, so the safety profile is covered. The description adds genuine non-schema context: a per-call price of $0.016 USDC and the x402 payment mechanism, which an agent must know before invoking. It stops short of describing payment flow, auth, or rate limits.

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?

A single front-loaded sentence that delivers the deliverable, the coverage cases, the mocking scope, and the price with almost no filler. Slightly run-on, but every clause adds information.

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 no output schema, the description does a good job describing what comes back (test file, normal/edge/error cases, mocks, run command, spotted bugs) and discloses cost. It falls short on the input side, leaving three undocumented parameters ambiguous, which matters for correct invocation.

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

Parameters2/5

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

Schema description coverage is 0% for all three parameters, so the description must carry the burden. It names the framework options (Jest, Vitest, pytest, Go testing, JUnit), which loosely maps to the framework param, but leaves url and code entirely unexplained and never clarifies whether they are alternatives or complementary.

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?

States a specific verb+resource ('Generate a complete unit-test file for your code') and enumerates the frameworks covered. An agent can distinguish it from code_review, code_explain, errorfix, and code_run without opening any schema.

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 usage (you have code, you want tests) but never says when to prefer this over siblings like code_review or errorfix, nor what the url-vs-code inputs mean. Usage is inferable rather than stated.

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