Skip to main content
Glama

Generate Property-Based Tests

sdd_generate_pbt

Generate property-based tests from EARS requirements by extracting invariants, round-trip properties, and idempotence checks to discover edge cases using random input generation.

Instructions

Extracts universal properties (invariants, round-trips, idempotence) from EARS requirements and generates property-based tests using fast-check (TypeScript) or hypothesis (Python). Unlike example-based tests, PBT uses random input generation to discover edge cases that manual tests miss.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
frameworkYesProperty-based testing framework: fast-check (TypeScript/JS) or hypothesis (Python)
feature_numberNoFeature number (zero-padded, e.g. '001')001
spec_dirNoSpec directory path (relative to workspace root).specs
output_dirNoOutput directory for generated PBT filestests
Behavior3/5

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

Annotations indicate the tool is not read-only, not destructive, and not idempotent, which aligns with generating test files. The description adds that it extracts properties and generates files, but doesn't mention file overwrite behavior or output structure, so it adds modest value beyond 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?

The description is two sentences, front-loading the core action and differentiation, with no wasted words. It efficiently conveys the purpose and key distinction.

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?

Given 4 parameters, no output schema, and the complexity of PBT generation, the description covers the essential purpose, source (EARS), and output (test files with specific frameworks). It could mention where files are created or that output_dir is used, but the schema covers that; overall it is sufficiently complete.

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?

100% schema coverage means the schema already describes each parameter. The description does not add further explanation or usage hints for parameters, so it meets the baseline without additional value.

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

Purpose5/5

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

The description clearly states it extracts universal properties from EARS requirements and generates PBT files using fast-check or hypothesis, and explicitly differentiates from example-based tests, distinguishing it from sibling tools like sdd_generate_tests.

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

Usage Guidelines4/5

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

The description contrasts PBT with example-based tests and specifies the applicable frameworks, giving context for when to use this tool. However, it does not explicitly list when not to use it or mention any prerequisites like the presence of EARS requirements.

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/paulasilvatech/specky'

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