spring_dependency
Resolve a dependency need like "jpa" or "web" into real Spring starter coordinates via Spring Initializr, returning parsed Maven or Gradle build snippets.
Instructions
Turn a need ("jpa", "web", "oauth2 client") into real starter coordinates.
No artifact name is invented. The need is matched against Spring
Initializr's own dependency catalogue, then Initializr is asked to generate
the Maven pom and the Gradle build file for those ids, and those are
returned — parsed coordinates plus ready-to-paste snippets. That matters:
the catalogue id "web" generates spring-boot-starter-webmvc on Spring
Boot 4.1, not the spring-boot-starter-web that string-building
spring-boot-starter-<id> would produce.
build is "both" (default), "maven" or "gradle". boot_version pins
the line (plain form, e.g. "4.1.1"); omitted uses Initializr's newest
released default. max_tokens truncates the snippets.
On failure returns {"error", "suggestion"} — an unmatched need returns an error rather than a guess.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| need | Yes | ||
| build | No | both | |
| max_tokens | No | ||
| boot_version | No |