Check API compatibility
check_api_compatibilityChecks whether a Java or Kotlin library build breaks its last published public API, returns the required semantic version bump and incompatible changes with compatible alternatives.
Instructions
Checks whether the current build of a Java or Kotlin library breaks the public API of its last published version (Maven Central or the repository the server was started with). Returns the verdict, the required semantic version bump (MAJOR/MINOR/PATCH), the next version, every binary or source incompatible change with a compatible alternative (e.g. keep the old method as deprecated), and optionally a changelog draft. It reads the compiled classes, so build the project first (the way it is usually built) and again after each change. Call it after changing the public API of a library, before committing.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "check_api_compatibility"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| against | No | Compare with this published version instead. Optional. | |
| current | No | Build output to check: jar files or classes folders. Optional: found in target/ or build/. | |
| exclude | No | Packages or types that are not public API, e.g. com.acme.internal (its subpackages too; * and ** are globs). Their changes are left out of the result. Optional: by default every public package is checked. | |
| project | No | Folder of the library module (with its pom.xml or build.gradle). Optional: defaults to the folder the server was started in. Relative paths are resolved against it. | |
| version | No | The version the build declares, e.g. 1.4.0-SNAPSHOT. Optional: read from the build. It picks the release to compare with and is checked against the changes. | |
| artifact | No | Maven coordinates GROUP:ARTIFACT of the published library, e.g. com.acme:acme-core. Optional: read from pom.xml or gradle.properties. | |
| classpath | No | Jars the build depends on, when Bumpwise cannot read them from the build's POM (pom.xml, a Gradle build/publications POM or ~/.m2). Optional; needed only to tell classes that moved into a dependency from removed ones. | |
| includeChangelog | No | Also return a Markdown changelog draft. Default: false. |