Skip to main content
Glama

Module Test Create

module_test_create

Generates PHPUnit/Kernel test skeletons for Drupal modules, creating the test class file with specified methods so developers can start writing unit tests immediately.

Instructions

Create a PHPUnit/Kernel test skeleton.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathNo
test_nameYes
test_typeNoKernelTest
class_nameNo
machine_nameYes
test_methodsNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

C2.6/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full behavioral burden. 'Create' implies a file-writing mutation, but the description says nothing about where files are written, whether existing files are overwritten, what permissions are needed, or what the generated skeleton contains.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

It is a single front-loaded sentence with no filler, which is efficient. But at this length it is under-specified for a 6-parameter file-generating tool, so brevity here reads as thinness rather than discipline.

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?

An output schema exists, so return values need not be described. Still, for a mutation tool with six undocumented parameters, no annotations, and an overlapping sibling set, the description leaves too much unspecified for an agent to invoke it confidently.

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 description coverage is 0% across 6 parameters, so the description must compensate, yet it only hints at the test_type dimension via 'PHPUnit/Kernel'. The roles of path, class_name, machine_name, and test_methods remain undocumented in both the schema and the description.

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 names a specific verb and artifact ('Create a PHPUnit/Kernel test skeleton'), so an agent knows it produces a test file rather than running or scaffolding other test types. However, it does not differentiate from near-identical siblings in the tool list such as test_scaffold_phpunit or test_scaffold_behat, leaving the agent to guess which to pick.

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?

There is no statement of when to use this tool versus alternatives like test_scaffold_phpunit, test_scaffold_behat, or test_run_phpunit, and no prerequisites are given. Usage must be entirely inferred from the name and the scattered sibling list.

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

Deploy Server

Other Tools