Skip to main content
Glama

electron_generator_write_test

Saves generated test code to a named file in the output directory and supports overwriting existing files when needed.

Instructions

Save generated test code to a file in the output directory.

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": {
      "filename": "<filename>",
      "testCode": "<testCode>",
      "overwrite": "<overwrite>"
    },
    "name": "electron_generator_write_test"
  }
}

Input Schema

NameRequiredDescriptionDefault
filenameYesFilename for the test (e.g., login.spec.ts)
testCodeYesThe generated test code
overwriteYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

C2.7/5.0
Behavior2/5

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

There are no annotations, so the description carries the full behavioral burden for a write operation, yet it says nothing about what happens when the file already exists, whether the output directory is created on demand, or whether the write is reversible. The one key behavioral fact — that an existing file may be replaced — is only hinted at by the schema's 'overwrite' property, not explained.

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 with no filler. It is efficient, though its brevity reflects under-specification rather than tight editing.

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 mutating, file-writing tool with no annotations and no output schema, the agent needs to know overwrite behavior, directory expectations, and failure modes — none of which are covered. The definition is too thin relative to the tool's risk profile.

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 67%: filename and testCode are documented in the schema, but 'overwrite' has no description there and the description does not compensate. The critical semantics of overwrite (what happens when false and the file exists — error, skip, or silent failure) are left undefined in both places.

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?

The description states a specific verb and resource ('Save generated test code to a file') plus the destination ('in the output directory'), which is enough to distinguish it from generation tools like electron_generate_test. It lacks any explicit naming of siblings, but the purpose is clear.

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

Usage Guidelines2/5

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

No indication of when to call this versus alternatives such as electron_generate_test (does generation already write the file?) or electron_planner_save. There are no prerequisites, ordering hints, or exclusions, leaving the agent to guess the intended workflow position.

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