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

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

NameRequiredDescriptionDefault
dataNo
errorsNo
extensionsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true and openWorldHint=true, and the description reinforces that with real substance: the filter configuration is replaced in full rather than merged, and hideUnreachableTypes has no default so the existing value must be re-sent. That is a genuine footgun disclosure beyond the annotations, though it does not discuss permissions, launch failure modes, or reversibility.

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 purpose, followed by domain definition, then the replacement-semantics warning, then return shape. The final sentence restating all required inputs is largely redundant with the schema and could be cut, but the other sentences each carry non-obvious information.

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?

For a destructive, open-world mutation with seven parameters this covers the essentials: what it writes, how the filter state behaves on update, where to read the current hideUnreachableTypes, and what comes back. Since an output schema exists, the return-value sentence is a bonus rather than a requirement; the only real omission is the initiateLaunch escape hatch.

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%, and the description compensates for the three undocumented-but-critical parameters: include/exclude are tag lists whose full contents must be sent, hideUnreachableTypes must be passed the current value, and graphId/contractVariant/sourceVariant are enumerated in the closing checklist. The notable gap is `initiateLaunch`, which is never mentioned even though it can suppress the launch the description promises to start.

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") and anchors it to a known equivalent, `rover contract publish`. It then defines what a contract variant actually is, so an agent understands the object it is mutating without needing outside documentation.

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?

Makes clear this is the write path for contract variants and routes the agent to GetContractConfig to obtain the current hideUnreachableTypes value before calling. It does not, however, explicitly exclude sibling writes such as PublishGraphSchema or PublishSubgraph, so the agent must infer that this tool is contract-specific.

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