contract-testing_generate_pact_tests

Generate Pact tests using PactFlow AI. You can provide one or more of the following input types: (1) request/response pairs for specific interactions, (2) code files to analyze and extract interactions from, and/or (3) OpenAPI document to generate tests for specific endpoints. When providing an O...

SERVERSmartBear MCP SOURCESmartBear/smartbear-mcp
High RISK CLASS
Category Execute
Parameters 60 required
Recommended Rate-limitedsee the rule below
Registry record Grade F, identity unverified Pull the record →

This record as markdown: /tools/smartbear-mcp/contract-testing-generate-pact-tests.md

What contract-testing_generate_pact_tests does on SmartBear MCP

AI agents invoke contract-testing_generate_pact_tests to trigger actions in SmartBear MCP. What it does depends on the arguments the agent supplies, and its effects often reach beyond the immediate call: builds kicked off, notifications sent, workflows started.

ParameterTypeRequiredDescription
code array Collection of source code files to analyze and extract API interactions from. Include client code, data models, existing tests, or any code that makes API calls
openapi object If provided, the OpenAPI document which describes the API being tested and is accompanied by a matcher which will be used to identify the interactions in the Op
language string Target language for the generated Pact tests. If not provided, will be inferred from other inputs.
testTemplate object Optional test template to use as a basis for generation. Helps ensure generated tests follow your specific patterns, frameworks, and coding standards
requestResponse object Direct request/response pair for a specific interaction. Use this when you have concrete examples of API requests and responses
additionalInstructions string Optional free-form instructions to guide the generation process (e.g., 'Focus on error scenarios', 'Include authentication headers', 'Use specific test framewor

Parameters from the server's own tool schema.

Why contract-testing_generate_pact_tests is rated High

This tool triggers an AI-powered code generation process (executing PactFlow AI) that produces test code from inputs like OpenAPI documents and code files. It runs an external operation (AI inference/generation) and produces output artifacts. It's not purely reading existing data, nor writing user data reversibly in a simple sense — it executes a generation pipeline.

From the tool's definition Generate Pact tests using PactFlow AI... analyze and extract interactions from... generate tests for specific endpoints

Risk signalsAccepts file system path (requestResponse.request.filename) · Accepts raw HTML/template content (requestResponse.request.body) · Accepts freeform code/query input (code) · Accepts URL/endpoint input (openapi.remoteDocument.url) · High parameter count (34 properties)

Questions about contract-testing_generate_pact_tests

What does the contract-testing_generate_pact_tests tool do? +

Generate Pact tests using PactFlow AI. You can provide one or more of the following input types: (1) request/response pairs for specific interactions, (2) code files to analyze and extract interactions from, and/or (3) OpenAPI document to generate tests for specific endpoints. When providing an OpenAPI document, a matcher is required to specify which endpoints to generate tests for. Parameters: - language (enum): Target language for the generated Pact tests. If not provided, will be inferred from other inputs. - requestResponse (object): Direct request/response pair for a specific interaction. Use this when you have concrete examples of API requests and responses - code (array): Collection of source code files to analyze and extract API interactions from. Include client code, data models, existing tests, or any code that makes API calls - openapi (any) - additionalInstructions (string): Optional free-form instructions to guide the generation process (e.g., 'Focus on error scenarios', 'Include authentication headers', 'Use specific test framework patterns') - testTemplate (object): Optional test template to use as a basis for generation. Helps ensure generated tests follow your specific patterns, frameworks, and coding standards. It is categorised as a Execute tool in the SmartBear MCP MCP Server, which means it can trigger actions or run processes. Use rate limits and argument validation.

What parameters does contract-testing_generate_pact_tests accept? +

contract-testing_generate_pact_tests accepts 6 parameters: code, openapi, language, testTemplate, requestResponse, additionalInstructions. The full parameter table on this page comes from the server's own tool schema.

How do I enforce a policy on contract-testing_generate_pact_tests? +

Register the SmartBear MCP server in PolicyLayer and add a rule for contract-testing_generate_pact_tests: allow, deny, rate-limit, or require approval. Point your MCP client at the PolicyLayer proxy URL and the rule is enforced on every call, before it reaches SmartBear MCP. Nothing to install.

What risk level is contract-testing_generate_pact_tests? +

contract-testing_generate_pact_tests is a Execute tool with high risk. Execute tools should be rate-limited and have argument validation enabled.

Can I rate-limit contract-testing_generate_pact_tests? +

Yes. Add a rate_limit block to the contract-testing_generate_pact_tests rule in your PolicyLayer policy. For example, setting max: 10 and window: 60 limits the tool to 10 calls per minute. Rate limits are tracked per agent session and reset automatically.

How do I block contract-testing_generate_pact_tests completely? +

Set action: deny in the PolicyLayer policy for contract-testing_generate_pact_tests. The AI agent will receive a policy violation error and cannot call the tool. You can also include a reason field to explain why the tool is blocked.

What MCP server provides contract-testing_generate_pact_tests? +

contract-testing_generate_pact_tests is provided by the SmartBear MCP server (SmartBear/smartbear-mcp). PolicyLayer sits as a proxy in front of this server to enforce policies before tool calls reach the server.

More on SmartBear, and thousands of servers like it.

// THE MCP REGISTRY

PolicyLayer tracks 44,603 MCP servers and 515,000+ tools.

Every server has a live record: who publishes it, whether it answers without auth, its risk grade, every tool classified, the recommended policy. This page is one line of SmartBear's. Pull the full record:

Teams ship this data inside their own products. See what a licence covers →

// GET IN TOUCH

Have a question or want to learn more? Send us a message.

Message sent.

We'll get back to you soon.