Skip to main content
Glama
SmartBear MCP server

SmartBear MCP server

Official
by SmartBear

Contract Testing: Publish Provider Contract

contract-testing_publish_provider_contract
Idempotent

Publish provider OpenAPI or AsyncAPI contracts and self-verification results to PactFlow for bi-directional contract testing, enabling validation of provider versions against consumer expectations.

Instructions

Publish a provider OpenAPI or AsyncAPI contract and self-verification results to PactFlow (Bi-Directional Contract Testing).

Toolset: Contracts

Parameters:

  • providerName (string) required: Name of the provider application

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

  • contract (object) required: Provider contract (OpenAPI or AsyncAPI spec) and verification details

  • tags (array): Version tags

  • branch (string): Branch name of the provider

  • buildUrl (string): URL of the CI build

Input Schema

NameRequiredDescriptionDefault
tagsNoVersion tags
branchNoBranch name of the provider
buildUrlNoURL of the CI build
contractYesProvider contract (OpenAPI or AsyncAPI spec) and verification details
providerNameYesName of the provider application
pacticipantVersionNumberYesVersion number of the provider

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:branch-version": {
      +          "$ref": "#/$defs/EmbeddedLink"
      +        },
      +        "pb:pacticipant": {
      +          "$ref": "#/$defs/EmbeddedLink"
      +        },
      +        "pb:pacticipant-version": {
      +          "$ref": "#/$defs/EmbeddedLink"
      +        },
      +        "pb:pacticipant-version-tags": {
      +          "items": {
      +            "$ref": "#/$defs/EmbeddedLink"
      +          },
      +          "type": "array"
      +        },
      +        "pf:provider-contract": {
      +          "$ref": "#/$defs/EmbeddedLink"
      +        }
      +      },
      +      "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

A3.6/5.0
Behavior3/5

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

Annotations already declare idempotentHint=true, destructiveHint=false and openWorldHint=false, so the safety profile is covered. The description adds that this publishes to PactFlow under BDCT, but says nothing about authentication needs, whether re-publishing a version overwrites prior contract data, or what failures look like — meaningful gaps for a write operation.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The opening sentence is front-loaded and states purpose efficiently. The subsequent parameter block largely duplicates the input schema, which is redundant bulk, though it remains scannable and does not obscure the core statement.

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?

For a nested-object, 6-parameter mutation tool this covers the shape of the call, and the existence of an output schema means return values need no explanation. However, nothing is said about prerequisites, versioning semantics, or how publishing interacts with consumer contracts in BDCT, leaving the agent under-informed about consequences.

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% and the nested contract object (content, contentType, specification, selfVerificationResults) is fully documented in the schema, so the baseline of 3 applies. The description's parameter list only restates the schema's own field descriptions without adding format, encoding, or validation guidance.

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 (publish) plus resource (provider OpenAPI/AsyncAPI contract with self-verification results) and names the target system (PactFlow, Bi-Directional Contract Testing). The 'provider' qualifier cleanly separates it from the sibling contract-testing_publish_consumer_contracts.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The Bi-Directional Contract Testing framing implies when the tool applies, but the description never states prerequisites (API token, existing provider/pacticipant) nor points to the get_bdct_provider_contract or publish_consumer_contracts siblings as alternatives or follow-ups. Usage is inferable rather than explicit.

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