Skip to main content
Glama

write_test

DestructiveIdempotent

Create or replace one test file in a story's package to store end-to-end test cases for later replay and approval.

Instructions

Create or replace one test file in this story's package.

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

Input Schema

NameRequiredDescriptionDefault
contentYes
file_nameYesFor example CheckoutTest.java

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.6/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=false, destructiveHint=true, and idempotentHint=true; the phrase "create or replace" usefully explains why it is both destructive and idempotent, and "one test file" bounds the blast radius. It does not say what happens to a pre-existing file's other content, whether directories can be created, or what errors occur on invalid content, so it adds only modest context beyond the annotations.

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?

A single front-loaded sentence with no filler; the scope and the create-or-replace semantics come before anything else.

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 two-parameter write tool with no output schema, the description covers purpose, write scope, and overwrite behavior, which is most of what an agent needs. Remaining gaps (path rules, validation, failure behavior) are minor given the annotations already flag the destructive and idempotent profile.

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 50%: file_name has an example value while content is undocumented. The description implicitly identifies content as the file body and file_name as a name within the story package, but it adds no syntax, encoding, or path constraints to compensate for the bare content parameter.

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?

States a specific verb pair and resource: "Create or replace one test file," plus a scope constraint ("this story's package"). An agent can tell this writes a single test file rather than steps or repo content, though no sibling is named explicitly.

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 by the verb and by the contrast with siblings like write_steps and validate_tests, but the description never says when to choose this tool over alternatives or what preconditions (e.g., existing story context) must hold.

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