Skip to main content
Glama

PublishContract

Destructive

Create or update a contract variant and start a launch for it, the same write that rover contract publish performs. A contract variant is a filtered view of another variant's schema, built by including and excluding schema elements by tag. The filter configuration replaces the previous one in full, so send the complete include and exclude lists rather than only the tags you want to change. The same applies to hideUnreachableTypes, which has no default: when you update a contract, pass the value it has now. GetContractConfig states that value in its description. Returns the contract variant and a link to the launch, or the error messages that stopped it. Provide the graph ID, the contract variant name, the source variant, the include and exclude tag lists, and whether to hide unreachable types.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
excludeYes
graphIdYes
includeYes
sourceVariantNoThe graphRef of the variant the contract will be derived from, e.g. `my-graph@production`. Once set, this value cannot be changed.
initiateLaunchNoWhether a launch and schema publish should be initiated after updating configuration. Defaults to `true`.
contractVariantYesThe name of the contract variant, e.g. `public-api`. Once set, this value cannot be changed.
hideUnreachableTypesYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataNo
errorsNo
extensionsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.5/5.0
Behavior5/5

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

Annotations already declare this a destructive, open-world write, and the description adds real behavioral context on top: the include/exclude configuration is replaced in full rather than merged, hideUnreachableTypes is mandatory with no default, and the result is either the variant plus a launch link or the errors that stopped the launch. The destructive-replace semantics are exactly the kind of trait an agent needs before invoking.

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?

Front-loaded with the action and the CLI equivalent, then the semantics that matter most (full replacement, no default). The closing sentence enumerating the required inputs is partly redundant with the schema, but overall the passage is dense and every other sentence earns its place.

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?

With an output schema present, return values need no elaboration, and the description still notes them briefly. It covers the non-obvious behaviors (full-replace filter, mandatory hideUnreachableTypes) that a 7-parameter mutation needs, though it does not touch on permission or auth requirements.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is only 43%, so the description has to carry weight, and it does: it explains that include/exclude are complete replacement tag lists and that hideUnreachableTypes must be supplied with its current value. It enumerates the expected inputs (graph ID, contract variant name, source variant, include/exclude lists, hideUnreachableTypes), though it omits mention of initiateLaunch, which is only documented in the schema.

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 ('Create or update a contract variant and start a launch for it') and anchors it to a known CLI operation (`rover contract publish`). It goes further by defining what a contract variant actually is (a filtered view of another variant's schema), which distinguishes it from the Publish* siblings that operate on graphs and subgraphs.

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?

Gives clear operating context: the filter config is a full replacement, so callers must send complete lists, and hideUnreachableTypes has no default so the current value must be passed. It also routes the agent to GetContractConfig to obtain that value. It stops short of explicitly naming when to prefer this over PublishGraphSchema/PublishSubgraph, so it is clear context rather than full when/when-not guidance.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources