Skip to main content
Glama
SmartBear MCP server

SmartBear MCP server

Official
by SmartBear

Contract Testing: Matrix

contract-testing_matrix
Read-onlyIdempotent

Retrieve the contract verification matrix to identify passed or failed consumer-provider version combinations, diagnose verification failures, and support deployment decisions.

Instructions

Retrieve the comprehensive contract verification matrix that shows the relationship between consumer and provider versions, their associated pact files, and verification results stored in the Pact Broker or Pactflow. The matrix provides detailed visibility into which consumer and provider versions have been successfully verified against each other, and highlights failures with detailed information about the cause.

Toolset: Matrix

Parameters:

  • latestby (string): This property removes the rows for the overridden pacts/verifications from the results. The options are cvp (show only the latest row for each consumer version and provider) and cvpv (show only the latest row each consumer version and provider version). For a can-i-deploy query with one selector, it should be set to cvp. For a can-i-deploy query with two selectors, it should be set to cvpv.

  • limit (number): The limit on the number of results to return (1-1000, default: 100) (default: 100)

  • q (array) required

Use Cases: 1. Quickly identify which consumer and provider version combinations have passed or failed verification. 2. Diagnose and investigate why a particular consumer-provider verification failed. 3. Visualize the overall contract compatibility across two pacticipants / services. 4. Perform advanced queries using selectors to understand compatibility within specific branches, environments, or version ranges. 5. Support informed deployment decisions by answering 'can I deploy version X of this service to production?' 6. Expose contract verification details to non-frequent API users in a more accessible format.

Input Schema

NameRequiredDescriptionDefault
qYes
limitNoThe limit on the number of results to return (1-1000, default: 100)
latestbyNoThis property removes the rows for the overridden pacts/verifications from the results. The options are cvp (show only the latest row for each consumer version and provider) and cvpv (show only the latest row each consumer version and provider version). For a can-i-deploy query with one selector, it should be set to cvp. For a can-i-deploy query with two selectors, it should be set to cvpv.

Output Schema

NameRequiredDescriptionDefault
matrixNo
noticesNo
summaryNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.43.0
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$defs": {
      +    "EmbeddedBranchVersion": {
      +      "additionalProperties": {},
      +      "properties": {
      +        "_links": {
      +          "additionalProperties": {},
      +          "properties": {
      +            "self": {
      +              "$ref": "#/$defs/EmbeddedLink"
      +            }
      +          },
      +          "type": "object"
      +        },
      +        "latest": {
      +          "type": "boolean"
      +        },
      +        "name": {
      +          "type": "string"
      +        }
      +      },
      +      "type": "object"
      +    },
      +    "EmbeddedEnvironment": {
      +      "additionalProperties": {},
      +      "properties": {
      +        "_links": {
      +          "additionalProperties": {},
      +          "properties": {
      +            "self": {
      +              "$ref": "#/$defs/EmbeddedLink"
      +            }
      +          },
      +          "type": "object"
      +        },
      +        "createdAt": {
      +          "type": "string"
      +        },
      +        "displayName": {
      +          "type": "string"
      +        },
      +        "name": {
      +          "type": "string"
      +        },
      +        "production": {
      +          "type": "boolean"
      +        },
      +        "updatedAt": {
      +          "type": "string"
      +        },
      +        "uuid": {
      +          "type": "string"
      +        }
      +      },
      +      "type": "object"
      +    },
      +    "EmbeddedLink": {
      +      "additionalProperties": {},
      +      "properties": {
      +        "href": {
      +          "type": "string"
      +        },
      +        "name": {
      +          "type": "string"
      +        },
      +        "templated": {
      +          "type": "boolean"
      +        },
      +        "title": {
      +          "type": "string"
      +        }
      +      },
      +      "type": "object"
      +    },
      +    "MatrixPacticipant": {
      +      "additionalProperties": {},
      +      "properties": {
      +        "_links": {
      +          "additionalProperties": {},
      +          "properties": {
      +            "self": {
      +              "$ref": "#/$defs/EmbeddedLink"
      +            }
      +          },
      +          "type": "object"
      +        },
      +        "name": {},
      +        "version": {
      +          "anyOf": [
      +            {
      +              "$ref": "#/$defs/MatrixPacticipantVersion"
      +            },
      +            {
      +              "type": "null"
      +            }
      +          ]
      +        }
      +      },
      +      "type": "object"
      +    },
      +    "MatrixPacticipantVersion": {
      +      "additionalProperties": {},
      +      "properties": {
      +        "_links": {
      +          "additionalProperties": {},
      +          "properties": {
      +            "self": {
      +              "$ref": "#/$defs/EmbeddedLink"
      +            }
      +          },
      +          "type": "object"
      +        },
      +        "branch": {
      +          "description": "Use branchVersions"
      +        },
      +        "branchVersions": {
      +          "items": {
      +            "$ref": "#/$defs/EmbeddedBranchVersion"
      +          },
      +          "type": "array"
      +        },
      +        "branches": {
      +          "description": "Use branchVersions",
      +          "items": {
      +            "$ref": "#/$defs/EmbeddedBranchVersion"
      +          },
      +          "type": "array"
      +        },
      +        "environments": {
      +          "items": {
      +            "$ref": "#/$defs/EmbeddedEnvironment"
      +          },
      +          "type": "array"
      +        },
      +        "number": {
      +          "type": "string"
      +        },
      +        "tags": {
      +          "items": {
      +            "additionalProperties": {},
      +            "properties": {
      +              "_links": {
      +                "additionalProperties": {},
      +                "properties": {
      +                  "self": {
      +                    "$ref": "#/$defs/EmbeddedLink"
      +                  }
      +                },
      +                "type": "object"
      +              },
      +              "latest": {
      +                "type": "boolean"
      +              },
      +              "name": {
      +                "type": "string"
      +              }
      +            },
      +            "type": "object"
      +          },
      +          "type": "array"
      +        }
      +      },
      +      "type": "object"
      +    },
      +    "Notice": {
      +      "additionalProperties": {},
      +      "properties": {
      +        "text": {
      +          "type": "string"
      +        },
      +        "type": {
      +          "anyOf": [
      +            {
      +              "const": "info",
      +              "type": "string"
      +            },
      +            {
      +              "const": "debug",
      +              "type": "string"
      +            },
      +            {
      +              "const": "warning",
      +              "type": "string"
      +            },
      +            {
      +              "const": "prompt",
      +              "type": "string"
      +            },
      +            {
      +              "const": "success",
      +              "type": "string"
      +            },
      +            {
      +              "const": "error",
      +              "type": "string"
      +            }
      +          ]
      +        }
      +      },
      +      "type": "object"
      +    }
      +  },
      +  "$schema": "https://json-schema.org/draft/2020-12/schema",
      +  "additionalProperties": {},
      +  "properties": {
      +    "matrix": {
      +      "items": {
      +        "additionalProperties": {},
      +        "properties": {
      +          "consumer": {
      +            "$ref": "#/$defs/MatrixPacticipant"
      +          },
      +          "pact": {
      +            "additionalProperties": {},
      +            "properties": {
      +              "_links": {
      +                "additionalProperties": {},
      +                "properties": {
      +                  "pfi:ui": {
      +                    "$ref": "#/$defs/EmbeddedLink"
      +                  },
      +                  "self": {
      +                    "$ref": "#/$defs/EmbeddedLink"
      +                  }
      +                },
      +                "type": "object"
      +              },
      +              "createdAt": {
      +                "type": "string"
      +              }
      +            },
      +            "type": "object"
      +          },
      +          "provider": {
      +            "$ref": "#/$defs/MatrixPacticipant"
      +          },
      +          "verificationResult": {
      +            "anyOf": [
      +              {
      +                "additionalProperties": {},
      +                "properties": {
      +                  "_links": {
      +                    "additionalProperties": {},
      +                    "properties": {
      +                      "pfi:ui": {
      +                        "$ref": "#/$defs/EmbeddedLink"
      +                      },
      +                      "self": {
      +                        "$ref": "#/$defs/EmbeddedLink"
      +                      }
      +                    },
      +                    "type": "object"
      +                  },
      +                  "success": {
      +                    "type": "boolean"
      +                  },
      +                  "verifiedAt": {
      +                    "type": "string"
      +                  }
      +                },
      +                "type": "object"
      +              },
      +              {
      +                "type": "null"
      +              }
      +            ]
      +          }
      +        },
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "notices": {
      +      "items": {
      +        "$ref": "#/$defs/Notice"
      +      },
      +      "type": "array"
      +    },
      +    "summary": {
      +      "additionalProperties": {},
      +      "properties": {
      +        "deployable": {
      +          "description": "The property that indicates whether or not the pacticipant version is safe to deploy.",
      +          "type": [
      +            "boolean",
      +            "null"
      +          ]
      +        },
      +        "failed": {
      +          "type": "number"
      +        },
      +        "reason": {
      +          "type": "string"
      +        },
      +        "success": {
      +          "type": "number"
      +        },
      +        "unknown": {
      +          "type": "number"
      +        }
      +      },
      +      "type": "object"
      +    }
      +  },
      +  "type": "object"
      +}
  2. Addedv0.40.0
  3. Removedv0.34.0
  4. First observedv0.27.1

TDQS

A3.7/5.0
Behavior3/5

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

Annotations already declare readOnly, idempotent, non-destructive, closed-world, so safety is covered. The description adds useful behavioral context (failure causes are returned, rows can be collapsed, source systems Pact Broker/Pactflow) but omits auth requirements, pagination behavior, or how the matrix relates to the can_i_deploy computation.

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 core purpose is front-loaded well, but the definition is padded with a redundant '**Toolset:** Matrix' line, a '**Parameters:**' block that duplicates the schema, and six use cases where three would suffice. Signal-to-noise is acceptable but not tight.

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?

An output schema exists, so return values needn't be explained, and the description adequately conveys what the matrix contains and why it matters. The main gap is the unresolved relationship to contract-testing_can_i_deploy, which the use cases bump against without routing guidance.

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?

At 67% schema coverage, every parameter (q, limit, latestby) is already documented in the schema, and the description merely repeats the latestby and limit text verbatim. The required q selectors array — the most complex part, with tag/branch/environment/version/mainBranch semantics — is only named as '*required*' with no added meaning in the description.

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?

States a specific verb and resource: 'Retrieve the comprehensive contract verification matrix' showing consumer/provider versions, pact files, and verification results from the Pact Broker/Pactflow. The scope and payload are clear enough to distinguish it from other contract-testing reads (pacticipant, pacts-for-verification, deployments).

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?

Six explicit use cases give strong when-to-use context, including diagnosing failures and supporting deploy decisions. However, it never says when NOT to use it or names the obvious alternative, contract-testing_can_i_deploy, which is arguably the better tool for the 'can I deploy X' scenario it also claims.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools