Skip to main content

What it does

Spring Boot starters that turn the trusted GraphQL documents in your repository into tools an agent can call, over the Model Context Protocol (MCP) or in process through Spring AI.

Write a GraphQL query in a file, and GATool publishes it as a tool:

# Returns the highest-rated movies, best first.
query TopRatedMovies($first: Int = 10) {
topRatedMovies(first: $first) {
id
title
rating
}
}

The operation name becomes the tool name. The comment above it becomes the description an agent reads. The variables become the tool's input schema. An agent calls the tool with arguments. GATool sends the document to your GraphQL API. The API answers with JSON. GATool reads the data and errors of that answer, writes them again, and returns them as the tool result. extensions and every other top-level key stay out. A number reaches the model with every digit the API sent.

The operations are trusted documents. The repository holds the list of queries that exist. A pull request reviews each one. The model chooses from that list. The schema stays out of the model's context. The API receives only the documents in the repository. Each document arrives as graphql-java prints it, with its comments removed. CheckedTool.document() in the CI check returns the text GATool sends. The CI check is the OperationFilesAssert test, described under "Checking your tools in CI". A later release will send persisted documents, which the API holds ahead of time and a client names by hash. The documentation for that release will say what to hash.