Skip to main content
Glama

Write test file

write_test

Generate contract test files under tests/ or src/test/, preserving existing files unless overwrite is explicitly requested.

Instructions

Write a generated file under tests/ or src/test/ only. Won't overwrite unless asked.

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": {
      "path": "<path>",
      "content": "<content>"
    },
    "name": "write_test"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYes
contentYes
overwriteNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.1/5.0
Behavior3/5

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

With no annotations, the description must carry the behavior burden, and it does disclose the two most important traits: the write is restricted to test directories, and the default is non-overwriting ('Won't overwrite unless asked'). It does not say what happens when the path is outside scope, whether parent directories are created, or what the caller gets back on success or collision.

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?

Two sentences, no filler, with the safety-relevant constraint front-loaded. It is efficient, though the extreme terseness leaves little room for the parameter and error detail an agent needs.

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?

For a three-parameter mutation tool with no annotations, no output schema, and 0% schema description coverage, the definition is thin: two of three parameters and all failure behavior are undocumented.

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 coverage is 0%, so the description must compensate and largely does not: it clarifies the overwrite parameter's default behavior but says nothing about how 'path' is interpreted (relative to what root, must it exist) or what 'content' expects.

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?

Specific verb (write) plus resource (generated test file) with an explicit location scope: 'under tests/ or src/test/ only'. This clearly distinguishes it from the read/analysis siblings, though it never names an alternative for writing non-test files.

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 gives a hard constraint on where files may go and implies when to use it (writing generated tests), but offers no when-not guidance or comparison to alternatives such as generate_api_tests, which an agent might reasonably consider first.

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