Skip to main content
Glama
vola-trebla

zod-contract-mock-forge-mcp

by vola-trebla

scaffold_api_contract_test

Generate API contract test code for Playwright, Jest, Vitest, or MSW to validate an API endpoint against a Zod schema.

Instructions

Generate an API contract test or mock boilerplate for Playwright, Jest, Vitest, or MSW. Use to answer: how do I write a test that validates this API endpoint against this schema?

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
methodNoHTTP methodGET
base_urlNoBase URL of the APIhttp://localhost:3000
endpointYesAPI endpoint path (e.g., /api/users)
frameworkNoTesting framework to generate code forplaywright
test_nameNoName of the generated testAPI Contract Validation
schema_codeYesZod schema code for the response body
Behavior2/5

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

With no annotations provided, the description bears full responsibility for disclosing behavioral traits. It does not mention safety, idempotency, permissions, or any side effects. The only implied behavior is code generation, which is likely read-only, but this is not explicitly stated.

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-loaded with the action and followed by the use case. Every word is meaningful, and it avoids redundancy. It is concise and well-structured.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the 6 parameters, no output schema, and no annotations, the description is minimally complete. It explains the tool's purpose and usage but does not elaborate on what the generated output looks like or any prerequisites. It meets basic requirements but lacks depth.

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 description coverage is 100%, so the input schema already describes all parameters. The tool description adds minimal extra meaning, only mentioning the frameworks in the first sentence, which aligns with the 'framework' parameter. It does not provide additional context beyond what the schema offers.

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 generates API contract tests or mock boilerplate for specific frameworks. It uses a specific verb ('Generate') and resource ('API contract test or mock boilerplate'), and distinguishes from sibling tools like 'generate_valid_mock' which generates mock data, not test code.

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 explicitly answers 'how do I write a test that validates this API endpoint against this schema?', clearly indicating the usage context. However, it does not mention when not to use or suggest alternative tools.

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/vola-trebla/zod-contract-mock-forge-mcp'

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