Skip to main content
Glama

hardhat_add_tests

Add smart contract test setup to your project. Generate test scaffolding to verify contract behavior.

Instructions

Add smart contract test setup

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
api_keyNo
directoryYesProject directory
Behavior2/5

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

With no annotations provided, the description carries the full behavioral burden and only discloses that the tool 'adds' something — implying a mutation on the project. It does not state what files are created or modified, whether an external service is contacted (the undocumented api_key suggests one), whether it is idempotent, or what side effects occur. This is a significant transparency gap for a write operation.

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?

At four words, the description is maximally terse with no filler — every word earns its place. But the brevity crosses into under-specification: a tool with an unexplained api_key parameter and ambiguous 'setup' semantics needs more than a noun phrase to be operationally useful.

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?

The description is far from complete. It does not position this tool relative to siblings like hardhat_generate_project or hardhat_add_deployment, does not disclose the role of api_key, and leaves the agent guessing about prerequisites, outputs, and side effects. An agent would struggle to invoke this correctly with only the schema and this description.

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 50%: 'directory' is documented in the schema as 'Project directory', but 'api_key' has no schema description and the tool description does not explain it either. The description adds zero value for parameters and leaves a genuine mystery — why smart contract test setup requires an API key is completely unresolved. With half of parameters undocumented, the description was expected to compensate and did not.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description provides a verb ('Add') and a resource ('smart contract test setup'), and the 'smart contract' qualifier adds domain context beyond the bare tool name. However, 'test setup' is vague — it does not specify whether this creates test files, configures a framework (Mocha/Chai/ethers), installs dependencies, or modifies hardhat.config. It reads as a light paraphrase of the tool name rather than a precise operational statement.

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 guidance on when to use this tool. The description never mentions prerequisites (e.g., an existing Hardhat project from hardhat_generate_project), sequencing relative to hardhat_add_deployment, or when a generic test tool (test_generate_unit, api_generate_tests) would be a better fit. All usage conditions are left to inference.

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/barnburner121/claude-plugin-marketplace'

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