Skip to main content
Glama
SmartBear MCP server

SmartBear MCP server

Official
by SmartBear

Contract Testing: Publish Consumer Contracts

contract-testing_publish_consumer_contracts
Idempotent

Publishes consumer Pact contracts to Pact Broker or PactFlow with version, branch, and tag metadata so providers can verify compatibility.

Instructions

Publish one or more consumer Pact contracts to the Pact Broker or PactFlow, with branch and tag metadata.

Toolset: Contracts

Parameters:

  • pacticipantName (string) required: Name of the consumer application

  • pacticipantVersionNumber (string) required: Version number of the consumer

  • contracts (array) required: Contracts to publish

  • tags (array): Version tags (e.g. 'main', 'staging')

  • branch (string): Branch name of the consumer

  • buildUrl (string): URL of the CI build that produced these contracts

Input Schema

NameRequiredDescriptionDefault
tagsNoVersion tags (e.g. 'main', 'staging')
branchNoBranch name of the consumer
buildUrlNoURL of the CI build that produced these contracts
contractsYesContracts to publish
pacticipantNameYesName of the consumer application
pacticipantVersionNumberYesVersion number of the consumer

Output Schema

NameRequiredDescriptionDefault
_linksNo
noticesNo
_embeddedNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.43.0
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$defs": {
      +    "EmbeddedLink": {
      +      "additionalProperties": {},
      +      "properties": {
      +        "href": {
      +          "type": "string"
      +        },
      +        "name": {
      +          "type": "string"
      +        },
      +        "templated": {
      +          "type": "boolean"
      +        },
      +        "title": {
      +          "type": "string"
      +        }
      +      },
      +      "type": "object"
      +    },
      +    "EmbeddedNamed": {
      +      "additionalProperties": {},
      +      "properties": {
      +        "_links": {
      +          "additionalProperties": {},
      +          "properties": {
      +            "self": {
      +              "$ref": "#/$defs/EmbeddedLink"
      +            }
      +          },
      +          "type": "object"
      +        },
      +        "name": {
      +          "type": "string"
      +        }
      +      },
      +      "type": "object"
      +    },
      +    "EmbeddedVersion": {
      +      "additionalProperties": {},
      +      "properties": {
      +        "_links": {
      +          "additionalProperties": {},
      +          "properties": {
      +            "self": {
      +              "$ref": "#/$defs/EmbeddedLink"
      +            }
      +          },
      +          "type": "object"
      +        },
      +        "number": {
      +          "type": "string"
      +        }
      +      },
      +      "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": {
      +    "_embedded": {
      +      "additionalProperties": {},
      +      "properties": {
      +        "pacticipant": {
      +          "$ref": "#/$defs/EmbeddedNamed"
      +        },
      +        "version": {
      +          "$ref": "#/$defs/EmbeddedVersion"
      +        }
      +      },
      +      "type": "object"
      +    },
      +    "_links": {
      +      "additionalProperties": {},
      +      "properties": {
      +        "pb:contracts": {
      +          "items": {
      +            "$ref": "#/$defs/EmbeddedLink"
      +          },
      +          "type": "array"
      +        },
      +        "pb:pacticipant": {
      +          "$ref": "#/$defs/EmbeddedLink"
      +        },
      +        "pb:pacticipant-version": {
      +          "$ref": "#/$defs/EmbeddedLink"
      +        },
      +        "pb:pacticipant-version-tags": {
      +          "items": {
      +            "$ref": "#/$defs/EmbeddedLink"
      +          },
      +          "type": "array"
      +        }
      +      },
      +      "type": "object"
      +    },
      +    "notices": {
      +      "items": {
      +        "$ref": "#/$defs/Notice"
      +      },
      +      "type": "array"
      +    }
      +  },
      +  "type": "object"
      +}
  2. Addedv0.40.0
  3. Removedv0.34.0
  4. First observedv0.27.1

TDQS

B3.1/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=false, idempotentHint=true and destructiveHint=false, so safety and repeat-publish behavior are covered structurally. The description adds that contracts land in an external broker with branch/tag metadata, but says nothing about authentication needs, what happens when a version already exists, or whether tags/branch alter downstream verification.

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 opening sentence is front-loaded and efficient with no wasted words. However, the subsequent Toolset line and the enumerated parameter list duplicate what the input schema already states verbatim, which pads the definition without adding value.

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?

An output schema exists, so return values need not be explained, and the annotations carry the safety profile. What remains missing is operational context for a publishing mutation: required broker credentials/configuration and any constraint on how many contracts or versions can be pushed at once.

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 schema alone already documents every parameter, including nested contract fields like contentType and specification constraints. The description's parameter block merely restates the same field names and tag examples, adding no new meaning beyond the schema, so the baseline 3 applies.

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 description states a specific verb and resource ('Publish one or more consumer Pact contracts') and names the destination systems (Pact Broker or PactFlow), which lets an agent distinguish it from contract-testing_publish_provider_contract. It does not explicitly contrast the two siblings, so it stops short of a 5.

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?

There is no when-to-use guidance and no exclusions: nothing tells the agent to prefer this over publishing provider contracts, or what prerequisites (configured broker URL, API token) must exist first. The purpose sentence implies the usage but provides no routing or conditional guidance.

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