Skip to main content
Glama
robertcprice

GLM-4.7 MCP Server

by robertcprice

glm_write_tests

Generate unit tests for any file using your chosen test framework and model, improving coverage and supporting TDD workflows.

Instructions

Generate unit tests for a file using GLM.

Use for: test generation, coverage improvement, TDD support.

Args: file_path: Path to file to test test_framework: "pytest", "jest", "vitest", "unittest" working_directory: Project directory model: "haiku" or "sonnet"

Returns: Generated test file

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modelNosonnet
file_pathYes
test_frameworkNopytest
working_directoryNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior2/5

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

With no annotations, the description must disclose behavior on its own. It lists inputs and says 'Returns: Generated test file,' but leaves ambiguity about whether the tool actually writes to disk or simply returns content. It also does not mention overwrite behavior, permissions, or network/API implications of using GLM.

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 tightly organized: one-sentence purpose, 'Use for' line, args list, and returns. Every line is informative with no redundant content, making it highly scannable.

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?

While an output schema exists, the description fails to disclose critical side effects for a 'write' tool—whether it creates or overwrites a file, and what working_directory actually does. This gap is significant for an agent deciding whether to invoke it and how to handle the result.

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?

The schema has zero description coverage, and the description compensates by listing each parameter with a short gloss and enumerating allowed values for test_framework and model. However, file_path and working_directory are vague ('Path to file to test', 'Project directory') and lack format or default behavior details.

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 specific verb+resource: 'Generate unit tests for a file using GLM.' It further clarifies scope with 'Use for: test generation, coverage improvement, TDD support,' which distinguishes it from sibling tools like glm_analyze or glm_review.

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?

The description gives explicit use cases ('test generation, coverage improvement, TDD support'), telling the agent when to choose this tool. However, it does not mention when NOT to use it or explicitly name alternatives, so it lacks full 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/robertcprice/glm-mcp-server'

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