Skip to main content
Glama
SmartBear

SmartBear MCP server

Official
by SmartBear

Contract Testing: Review Pact Tests

contract-testing_review_pact_tests
Read-onlyIdempotent

Review Pact tests with AI from PactFlow. Provide pact test code, source code, error messages, or OpenAPI specs to get targeted recommendations for improving contract tests.

Instructions

Review Pact tests using PactFlow AI. You can provide the following inputs: (1) Pact tests to be reviewed along with metadata

Toolset: Review Pact Tests

Parameters:

  • pactTests (object) required: Primary pact tests that needs to be refined.

  • 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

  • userInstructions (string): Optional free-form instructions that provide additional context or specify areas of focus during the refinement process of the Pact test.

  • errorMessages (array): Optional error output from failed contract test runs. These can be used to better understand the context or failures observed and guide the recommendations toward resolving specific issues.

  • openapi (any)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeNoCollection 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
openapiNoIf 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 OpenAPI document which are relevant to the Pact refinement process.
pactTestsYesPrimary pact tests that needs to be refined.
errorMessagesNoOptional error output from failed contract test runs. These can be used to better understand the context or failures observed and guide the recommendations toward resolving specific issues.
userInstructionsNoOptional free-form instructions that provide additional context or specify areas of focus during the refinement process of the Pact test.
Behavior3/5

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

Annotations already indicate the tool is read-only, idempotent, and non-destructive. The description adds that it uses 'PactFlow AI' for review, which implies an external AI call, but does not disclose behavioral details like processing time, output format, or any potential side effects beyond what annotations already cover.

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?

The description is structured with a lead sentence and parameter list, but it is verbose, repeating schema details. It could be more concise by focusing on usage behavior rather than restating parameter definitions already present in the schema.

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?

Given the tool's complexity (5 parameters, nested objects, no output schema), the description lacks crucial information about what the review produces, how to interpret results, and how the inputs interact. It fails to prepare the agent for a effective invocation or understanding of outcomes.

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 coverage is 100%, so baseline is 3. The description repeats parameter descriptions almost verbatim from the schema, adding no new meaning or context. For example, 'pactTests' is described as 'Primary pact tests that needs to be refined,' which matches the schema description exactly.

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 tool's name and title clearly indicate it reviews Pact tests using PactFlow AI. The description states 'Review Pact tests using PactFlow AI' which is a specific verb and resource. While it distinguishes from its sibling 'generate_pact_tests' by name, it does not explicitly differentiate from other review or analysis tools in the sibling list.

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?

The description provides no guidance on when to use this tool versus alternatives such as 'generate_pact_tests' or 'refine_tests_in_functional_areas'. It lists inputs but does not state appropriate contexts or prerequisites, leaving the agent without direction on when invocation is appropriate.

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/SmartBear/smartbear-mcp'

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