Skip to main content
Glama

write_tests

Generate tests for your code covering both the golden path and realistic edge cases. Specify the code or file path, and optionally choose a testing framework.

Instructions

Write tests covering the golden path and realistic edge cases for given code.

Provide exactly one of code or file_path. Set framework (e.g. "pytest", "jest") to match your project's conventions; otherwise the model infers one from the code's language.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeNo
thinkNo
file_pathNo
frameworkNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior2/5

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

No annotations provided, so description carries full burden. It describes input handling but omits behavioral traits such as whether tests are appended or overwritten, permissions needed, or side effects. Transparency is limited.

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?

Three sentences, front-loaded with purpose, no superfluous words. Efficient and well-structured.

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?

Given 4 parameters, no annotations, and an output schema that is not described, the description covers usage but lacks detail on return values, error handling, and the 'think' parameter. Adequate but with gaps.

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 coverage is 0%, so description must compensate. It explains the mutual exclusivity of code and file_path and hints at framework inference, but does not mention the 'think' parameter. Adds moderate value but not full coverage.

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 tool writes tests covering golden path and realistic edge cases, with a specific verb and resource. It distinguishes from sibling tools that focus on refactoring, reviewing, or explaining code.

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

Usage Guidelines4/5

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

Description gives clear input constraints (exactly one of code or file_path) and hints at framework selection, but does not explicitly state when not to use or list alternatives. Context is clear but lacks exclusions.

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/darthzen/ollama-code-mcp'

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